@Test
 public void testParseProjectNoTracker() throws IOException, JSONException {
   String json = MyIOUtils.getResourceAsString("redmine_project_no_trackers.json");
   Project project =
       RedmineJSONParser.parseProject(RedmineJSONParser.getResponseSingleObject(json, "project"));
   List<Tracker> trackers = project.getTrackers();
   Assert.assertNull("Trackers list must be NULL", trackers);
 }
  @Test
  public void testParseProject1() throws ParseException, JSONException {
    final String projectString =
        "{\"project\":{\"created_on\":\"2012/05/11 06:53:21 -0700\",\"updated_on\":\"2012/05/11 06:53:20 -0700\",\"homepage\":\"\",\"trackers\":[{\"name\":\"Bug\",\"id\":1},{\"name\":\"Feature\",\"id\":2},{\"name\":\"Support\",\"id\":3}],\"identifier\":\"test1336744548920\",\"name\":\"test project\",\"id\":6143}}";
    final Project project =
        RedmineJSONParser.PROJECT_PARSER.parse(
            RedmineJSONParser.getResponseSingleObject(projectString, "project"));

    final Project template = new Project();
    template.setId(Integer.valueOf(6143));
    template.setIdentifier("test1336744548920");
    template.setName("test project");
    template.setHomepage("");
    template.setCreatedOn(
        new SimpleDateFormat("dd.MM.yyyy HH:mm:ss Z").parse("11.05.2012 06:53:21 -0700"));
    template.setUpdatedOn(
        new SimpleDateFormat("dd.MM.yyyy HH:mm:ss Z").parse("11.05.2012 06:53:20 -0700"));
    template.setTrackers(
        Arrays.asList(new Tracker(1, "Bug"), new Tracker(2, "Feature"), new Tracker(3, "Support")));
    template.setDescription("");
    Assert.assertEquals(template, project);
  }
  @Test
  public void testParseProjectRedmine() throws IOException, JSONException {
    String json = MyIOUtils.getResourceAsString("redmine_project.json");
    Project project =
        RedmineJSONParser.parseProject(RedmineJSONParser.getResponseSingleObject(json, "project"));
    Integer expectedProjectID = 23;
    String expectedName = "test project";
    String expectedKey = "test1295649781087";
    Assert.assertEquals(expectedProjectID, project.getId());
    Assert.assertEquals(expectedName, project.getName());
    Assert.assertEquals(expectedKey, project.getIdentifier());

    List<Tracker> trackers = project.getTrackers();
    Assert.assertNotNull("Trackers list must not be NULL", trackers);
    Assert.assertEquals(3, trackers.size());

    Tracker tracker = project.getTrackerByName("Support");
    Assert.assertNotNull("Tracker must be not null", tracker);
    Integer expectedTrackerId = 3;
    Assert.assertEquals("checking id of 'support' tracker", expectedTrackerId, tracker.getId());
  }