@Test
public void approveLicense() throws IOException {

    License license1 = DataModelFactory.createLicense("test", "longName", "comments", "regexp", "url");
    stubFor(post(urlEqualTo("/" + ServerAPI.LICENSE_RESOURCE + "/" + license1.getName() + "?" + ServerAPI.APPROVED_PARAM + "=true"))
            .willReturn(aResponse()
                    .withStatus(Status.OK.getStatusCode())));
    Exception exception = null;
    try{
        client.approveLicense(license1.getName(), true, "user", "password");
    }catch (Exception e) {
        exception = e;
    }
    assertNull(exception);
}