### Question:
CypherAsciidocTableConverter { public static String cypher(String asciidoc) { Deque<String> lines = Arrays .stream(asciidoc.split(System.lineSeparator())) .collect(Collectors.toCollection(ArrayDeque::new)); Optional<Integer> maxWidth = lines.stream().map(String::length).max(Integer::compare); int w = maxWidth.get(); String separator = separator(w); String rowCountLine = lines.getLast(); lines.removeLast(); List<String> result = new ArrayList<>(); result.add(separator); result.add(pad(lines.pop(), w)); result.add(separator); while (!lines.isEmpty()) { result.add(pad(lines.pop(), w)); } result.add(separator); result.add(rowCountLine.split("\\|")[1]); result.add(""); return String.join(System.lineSeparator(), result); } private  CypherAsciidocTableConverter(); static String asciidoc(String cypher); static String cypher(String asciidoc); static String separator(int w); static String pad(String s, int w);  }### Answer:
@Test void shouldConvertAsciidocTableToCypher() { String actual = CypherAsciidocTableConverter.cypher(ASCIIDOC); assertEquals(CYPHER, actual); }