EnvironmentServiceImpl implements EnvironmentService { @Override public void persist( final Environment item ) { em.persist( item ); em.flush(); em.refresh( item ); }  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 );  }
@Test public void testPersist() throws Exception { environmentService.persist( environment ); verify( entityManager ).persist( environment ); }