void (@NotNull Image img1, @NotNull Image img2, @Nullable String errMsgPrefix) { StringBuilder sb = new StringBuilder(errMsgPrefix == null ? "images mismatch: " : errMsgPrefix); if (!compare(img1, img2, sb)) { throw new AssertionError(sb.toString()); } }