@Test public void should_return_values_of_property() { List<Long> ids = new ArrayList<Long>(); ids.add(yoda.getId()); when(propertySupport.propertyValues(propertyName, Long.class, employees)).thenReturn(ids); assertSame(ids, properties.from(employees)); }
@Before public void setUp() { propertySupport = mock(PropertySupport.class); propertyName = "id"; properties = new Properties<Long>(propertyName, Long.class); properties.propertySupport = propertySupport; }