### Question:
MongoDbTagRepository implements TagRepository { @Override public List<Tag> getLimitedList(int offset, int pageSize){ Query query = new Query().skip(offset).limit(pageSize); return template.find(query); }  @Override List<Tag> getAll(); @Override List<Tag> getLimitedList(int offset, int pageSize); @Override int getCountAll(); @Override Tag getByKeyword(String keyword); @Override Class<? extends Tag> getType(); @Override Tag get(String id); @Override Tag save(Tag item); @Override void delete(Tag item); void setWidgetTemplate(MongoTagOperations tagTemplate);  }### Answer:
@Test public void getLimitedList(){ List<Tag> tags = Arrays.<Tag>asList(new TagImpl(), new TagImpl()); expect(tagTemplate.find(new Query())).andReturn(tags); replay(tagTemplate); List<Tag> result = repo.getAll(); assertNotNull(result); assertThat(result.size(), is(equalTo(tags.size()))); }