### Question:
DmaMemory { @Override @Contract(pure = true) public @NotNull String toString() { return "DmaMemory" + "(" + "virtual=0x" + leftPad(virtual) + ", physical=0x" + leftPad(physical) + ")"; }  @Override @Contract(pure = true) @NotNull String toString();  }### Answer:
@Test @DisplayName("toString()") void ToString() { val dma = new DmaMemory(random.nextLong(), random.nextLong()); assertThat(dma.toString()).matches("^DmaMemory\\(virtual=0x[0-9a-f]{16}, physical=0x[0-9a-f]{16}\\)$"); }