@Test @DisplayName("Create output creates throws up if string is short") void createOutputThrows() { assertThatThrownBy(() -> Escape.createOutput(new StringBuilder("a"), "a")) .isInstanceOf(IllegalArgumentException.class); }
static StringBuilder createOutput(StringBuilder sb, String string) { if (sb.length() < 2) { throw new IllegalArgumentException(string + " has to be at least two characters long."); } return new StringBuilder(); }
Escape { static StringBuilder createOutput(StringBuilder sb, String string) { if (sb.length() < 2) { throw new IllegalArgumentException(string + " has to be at least two characters long."); } return new StringBuilder(); } }
Escape { static StringBuilder createOutput(StringBuilder sb, String string) { if (sb.length() < 2) { throw new IllegalArgumentException(string + " has to be at least two characters long."); } return new StringBuilder(); }  }
Escape { static StringBuilder createOutput(StringBuilder sb, String string) { if (sb.length() < 2) { throw new IllegalArgumentException(string + " has to be at least two characters long."); } return new StringBuilder(); }   }
Escape { static StringBuilder createOutput(StringBuilder sb, String string) { if (sb.length() < 2) { throw new IllegalArgumentException(string + " has to be at least two characters long."); } return new StringBuilder(); }    }