@Test
public void getProductModules(){

    final DbProduct product = new DbProduct();
    product.setName("product1");
    product.setModules(Lists.newArrayList("module1", "module2", "module3"));
    when(repositoryHandler.getProduct(product.getName())).thenReturn(product);
    WebResource resource = client().resource("/" + ServerAPI.PRODUCT_RESOURCE + "/" + product.getName() + ServerAPI.GET_MODULES);
    ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);
    assertNotNull(response);
    assertEquals(HttpStatus.OK_200, response.getStatus());
    final List<String> results = response.getEntity(new GenericType<List<String>>() {
    });
    assertNotNull(results);
    assertEquals(3, results.size());
}