void () { getSettings().WRAP_LONG_LINES = true; getSettings().getRootSettings().FORMATTER_TAGS_ENABLED = true; getSettings().RIGHT_MARGIN = 80; doTextTest( """ package com.acme; public class Test { @Override public boolean equals(Object obj) { String direction = " "; String humanId = " "; String instrument = " "; String price = " "; String quantity = " "; String stopLoss = " "; String thatsDirection = ""; return 0 < 0 + (direction != null && thatsDirection != null ? direction.equalsIgnoreCase(thatsDirection) ? 1 : -100 : 0) // @formatter:off + (humanId != null && thatsDirection != null ? humanId.equalsIgnoreCase(thatsDirection) ? 1 : -100 : 0) + (instrument != null && thatsDirection != null ? instrument.equals(thatsDirection) ? 1 : -100 : 0) + (price != null && thatsDirection != null ? price.equals(thatsDirection) ? 1 : -100 : 0) // @formatter:on + (quantity != null && thatsDirection != null ? quantity.equals(thatsDirection) ? 1 : -100 : 0) + (stopLoss != null && thatsDirection != null ? stopLoss.equals(thatsDirection) ? 1 : -100 : 0); } }""", """ package com.acme; public class Test { @Override public boolean equals(Object obj) { String direction = " "; String humanId = " "; String instrument = " "; String price = " "; String quantity = " "; String stopLoss = " "; String thatsDirection = ""; return 0 < 0 + (direction != null && thatsDirection != null ? direction.equalsIgnoreCase(thatsDirection) ? 1 : -100 : 0) // @formatter:off + (humanId != null && thatsDirection != null ? humanId.equalsIgnoreCase(thatsDirection) ? 1 : -100 : 0) + (instrument != null && thatsDirection != null ? instrument.equals(thatsDirection) ? 1 : -100 : 0) + (price != null && thatsDirection != null ? price.equals(thatsDirection) ? 1 : -100 : 0) // @formatter:on + (quantity != null && thatsDirection != null ? quantity.equals(thatsDirection) ? 1 : -100 : 0) + (stopLoss != null && thatsDirection != null ? stopLoss.equals(thatsDirection) ? 1 : -100 : 0); } }""" ); }