@Test
public void getProductModuleNames() throws IOException {

    final String product = "product";
    final List<String> names = Lists.newArrayList("module1", "module2", "module3", "module4");
    stubFor(get(urlMatching("/" + ServerAPI.PRODUCT_RESOURCE + "/" + product + ServerAPI.GET_MODULES))
            .willReturn(aResponse().withStatus(Status.OK.getStatusCode())
                    .withBody(JsonUtils.serialize(names))
                    .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)));
    List<String> gotNames = null;
    Exception exception = null;
    try {
        gotNames = client.getProductModuleNames(product);
    } catch (Exception e) {
        exception = e;
    }
    assertNull(exception);
    assertNotNull(gotNames);
    assertEquals(names.size(), gotNames.size());
}