public static Collection<String> getResourcesByExtension(String extension) {
        return Arrays.stream(getClassPathElements())
                .flatMap(elem -> internalGetResources(elem, Pattern.compile(".*\\." + extension + "$"))
                        .stream())
                .collect(Collectors.toSet());
    }
@Test
    public void getResourcesByExtensionTest() {
        Collection<String> resources = getResourcesByExtension("txt");
        assertThat(resources)
                .hasSize(2)
                .allMatch(elem -> elem.endsWith(TEST_FILE));
    }