### Question:
HtmlUtils { public static String localiseWithLineBreaks(String[] lines) { final StringBuilder sb; if (Languages.isLeftToRight()) { sb = new StringBuilder("<html><body style='width: 100%'><div align=left>"); } else { sb = new StringBuilder("<html><body style='width: 100%'><div align=right>"); } wrapAndLineBreak(lines, sb); sb.append("</div></body></html>"); return sb.toString(); } private  HtmlUtils(); static String localiseWithLineBreaks(String[] lines); static String localiseWithCenteredLinedBreaks(String[] lines); static String applyBoldFragments(String fragment, String sourceText); static String stripHtml(String html);  }### Answer:
@Test public void testLocaliseWithLineBreaks_LTR() throws Exception { Locale.setDefault(Locale.UK); Configurations.currentConfiguration = new Configuration(); String[] lines = new String[] { "Line 1", "Line 2", "Line 3", }; String expected = "<html><body style='width: 100%'><div align=left><p>Line 1</p><br><p>Line 2</p><br><p>Line 3</p></div></body></html>"; assertThat(HtmlUtils.localiseWithLineBreaks(lines)).isEqualTo(expected); }
@Test public void testLocaliseWithLineBreaks_RTL() throws Exception { Configurations.currentConfiguration = new Configuration(); Configurations.currentConfiguration.getLanguage().setLocale((new Locale("ar","SA"))); String[] lines = new String[] { "Line 1", "Line 2", "Line 3", }; String expected = "<html><body style='width: 100%'><div align=right><p>Line 1</p><br><p>Line 2</p><br><p>Line 3</p></div></body></html>"; assertThat(HtmlUtils.localiseWithLineBreaks(lines)).isEqualTo(expected); }