### Question:
ReadmeGenerator { String createDocument(Iterable<String> paragraphs) { StringBuilder sb = new StringBuilder(RTF_HEADER); for (String p : paragraphs) { sb.append("{\\sa80 "); appendEscaped(sb, p); sb.append("}\\par \n"); } sb.append(RTF_FOOTER); return sb.toString(); } @Inject  ReadmeGenerator(ResourceBundle resourceBundle); String createVaultStorageLocationReadmeRtf(); String createVaultAccessLocationReadmeRtf();  }### Answer:
@Test public void testCreateDocument() { ReadmeGenerator readmeGenerator = new ReadmeGenerator(null); Iterable<String> paragraphs = List.of( "Dear User,", "\\b please don't touch the \"d\" directory.", "Thank you for your cooperation \uD83D\uDE09" ); String result = readmeGenerator.createDocument(paragraphs); MatcherAssert.assertThat(result, CoreMatchers.startsWith("{\\rtf1\\fbidis\\ansi\\uc0\\fs32")); MatcherAssert.assertThat(result, CoreMatchers.containsString("{\\sa80 Dear User,}\\par")); MatcherAssert.assertThat(result, CoreMatchers.containsString("{\\sa80 \\b please don't touch the \"d\" directory.}\\par ")); MatcherAssert.assertThat(result, CoreMatchers.containsString("{\\sa80 Thank you for your cooperation \\u55357\\u56841}\\par")); MatcherAssert.assertThat(result, CoreMatchers.endsWith("}")); }