@Test
public void postArtifact() throws IOException{

    Artifact artifact1 = DataModelFactory.createArtifact("com.axway.test", "artifact1", "1.0.0-SNAPSHOT", "win32",  "jar", "");
    stubFor(post(urlEqualTo("/" + ServerAPI.ARTIFACT_RESOURCE))
            .withRequestBody(equalTo(JsonUtils.serialize(artifact1)))
            .willReturn(aResponse()
                    .withStatus(Status.CREATED.getStatusCode())));
    Exception exception = null;
    try{
        client.postArtifact(artifact1, "user", "password");
    }catch (Exception e) {
        exception = e;
    }
    assertNull(exception);
}