@Test
public void shouldReadEnum() throws Exception {

    String resourceName = "/" + MockEnum.class.getName().replace('.', '/') + ".class";
    input = getClass().getResourceAsStream(resourceName);
    ClassMetadata cmd = ClassFileMetadataReader.instance(input);
    assertThat(cmd, instanceOf(EnumMetadata.class));
    EnumMetadata emd = (EnumMetadata)cmd;
    List<String> enumValues = Arrays.asList("VALUE_A", "VALUE_B", "VALUE_C");
    assertThat(emd.getValues(), is(enumValues));
    for (FieldMetadata fmd : emd.getFields()) {
        assertThat(fmd.getName(), not(anyOf(is("VALUE_A"), is("VALUE_B"), is("VALUE_C"))));
    }
}