From 67336ab2523067e0850f84aac33c860bb715ca34 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Fri, 19 Apr 2024 09:11:49 -0400 Subject: [PATCH] Sort members --- .../apache/commons/lang3/stream/StreamsTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/stream/StreamsTest.java b/src/test/java/org/apache/commons/lang3/stream/StreamsTest.java index 435b02ee7..9ae76bdc5 100644 --- a/src/test/java/org/apache/commons/lang3/stream/StreamsTest.java +++ b/src/test/java/org/apache/commons/lang3/stream/StreamsTest.java @@ -136,6 +136,14 @@ public class StreamsTest extends AbstractLangTest { assertEquals(2, Streams.instancesOf(String.class, objects).collect(Collectors.toList()).size()); } + @Test + public void testNonNull() { + assertEquals(0, Streams.nonNull().collect(Collectors.toList()).size()); + assertEquals(1, Streams.nonNull("A").collect(Collectors.toList()).size()); + assertEquals(1, Streams.nonNull("A", null).collect(Collectors.toList()).size()); + assertEquals(1, Streams.nonNull(null, "A").collect(Collectors.toList()).size()); + } + @Test public void testNullSafeStreamNotNull() { assertEquals(2, Streams.nonNull(Arrays.asList("A", "B")).collect(Collectors.toList()).size()); @@ -203,14 +211,6 @@ public class StreamsTest extends AbstractLangTest { assertEquals(0, Streams.of(input).collect(Collectors.toList()).size()); } - @Test - public void testNonNull() { - assertEquals(0, Streams.nonNull().collect(Collectors.toList()).size()); - assertEquals(1, Streams.nonNull("A").collect(Collectors.toList()).size()); - assertEquals(1, Streams.nonNull("A", null).collect(Collectors.toList()).size()); - assertEquals(1, Streams.nonNull(null, "A").collect(Collectors.toList()).size()); - } - @Test public void testSimpleStreamFilter() { final List input = Arrays.asList("1", "2", "3", "4", "5", "6");