void (EffectPainter2D painter, BufferedImage image, String[] content, int offset) { String[] partial = createContent(image, painter, offset); int length = content.length; Assert.assertEquals("content size differs", length, partial.length); for (int i = offset; i < length; i++) { Assert.assertEquals("content differs", content[i], partial[i]); } boolean out = painter == EffectPainter2D.BOLD_DOTTED_UNDERSCORE; // may be painted out of area testContent(partial, offset, out ? null : true); }