FeatureManagerImpl implements FeatureManager { @Override public Feature updateFeature(String appIdentifier, String idFeature, Feature feature) throws FeatureNotExistException, MongoGeospatialException { validatorExistFeature.checkFeatureExist(appIdentifier, idFeature); feature.setId(idFeature); return featureRepository.save(appIdentifier,feature); }  @Override Feature storeFeature(String appId, Feature feature); @Override void deleteFeature(String appIdentifier, String idFeature); @Override Feature updateFeature(String appIdentifier, String idFeature, Feature feature); @Override Feature getFeatureByID(String appIdentifier, String idFeature);  }
@Test public void updateFeatureManagerTest() throws FeatureNotExistException, MongoGeospatialException{ String idApplication = "9"; String idFeature = "1"; featureManagerImpl.updateFeature(idApplication, idFeature, feature); Mockito.verify(validatorExistFeature).checkFeatureExist(idApplication,idFeature); Mockito.verify(feature).setId(idFeature); Mockito.verify(featureRepository).save(idApplication,feature); }