@Test
public void noContent() throws IOException {
Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers());
SyncopeClient anonClient = clientFactory.createAnonymous();
UserSelfService noContentService = anonClient.prefer(UserSelfService.class, Preference.RETURN_NO_CONTENT);
UserTO user = UserTestITCase.getUniqueSampleTO("nocontent-anonymous@syncope.apache.org");
Response response = noContentService.create(user, true);
assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatus());
assertEquals(Preference.RETURN_NO_CONTENT.toString(), response.getHeaderString(RESTHeaders.PREFERENCE_APPLIED));
assertEquals(StringUtils.EMPTY, IOUtils.toString((InputStream) response.getEntity()));
}