TextOutput { void beginRender(MarkupWriter writer) { if (value == null) return; String[] lines = SPLIT_PATTERN.split(value); for (String line : lines) { writer.element("p"); writer.write(line.trim()); writer.end(); } }    }
@Test public void null_value_is_noop() { MarkupWriter writer = mockMarkupWriter(); replay(); TextOutput component = new TextOutput(); component.beginRender(writer); verify(); }