Test coverage for Objects.requireNonNull("nonnull", (Supplier) null).

Right now, this invocation does not throw even through the Supplier
argument is annotated as @NonNull. It seems unlikely for a null Supplier
to be null on purpose, so perhaps the method should throw NPE in that
case, but right now it does not.

This CL adds test coverage to ensure that any future behavior change
in this area is not accidental.

Bug: 147419222
Test: atest CtsLibcoreTestCases:libcore.java.util.ObjectsTest

Change-Id: Ibcc7c2d346bef4f373590116fc9b1e0ff693983c
1 file changed