Project project =
new Project(PROJECT_SLUG, PROJECT_NAME,
ProjectType.Gettext.toString(), PROJECT_DESC);
IProjectResource projectService =
getClientRequestFactory().createProxy(IProjectResource.class,
createBaseURI(RESOURCE_PATH).resolve(PROJECT_SLUG));
Response response = projectService.put(project);
assertThat(response.getStatus(), is(Status.CREATED.getStatusCode()));
String location = (String) response.getMetadata().getFirst("Location");
assertThat(location, endsWith("/projects/p/" + PROJECT_SLUG));
projectService =
getClientRequestFactory().createProxy(IProjectResource.class,
createBaseURI(RESOURCE_PATH).resolve(PROJECT_SLUG));
ClientResponse<Project> response1 = projectService.get();
assertThat(response1.getStatus(), is(Status.OK.getStatusCode()));
Project projectRes = response1.getEntity();
assertThat(projectRes, notNullValue());