LevelsFactory { public Set<Class<? extends Levels>> getAllLevelsInPackage() { Reflections reflections = new Reflections(LevelsFactory.class.getPackage().getName()); return reflections.getSubTypesOf(Levels.class); }  Set<Class<? extends Levels>> getAllLevelsInPackage(); Levels getGameLevels(FigureQueue playerQueue, String levels);  }
@Test public void shouldReturnAllLevels(){ Set<Class<? extends Levels>> levels = factory.getAllLevelsInPackage(); assertThat(levels).contains(EasyLevels.class, HardLevels.class, AllFigureLevels.class); }