void () { Path enumPath = myTempDirectory.newDirectoryPath().resolve("test.enum"); SimpleStringPersistentEnumerator enumerator = new SimpleStringPersistentEnumerator(enumPath); try { enumerator.enumerate("qwe\nasd"); fail("SimpleStringPersistentEnumerator must throw exception on multi-line strings"); } catch (RuntimeException e) { assertThat( e.getMessage(), startsWith("SimpleStringPersistentEnumerator doesn't support multi-line strings") ); } }