### Question:
MongoDbApplicationDataRepository implements ApplicationDataRepository { @Override public ApplicationData get(String id) { return template.findById(id, CLASS, APP_DATA_COLLECTION); }  @Override List<ApplicationData> getApplicationData(List<String> userIds, String appId); @Override ApplicationData getApplicationData(String personId, String appId); @Override Class<? extends ApplicationData> getType(); @Override ApplicationData get(String id); @Override ApplicationData save(ApplicationData item); @Override void delete(ApplicationData item); @Override List<ApplicationData> getAll(); @Override List<ApplicationData> getLimitedList(int offset, int limit); @Override int getCountAll(); void setTemplate(MongoOperations template); static final Class<ApplicationDataImpl> CLASS; }### Answer:
@Test public void get_Valid(){ String id = "123"; ApplicationDataImpl found = new ApplicationDataImpl(); expect(template.findById(id, applicationDataRepository.CLASS, CollectionNames.APP_DATA_COLLECTION)).andReturn(found); replay(template); assertThat(found, is(sameInstance(applicationDataRepository.get(id)))); }