ChangePreconditions { static void checkNewValueNotEmpty(ByteString newValue) { checkNotNull(newValue); checkArgument(!newValue.isEmpty(), NEW_VALUE_CANNOT_BE_EMPTY); } private  ChangePreconditions();   }
@Test @DisplayName("not accept empty ByteString value") void failOnEmptyByteString() { ByteString str = ByteString.EMPTY; assertThrows(IllegalArgumentException.class, () -> checkNewValueNotEmpty(str)); }
@Test @DisplayName("not accept empty String value") void failOnEmptyString() { String str = ""; assertThrows(IllegalArgumentException.class, () -> checkNewValueNotEmpty(str)); }