void (@NotNull Class<?> testClass) { rethrowExceptions(() -> { Object instance = testClass.getDeclaredConstructor().newInstance(); Method method = testClass.getMethod("test"); method.invoke(instance); }); }