@Test
public void getFields() throws Exception {

    final String[] expectedFields = {"id", "label"};
    final ClassFields classFields = new ClassFieldsDefault(TestClass.class);
    final Iterator<Field> fields = classFields.getFields();
    final List<String> actualFields = new ArrayList<>();
    while (fields.hasNext()) {
        final Field f = fields.next();
        actualFields.add(f.getName());
    }
    Assert.assertArrayEquals("Check declared fields", expectedFields, actualFields.toArray());
}