class ClassFieldsExcelExport implements ClassFields {

    @Override
    public Iterator<Field> getFields() {
        final Iterable<Field> originalFields = () -> this.original.getFields();

        // return only classes that are annotated with @ExcelExport
        final Iterator<Field> fields = StreamSupport.stream(originalFields.spliterator(), false)
                .filter(field -> field.getAnnotation(ExcelExport.class) != null)
                .filter(this::filterByClass)
                .iterator();

        return fields;
    }

}

class ClassFieldsExcelExportTest {

    @Test
    public void getFields() throws Exception {

        final String[] expectedFields = {"id", "label"};

        final ClassFields classFields = new ClassFieldsExcelExport(
                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 @ExcelExport fields", expectedFields, actualFields.toArray());
    }

}