void () { getSettings().KEEP_SIMPLE_BLOCKS_IN_ONE_LINE = true; getSettings().SPACE_WITHIN_BRACES = true; String before = """ try { System.out.println("AA!"); } catch (Exception e) { System.out.println("AA!"); }"""; String endOfLine = """ try { System.out.println("AA!"); } catch (Exception e) { System.out.println("AA!"); }"""; String nextLine = """ try { System.out.println("AA!"); } catch (Exception e) { System.out.println("AA!"); }"""; String nextLineShifted = """ try { System.out.println("AA!"); } catch (Exception e) { System.out.println("AA!"); }"""; String nextLineShiftedEach = """ try { System.out.println("AA!"); } catch (Exception e) { System.out.println("AA!"); }"""; checkFormatterWithDifferentBraceStyles(before, endOfLine, nextLine, nextLineShifted, nextLineShiftedEach); }