@Test
public void getCategoriesFromJar() {

    JarFile jar = Mockito.mock(JarFile.class);
    Mockito.when(jar.stream()).thenReturn(Stream.of(
            new JarEntry("images/material_design_icons/alert/"),
            new JarEntry("images/material_design_icons/action/ic_3d_rotation_black_24dp.xml"),
            new JarEntry("images/material_design_icons/action/"),
            new JarEntry("images/material_design_icons/")));
    Object actual = MaterialDesignIcons.getCategoriesFromJar(jar);
    assertEquals(Arrays.asList("action", "alert"), actual);
}