@Test
public void postArtifactTest(){

    final String sha = "6554ed3d1ab007bd81d3d57ee27027510753d905277d5b5b8813e5bd516e821c";
    Artifact artifact = DataModelFactory.createArtifact(GrapesTestUtils.CORPORATE_GROUPID_4TEST, "artifactId", "version", "classifier", "type", "extension");
    artifact.setSha256(sha);
    
    client().addFilter(new HTTPBasicAuthFilter(USER_4TEST, PASSWORD_4TEST));
    final WebResource resource = client().resource("/" + ServerAPI.ARTIFACT_RESOURCE);
    final ClientResponse response = resource.type(MediaType.APPLICATION_JSON).post(ClientResponse.class, artifact);
    assertNotNull(response);
    assertEquals(HttpStatus.CREATED_201, response.getStatus());
    final ArgumentCaptor<DbArtifact> captor = ArgumentCaptor.forClass(DbArtifact.class);
    verify(repositoryHandler, times(1)).store(captor.capture());
    assertEquals(sha, captor.getValue().getSha256());
}