@Test
public void getALicense() throws UnknownHostException{

    DbLicense license = new DbLicense();
    license.setName("license");
    license.setLongName("longName");
    license.setComments("bla");
    license.setRegexp("gdfg");
    license.setUrl("www.somewhere.org");
    license.setApproved(true);
    when(repositoryHandler.getLicense(license.getName())).thenReturn(license);
    WebResource resource = client().resource("/" + ServerAPI.LICENSE_RESOURCE + "/" + license.getName());
    ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);
    assertNotNull(response);
    assertEquals(HttpStatus.OK_200, response.getStatus());
    License dbLicense = response.getEntity(License.class);
    assertNotNull(dbLicense);
    assertEquals(license.getName(), dbLicense.getName());
    assertEquals(license.getLongName(), dbLicense.getLongName());
    assertEquals(license.getComments(), dbLicense.getComments());
    assertEquals(license.getRegexp(), dbLicense.getRegexp());
    assertEquals(license.getUrl(), dbLicense.getUrl());
    assertEquals(license.isApproved(), dbLicense.isApproved());
}