<commit_before>package com.dnfeitosa.codegraph.api.acceptance.controllers;

import com.dnfeitosa.codegraph.db.nodes.ArtifactNode;
import com.dnfeitosa.codegraph.db.nodes.TypeNode;
import com.dnfeitosa.codegraph.db.repositories.ArtifactRepository;
import com.dnfeitosa.codegraph.server.api.controllers.TypesController;
import com.dnfeitosa.codegraph.server.api.resources.TypesResource;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;


public class TypesControllerTest extends BaseAcceptanceTest {

    @Autowired
    private ArtifactRepository artifactRepository;

    @Autowired
    private TypesController controller;

    @Test
    public void shouldReturnTheTypesBelongingToAnArtifact() {
        ArtifactNode artifactNode = new ArtifactNode(null, "name", "organization", "1.0", "jar", "jar");
        artifactNode.addType(new TypeNode("TypesControllerTest", "com.dnfeitosa.codegraph.api.acceptance.controllers"));
        artifactNode.addType(new TypeNode("ArtifactRepository", "com.dnfeitosa.codegraph.db.repositories"));

        artifactRepository.save(artifactNode);

        ResponseEntity<TypesResource> response = controller.getTypes(artifactNode.getId());

        assertThat(response.getStatusCode(), is(HttpStatus.OK));

        TypesResource types = response.getBody();
        assertThat(types.getTypes().size(), is(2));
    }
}<commit_msg>printing values to understand why it is failing in travis<commit_after>package com.dnfeitosa.codegraph.api.acceptance.controllers;

import com.dnfeitosa.codegraph.db.nodes.ArtifactNode;
import com.dnfeitosa.codegraph.db.nodes.TypeNode;
import com.dnfeitosa.codegraph.db.repositories.ArtifactRepository;
import com.dnfeitosa.codegraph.server.api.controllers.TypesController;
import com.dnfeitosa.codegraph.server.api.resources.TypesResource;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;


public class TypesControllerTest extends BaseAcceptanceTest {

    @Autowired
    private ArtifactRepository artifactRepository;

    @Autowired
    private TypesController controller;

    @Test
    public void shouldReturnTheTypesBelongingToAnArtifact() {
        ArtifactNode artifactNode = new ArtifactNode(null, "name", "organization", "1.0", "jar", "jar");
        artifactNode.addType(new TypeNode("TypesControllerTest", "com.dnfeitosa.codegraph.api.acceptance.controllers"));
        artifactNode.addType(new TypeNode("ArtifactRepository", "com.dnfeitosa.codegraph.db.repositories"));

        artifactRepository.save(artifactNode);

        ResponseEntity<TypesResource> response = controller.getTypes(artifactNode.getId());

        System.out.println(artifactNode.getId());
        System.out.println(artifactRepository.findAll());

        assertThat(response.getStatusCode(), is(HttpStatus.OK));

        TypesResource types = response.getBody();
        assertThat(types.getTypes().size(), is(2));
    }
}
{'fraction_non_alphanumeric': 0.10717529518619437, 'fraction_numerical': 0.0018165304268846503, 'mean_word_length': 5.198874296435272, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6653601', 'n_tokens_mistral': 952, 'n_tokens_neox': 916, 'n_words': 149}