<commit_before>package com.mjrichardson.teamCity.buildTriggers;

import org.json.simple.parser.ParseException;
import org.testng.Assert;
import org.testng.annotations.Test;

import java.io.IOException;

@Test
public class ApiProjectsResponseTest {
    public void can_parse_projects_response() throws IOException, ParseException {
        final String json = ResourceHandler.getResource("api/projects");
        ApiProjectsResponse sut = new ApiProjectsResponse(json);

        Assert.assertFalse(sut.projects.isEmpty());
        Assert.assertEquals(sut.projects.size(), 30);
        Project[] array = sut.projects.toArray();
        Assert.assertEquals(array[0].id, "Projects-143");
        Assert.assertEquals(array[0].progressionApiLink, "/api/progression/Projects-24");
        Assert.assertEquals(array[0].releasesApiLink, "/api/projects/Projects-24/releases");
        Assert.assertEquals(sut.nextLink, "/api/projects?skip=30");
    }

    public void can_parse_projects_response_with_no_projects() throws IOException, ParseException {
        final String json = ResourceHandler.getResource("api/projects-with-no-items");
        ApiProjectsResponse sut = new ApiProjectsResponse(json);

        Assert.assertEquals(sut.projects.size(), 0);
        Assert.assertTrue(sut.projects.isEmpty());
    }
}<commit_msg>Fixing broken test<commit_after>package com.mjrichardson.teamCity.buildTriggers;

import org.json.simple.parser.ParseException;
import org.testng.Assert;
import org.testng.annotations.Test;

import java.io.IOException;

@Test
public class ApiProjectsResponseTest {
    public void can_parse_projects_response() throws IOException, ParseException {
        final String json = ResourceHandler.getResource("api/projects");
        ApiProjectsResponse sut = new ApiProjectsResponse(json);

        Assert.assertFalse(sut.projects.isEmpty());
        Assert.assertEquals(sut.projects.size(), 30);
        Project[] array = sut.projects.toArray();
        Assert.assertEquals(array[0].id, "Projects-143");
        Assert.assertEquals(array[0].progressionApiLink, "/api/progression/Projects-143");
        Assert.assertEquals(array[0].releasesApiLink, "/api/projects/Projects-143/releases");
        Assert.assertEquals(sut.nextLink, "/api/projects?skip=30");
    }

    public void can_parse_projects_response_with_no_projects() throws IOException, ParseException {
        final String json = ResourceHandler.getResource("api/projects-with-no-items");
        ApiProjectsResponse sut = new ApiProjectsResponse(json);

        Assert.assertEquals(sut.projects.size(), 0);
        Assert.assertTrue(sut.projects.isEmpty());
    }
}
{'fraction_non_alphanumeric': 0.11804767309875142, 'fraction_numerical': 0.012107453651153992, 'mean_word_length': 4.256461232604374, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2776141', 'n_tokens_mistral': 764, 'n_tokens_neox': 732, 'n_words': 120}