@Test
@RunAsClient
public void putXmlProjectIteration() throws Exception {
ProjectIteration newIteration = new ProjectIteration("new-iteration");
IProjectIterationResource iterationClient =
super.createProxy(createClientProxyFactory(ADMIN, ADMIN_KEY),
IProjectIterationResource.class,
"/projects/p/sample-project/iterations/i/"
+ newIteration.getId());
ClientResponse response = iterationClient.put(newIteration);
assertThat(response.getStatus(), is(Status.CREATED.getStatusCode())); // 201
response.releaseConnection();
// Retreive it again
ClientResponse<ProjectIteration> getResponse = iterationClient.get();
assertThat(getResponse.getStatus(), is(Status.OK.getStatusCode())); // 200
ProjectIteration it = getResponse.getEntity();
assertThat(it.getId(), is("new-iteration"));