@Test
public void getAllFieldsForClassWithBar() throws NoSuchFieldException, SecurityException {

    Set<Field> barFields = ReflectUtil.getAllFieldsForClass(Bar.class, new Class<?>[] {});
    Assert.assertNotNull(barFields);
    Assert.assertTrue(barFields.contains(Foo.class.getDeclaredField("fooField")));
    Assert.assertTrue(barFields.contains(Foo.class.getDeclaredField("fooIntField")));
    Assert.assertTrue(barFields.contains(Bar.class.getDeclaredField("barField")));
    Assert.assertTrue(barFields.contains(Bar.class.getDeclaredField("barIntField")));
}