void () { // Inspired by IDEA-65433 getSettings().KEEP_SIMPLE_CLASSES_IN_ONE_LINE = true; String[] tests = { "class Test {}", "interface Test {}", """ class Test { void test() { new Object() {}; } }""", """ class Test { void test() { bind(new TypeLiteral<MyType>() {}).toProvider(MyProvider.class); } }""" }; for (String test : tests) { doTextTest(test, test); } }