LoremIpsum { public String generateParagraph(boolean optStartWithLorem) { Double paragraphLengthDbl = randomNormal(this.paragraphMean, this.paragraphSigma); int paragraphLength = Math.max((int) Math.floor(paragraphLengthDbl), 1); List<String> paragraph = new ArrayList<String>(); boolean startWithLorem = optStartWithLorem; while (paragraph.size() < paragraphLength) { String sentence = this.generateSentence(startWithLorem); paragraph.add(sentence); startWithLorem = false; } StringBuffer result = new StringBuffer(); for (String sentence : paragraph) { result.append(sentence); result.append(" "); } return result.toString(); } LoremIpsum();  LoremIpsum(String sample, String dictionary);  LoremIpsum(String sample, String[] newDictionary);  LoremIpsum(String sample); String generateParagraph(boolean optStartWithLorem); String generateSentence(boolean optStartWithLorem); String getSample(); void setSample(String sample); String getDictionary(); void setDictionary(String dictionary); static double mean(int[] values); static double mean(double[] values); static double variance(double[] values); static double sigma(int[] values); static double sigma(double[] values); static int sum(int[] values); static double sum(double[] values); static boolean contains(String[] array, String val); String generateParagraphsHtml(int quantity, boolean startWithLorem); void generateParagraphsHtml(Appendable writer, int quantity, boolean startWithLorem); String generateOneParagraphHtml(int quantity, boolean startWithLorem); String generateParagraphsFullHtml(int quantity, boolean startWithLorem); void generateParagraphsFullHtml(Appendable writer, int quantity, boolean startWithLorem); String generateParagraphsPlainText(int quantity, boolean startWithLorem); void generateParagraphsPlainText(Appendable writer, int quantity, boolean startWithLorem); String generateParagraphsPlainText(int quantity, int maxCols, boolean startWithLorem); void generateParagraphsPlainText(Appendable writer, int quantity, int maxCols, boolean startWithLorem);  }
@Test public void testGenerateLoreIpsum() { LOG.debug("Generate new Lore Ipsum text: "); LoremIpsum ipsum = new LoremIpsum(); String[] newParagraphs = new String[4]; for (int i = 0; i < newParagraphs.length; i++) { newParagraphs[i] = ipsum.generateParagraph(false); LOG.debug(newParagraphs[i]); LOG.debug(""); LOG.debug(""); } }