@Override
protected void onResponse(ClientResponse response) {
assertThat(response.getStatus(), is(200)); // Ok
assertJaxbUnmarshal(response, Project.class);
Project project = jaxbUnmarshal(response, Project.class);
assertThat(project.getId(), is("sample-project"));
assertThat(project.getDescription(), is("An example Project"));
assertThat(project.getStatus(), is(EntityStatus.ACTIVE));
assertThat(project.getName(), is("Sample Project"));
// assertThat(project.getType(),
// is(ProjectType.IterationProject));
assertThat(project.getIterations().size(), is(3));
// Iteration 1
ProjectIteration iteration = project.getIterations().get(0);
assertThat(iteration.getId(), is("1.0"));
assertThat(iteration.getStatus(), is(EntityStatus.ACTIVE));
// Iteration 2
iteration = project.getIterations().get(1);
assertThat(iteration.getId(), is("1.1"));
assertThat(iteration.getStatus(), is(EntityStatus.ACTIVE));
}
}.run();
}