@@ -31,6 +31,8 @@ public MapGenerator(boolean allowNullValues) {
31
31
32
32
@ Override
33
33
protected Map <String , String > create (Entry <String , String >[] entries ) {
34
+ // This is not completely accurate: Because LinkedTreeMap has no constructor which accepts
35
+ // existing entries, this has to add the entries individually with `Map#put`
34
36
var map = new LinkedTreeMap <String , String >(allowNullValues );
35
37
for (var entry : entries ) {
36
38
map .put (entry .getKey (), entry .getValue ());
@@ -47,8 +49,6 @@ private static Feature<?>[] createFeatures(Feature<?>... additionalFeatures) {
47
49
new ArrayList <Feature <?>>(
48
50
List .of (
49
51
CollectionSize .ANY ,
50
- // Note: There is current a Guava bug which causes 'null additions' to not be tested
51
- // if 'null queries' is enabled, see https://github.com/google/guava/issues/7401
52
52
MapFeature .ALLOWS_ANY_NULL_QUERIES ,
53
53
MapFeature .RESTRICTS_KEYS , // Map only allows comparable keys
54
54
MapFeature .SUPPORTS_PUT ,
@@ -74,7 +74,8 @@ public static Test suite() {
74
74
.named ("nullValues=false" )
75
75
.createTestSuite ();
76
76
77
- TestSuite testSuite = new TestSuite ("LinkedTreeMap" );
77
+ // Use qualified class name to make it easier to find this test class in the IDE
78
+ TestSuite testSuite = new TestSuite (LinkedTreeMapSuiteTest .class .getName ());
78
79
testSuite .addTest (nullValuesSuite );
79
80
testSuite .addTest (nonNullValuesSuite );
80
81
0 commit comments