### Question:
MongoDbActivityStreamsRepository implements ActivityStreamsRepository { @Override public ActivityStreamsEntry get(String id) { return template.findById(id, CLASS, ACTIVITIES); } @Autowired  MongoDbActivityStreamsRepository(MongoOperations template, HydratingConverterFactory converter); @Override List<ActivityStreamsEntry> getAll(); @Override List<ActivityStreamsEntry> getLimitedList(int offset, int limit); @Override int getCountAll(); @Override List<ActivityStreamsEntry> getByUserId(String id); @Override void deleteById(String id); @Override Class<? extends ActivityStreamsEntry> getType(); @Override ActivityStreamsEntry get(String id); @Override ActivityStreamsEntry save(ActivityStreamsEntry item); @Override void delete(ActivityStreamsEntry item);  }### Answer:
@Test public void getById() { MongoDbActivityStreamsEntry entry = new MongoDbActivityStreamsEntry(); entry.setId(ID); expect(template.findById(ID, ENTITY_CLASS, ACTIVITIES)).andReturn(entry); replay(template); ActivityStreamsEntry result = repository.get(ID); assertThat(result, is(sameInstance((ActivityStreamsEntry)entry))); }