input.close();
}
@Test
public void testParseResponse() throws Exception {
CustomFields ct = testee.parseResponse(input, HttpStatus.SC_OK);
assertNotNull(ct);
assertEquals(CustomFieldValidator.COUNT, ct.getAll().size());
CustomFieldValidator.validate1(ct.getById(1));
CustomFieldValidator.validate2(ct.getById(2));
CustomFieldValidator.validate7(ct.getById(7));
int idx=0;
assertNotNull(ct.getIssueCustomFields());
assertEquals(7, ct.getIssueCustomFields().size());
assertEquals(1, ct.getIssueCustomFields().get(idx++).getId());
assertEquals(2, ct.getIssueCustomFields().get(idx++).getId());
assertEquals(6, ct.getIssueCustomFields().get(idx++).getId());
assertEquals(8, ct.getIssueCustomFields().get(idx++).getId());
assertEquals(9, ct.getIssueCustomFields().get(idx++).getId());
assertEquals(11, ct.getIssueCustomFields().get(idx++).getId());
assertEquals(12, ct.getIssueCustomFields().get(idx++).getId());
assertNotNull(ct.getTimeEntryCustomFields());
assertEquals(1, ct.getTimeEntryCustomFields().size());
assertEquals(7, ct.getTimeEntryCustomFields().get(0).getId());
}