@Test
public void postArtifact() throws AuthenticationException, UnknownHostException {

    Artifact artifact = DataModelFactory.createArtifact("groupId", "artifactId", "version", "classifier", "type", "extension");
    artifact.setSha256("6554ed3d1ab007bd81d3d57ee27027510753d905277d5b5b8813e5bd516e821c");
    artifact.setDownloadUrl("downloadUrl");
    artifact.setSize("size");
    client().addFilter(new HTTPBasicAuthFilter(USER_4TEST, PASSWORD_4TEST));
    WebResource resource = client().resource("/" + ServerAPI.ARTIFACT_RESOURCE);
    ClientResponse response = resource.type(MediaType.APPLICATION_JSON).post(ClientResponse.class, artifact);
    assertNotNull(response);
    assertEquals(HttpStatus.CREATED_201, response.getStatus());
}