### Question:
MongoDbCategoryConverter implements HydratingModelConverter<Category, MongoDbCategory> { @Override public void hydrate(MongoDbCategory dehydrated) { if(dehydrated == null) { return; } dehydrated.setWidgetRepository(widgetOperations); }  @Override void hydrate(MongoDbCategory dehydrated); @Override Class<Category> getSourceType(); @Override MongoDbCategory convert(Category source); void setMongoWidgetOperations(MongoWidgetOperations mongoWidgetOperations);  }### Answer:
@Test public void hydrate_valid(){ MongoDbCategory category = new MongoDbCategory(); converter.hydrate(category); assertThat(category.getWidgetRepository(),is(sameInstance(mongoWidgetOperations))); }
@Test public void hydrate_null(){ converter.hydrate(null); assertThat(true, is(true)); }