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

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