### Question:
AsciiArt { public void drawString(String text, String artChar, Settings settings) { BufferedImage image = getImageIntegerMode(settings.width, settings.height); Graphics2D graphics2D = getGraphics2D(image.getGraphics(), settings); graphics2D.drawString(text, 6, ((int) (settings.height * 0.67))); for (int y = 0; y < settings.height; y++) { StringBuilder stringBuilder = new StringBuilder(); for (int x = 0; x < settings.width; x++) { stringBuilder.append(image.getRGB(x, y) == -16777216 ? " " : artChar); } if (stringBuilder.toString() .trim() .isEmpty()) { continue; } System.out.println(stringBuilder); } } AsciiArt(); void drawString(String text, String artChar, Settings settings);  }### Answer:
@Test public void givenTextWithAsciiCharacterAndSettings_shouldPrintAsciiArt() { AsciiArt asciiArt = new AsciiArt(); String text = "BAELDUNG"; Settings settings = asciiArt.new Settings(new Font("SansSerif", Font.BOLD, 24), text.length() * 30, 30); asciiArt.drawString(text, "*", settings); }