Moo { public <T> List<T> translateEach( List<?> sources, Class<T> destinationClass ) { return newSession().getEachTranslation( sources, destinationClass ); } Moo();  Moo( Configuration configuration ); Translate<T> translate( Class<T> destinationClass ); T translate( Object source, Class<T> destinationClass ); List<T> translateEach( List<?> sources, Class<T> destinationClass ); Collection<T> translateEach( Collection<?> sources, Class<T> destinationClass ); Set<T> translateEach( Set<?> sources, Class<T> destinationClass ); void update( Object source, Object destination ); Update update( Object source );  }
@Test public void testMooTranslateEachListTranslatesEachInNewSession() { List<Integer> sources = Arrays.asList(1, 2, 3); moo.translateEach(sources, String.class); Mockito.verify(session).getEachTranslation(sources, String.class); }
@Test public void testMooTranslateEachSetTranslatesEachInNewSession() { Set<Integer> sources = new HashSet<Integer>( Arrays.asList(1, 2, 3) ); moo.translateEach(sources, String.class); Mockito.verify(session).getEachTranslation(sources, String.class); }
@Test public void testMooTranslateEachCollectionTranslatesEachInNewSession() { Collection<Integer> sources = new HashSet<Integer>( Arrays.asList(1, 2, 3) ); moo.translateEach(sources, String.class); Mockito.verify(session).getEachTranslation(sources, String.class); }