### Question:
EnvironmentServiceImpl implements EnvironmentService { @Override public LocalEnvironment merge( final LocalEnvironment item ) { LocalEnvironment environment = em.merge( item ); em.flush(); em.refresh( environment ); return environment; }  void setEntityManager( EntityManager em ); @Override LocalEnvironment find( final String id ); @Override List<LocalEnvironment> getAll(); @Override List<LocalEnvironment> getDeleted(); @Override void persist( final Environment item ); @Override void remove( final String id ); @Override LocalEnvironment merge( final LocalEnvironment item ); @Override EnvironmentContainerImpl mergeContainer( EnvironmentContainerImpl item );  }### Answer:
@Test public void testMerge() throws Exception { environmentService.merge( environment ); verify( entityManager ).merge( environment ); }