@Test
public void getLicenseNotFound() throws IOException {

    License license1 = DataModelFactory.createLicense("test", "longName", "comments", "regexp", "url");
    stubFor(get(urlEqualTo("/" + ServerAPI.LICENSE_RESOURCE + "/" + license1.getName()))
            .willReturn(aResponse()
                    .withStatus(Status.NOT_FOUND.getStatusCode())));
    Exception exception = null;
    try{
        client.getLicense(license1.getName());
    }catch (Exception e) {
        exception = e;
    }
    assertNotNull(exception);
}