ProductHandler { public List<String> getProductNames() { return repositoryHandler.getProductNames(); } ProductHandler(final RepositoryHandler repositoryHandler); void create(final DbProduct dbProduct); void update(final DbProduct dbProduct); List<String> getProductNames(); DbProduct getProduct(final String name); void deleteProduct(final String name); void setProductModules(final String name, final List<String> moduleNames);  }
@Test public void getProductNames(){ final RepositoryHandler repositoryHandler = GrapesTestUtils.getRepoHandlerMock(); final ProductHandler productHandler = new ProductHandler(repositoryHandler); productHandler.getProductNames(); verify(repositoryHandler,times(1)).getProductNames(); }