public boolean matchesExtension(String resourceName) {
        if (resourceName != null) {

            if (resourceName.endsWith("." + defaultExtension)) {
                return true;
            }
            for (String extension : otherExtensions) {
                if (resourceName.endsWith("." + extension)) {
                    return true;
                }
            }
        }
        return false;
    }
@Test
    public void testBPMN2Extension() {
        final ResourceType BPMN2 = ResourceType.BPMN2;

        assertThat(BPMN2.matchesExtension("abc.bpmn")).isTrue();
        assertThat(BPMN2.matchesExtension("abc.bpmn2")).isTrue();
        assertThat(BPMN2.matchesExtension("abc.bpmn-cm")).isTrue();
        assertThat(BPMN2.matchesExtension("abc.bpmn2-cm")).isFalse();
    }