StringMismatch { public static ValueMismatch unexpectedValue(String expected, String actual, String newValue, int version) { checkNotNull(expected); checkNotNull(actual); checkNotNull(newValue); checkNotEqual(expected, actual); return of(expected, actual, newValue, version); } private  StringMismatch(); static ValueMismatch expectedEmpty(String actual, String newValue, int version); static ValueMismatch expectedNotEmpty(String expected, int version); static ValueMismatch unexpectedValue(String expected, String actual,
                                                String newValue, int version); static String unpackExpected(ValueMismatch mismatch); static String unpackActual(ValueMismatch mismatch); static String unpackNewValue(ValueMismatch mismatch);  }
@Test @DisplayName("not accept same expected and actual values") void notAcceptSameExpectedAndActual() { String value = "same-same"; assertThrows(IllegalArgumentException.class, () -> unexpectedValue(value, value, NEW_VALUE, VERSION)); }