@Test
public void getBuildInfo() {

    final DbModule dbModule = new DbModule();
    dbModule.setName("moduleTest");
    dbModule.setVersion("1.0.0");
    dbModule.getBuildInfo().put("test", "what a test!");
    when(repositoryHandler.getModule(dbModule.getId())).thenReturn(dbModule);
    final WebResource resource = client().resource("/" + ServerAPI.MODULE_RESOURCE + "/" + dbModule.getName() + "/" + dbModule.getVersion() + ServerAPI.GET_BUILD_INFO);
    final ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);
    assertNotNull(response);
    assertEquals(HttpStatus.OK_200, response.getStatus());
    final Map<String, String> getBuildInfo = response.getEntity(new GenericType<Map<String, String>>() {
    });
    assertNotNull(getBuildInfo);
    assertEquals(1, getBuildInfo.size());
    assertEquals("what a test!", getBuildInfo.get("test"));
}