EnvironmentServiceImpl implements EnvironmentService { @Override public List<LocalEnvironment> getAll() { return em.createQuery( "select e from LocalEnvironment e where e.deleted = false", LocalEnvironment.class ) .getResultList(); }  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 testGetAll() throws Exception { environmentService.getAll(); verify( entityManager ).createQuery( "select e from LocalEnvironment e where e.deleted = false", LocalEnvironment.class ); verify( query ).getResultList(); }