### Question:
ToLongNullableImpl implements NullableExpression<T, ToLong<T>>, ToLongNullable<T> { @Override public boolean equals(Object o) { if (this == o) return true; else if (!(o instanceof NullableExpression)) return false; final NullableExpression<?, ?> that = (NullableExpression<?, ?>) o; return Objects.equals(original, that.inner()) && Objects.equals(isNull, that.isNullPredicate()); } ToLongNullableImpl(ToLong<T> original, Predicate<T> isNull); @Override ToLong<T> inner(); @Override Predicate<T> isNullPredicate(); @Override Long apply(T t); @Override long applyAsLong(T t); @Override ToLong<T> orThrow(); @Override ToLong<T> orElseGet(ToLong<T> getter); @Override ToLong<T> orElse(Long value); @Override ToDoubleNullable<T> mapToDoubleIfPresent(LongToDoubleFunction mapper); @Override ToLongNullable<T> mapIfPresent(LongUnaryOperator mapper); @Override long hash(T object); @Override int compare(T first, T second); @Override boolean isNull(T object); @Override boolean isNotNull(T object); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test void testEquals() { final ToLongNullable<String> copy = instance; assertTrue(instance.equals(copy)); assertFalse(instance.equals(null)); final ToLongNullable<String> another = new ToLongNullableImpl<>( instance.inner(), instance.isNullPredicate() ); final ToLongNullable<String> originalSame = new ToLongNullableImpl<>( instance.inner(), Objects::isNull ); final ToLongNullable<String> isNullSame = new ToLongNullableImpl<>( String::length, instance.isNullPredicate() ); assertTrue(instance.equals(another)); assertFalse(instance.equals(originalSame)); assertFalse(instance.equals(isNullSame)); }