void () { String lorem = new LoremGenerator().generate(10, true).toLowerCase(); List<String> wordsIn = StringUtil.getWordsIn(lorem); Sets.SetView<String> difference = Sets.difference(Sets.newHashSet(LoremGenerator.COMMON_P), Sets.newHashSet(wordsIn)); assertTrue("Following words were not used in lorem: " + difference.toString(), difference.isEmpty()); }