@Test public void getEntities() { Map<Class<?>, Entity> entities = wrapper.getEntities(); assertEquals(1, entities.size()); assertTrue(entities.containsKey(Foo.class)); verify(metamodel).getEntities(); verify(metamodel).entity(Foo.class); }
@Test public void getEntityNames() { final List<String> names = wrapper.getEntityNames(); assertEquals(1, names.size()); assertEquals("foo", names.get(0)); verify(metamodel).getEntities(); verify(metamodel, never()).entity(any(Class.class)); }
@Test public void getEntity() { final Entity entity = wrapper.getEntity(Foo.class); assertEquals("foo", entity.getName()); verify(metamodel).entity(Foo.class); }