### Question:
MongoDbPageTemplateRepository implements PageTemplateRepository { @Override public List<PageTemplate> getAll() { return template.find(new Query()); }  @Override List<PageTemplate> getAll(); @Override List<PageTemplate> getLimitedList(int offset, int limit); @Override int getCountAll(); @Override List<PageTemplate> getAll(String pageType); @Override PageTemplate getDefaultPage(String pageType); @Override Class<? extends PageTemplate> getType(); @Override PageTemplate get(String id); @Override PageTemplate save(PageTemplate pageTemplate); @Override void delete(PageTemplate item); void setTemplate(MongoPageTemplateOperations template);  }### Answer:
@Test public void getAll_Valid() { List<PageTemplate> templates = new ArrayList<PageTemplate>(); PageTemplate temp = new MongoDbPageTemplate(); templates.add((MongoDbPageTemplate)temp); expect(template.find(new Query())).andReturn(templates); replay(template); List<PageTemplate> returned = templateRepository.getAll(); assertThat(returned, is(sameInstance(CollectionUtils.<PageTemplate>toBaseTypedList(templates)))); }