@Test
public void licenseAddToArtifact(){

    String gavc = "com.axway.test:artifact1:1.0.0-SNAPSHOT:win32:jar";
    String licenseId = "licenseId";
    stubFor(post(urlEqualTo("/" + ServerAPI.ARTIFACT_RESOURCE + "/" + gavc + ServerAPI.GET_LICENSES + "?" + ServerAPI.LICENSE_ID_PARAM + "=" + licenseId))
            .willReturn(aResponse()
                    .withStatus(Status.OK.getStatusCode())));
    Exception exception = null;
    try{
        client.addLicense(gavc, licenseId, "user", "password");
    }catch (Exception e) {
        exception = e;
    }
    assertNull(exception);
}