void (@NotNull final AbstractTestProxy method, @NotNull final String functionName) { if (functionName.endsWith("test_metheggs")) { Assert.assertThat("Method output is broken", MockPrinter.fillPrinter(method).getStdOut().trim(), Matchers.containsString("I am method")); } else if (functionName.endsWith("test_funeggs")) { Assert.assertThat("Function output is broken", MockPrinter.fillPrinter(method).getStdOut().trim(), Matchers.containsString("I am function")); } else if (functionName.endsWith("test_first") || functionName.endsWith("test_second")) { // No output expected } else { throw new AssertionError("Unknown function " + functionName); } }