### Question:
MongoDbActivityStreamsRepository implements ActivityStreamsRepository { @Override public ActivityStreamsEntry save(ActivityStreamsEntry item) { ActivityStreamsEntryImpl converted = converter.convert(item, ActivityStreamsEntry.class); template.save(converted, ACTIVITIES); return converted; } @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 save() { ActivityStreamsEntry original = new ActivityStreamsEntryImpl(); ActivityStreamsEntry converted = new ActivityStreamsEntryImpl(); expect(factory.convert(original, ActivityStreamsEntry.class)).andReturn(converted); template.save(converted, ACTIVITIES); expectLastCall(); replay(factory, template); ActivityStreamsEntry result = repository.save(original); assertThat(result, is(sameInstance(converted))); verify(factory, template); }