@MapFeature.Require(absent = ALLOWS_NULL_KEYS) @CollectionSize.Require(absent = ZERO) public void testCreateWithNullKeyUnsupported() { try { initMapWithNullKey(); fail("Creating a map containing a null key should fail"); } catch (NullPointerException expected) { } }
@MapFeature.Require(absent = ALLOWS_NULL_VALUES) @CollectionSize.Require(absent = ZERO) public void testCreateWithNullValueUnsupported() { try { initMapWithNullValue(); fail("Creating a map containing a null value should fail"); } catch (NullPointerException expected) { } }
@MapFeature.Require({ALLOWS_NULL_KEYS, REJECTS_DUPLICATES_AT_CREATION}) @CollectionSize.Require(absent = {ZERO, ONE}) public void testCreateWithDuplicates_nullDuplicatesRejected() { Entry<K, V>[] entries = getEntriesMultipleNullKeys(); try { resetMap(entries); fail("Should reject duplicate null elements at creation"); } catch (IllegalArgumentException expected) { } }
@MapFeature.Require(REJECTS_DUPLICATES_AT_CREATION) @CollectionSize.Require(absent = {ZERO, ONE}) public void testCreateWithDuplicates_nonNullDuplicatesRejected() { Entry<K, V>[] entries = getEntriesMultipleNonNullKeys(); try { resetMap(entries); fail("Should reject duplicate non-null elements at creation"); } catch (IllegalArgumentException expected) { } }
@MapFeature.Require(absent = ALLOWS_NULL_VALUES) @CollectionSize.Require(absent = ZERO) public void testCreateWithNullValueUnsupported() { try { initMapWithNullValue(); fail("Creating a map containing a null value should fail"); } catch (NullPointerException expected) { } }
@MapFeature.Require(absent = ALLOWS_NULL_KEYS) @CollectionSize.Require(absent = ZERO) public void testCreateWithNullKeyUnsupported() { try { initMapWithNullKey(); fail("Creating a map containing a null key should fail"); } catch (NullPointerException expected) { } }
@MapFeature.Require(absent = ALLOWS_NULL_KEYS) @CollectionSize.Require(absent = ZERO) public void testCreateWithNullKeyUnsupported() { try { initMapWithNullKey(); fail("Creating a map containing a null key should fail"); } catch (NullPointerException expected) { } }
@MapFeature.Require(absent = ALLOWS_NULL_VALUES) @CollectionSize.Require(absent = ZERO) public void testCreateWithNullValueUnsupported() { try { initMapWithNullValue(); fail("Creating a map containing a null value should fail"); } catch (NullPointerException expected) { } }
@MapFeature.Require({ALLOWS_NULL_KEYS, REJECTS_DUPLICATES_AT_CREATION}) @CollectionSize.Require(absent = {ZERO, ONE}) public void testCreateWithDuplicates_nullDuplicatesRejected() { Entry<K, V>[] entries = getEntriesMultipleNullKeys(); try { resetMap(entries); fail("Should reject duplicate null elements at creation"); } catch (IllegalArgumentException expected) { } }
@MapFeature.Require(REJECTS_DUPLICATES_AT_CREATION) @CollectionSize.Require(absent = {ZERO, ONE}) public void testCreateWithDuplicates_nonNullDuplicatesRejected() { Entry<K, V>[] entries = getEntriesMultipleNonNullKeys(); try { resetMap(entries); fail("Should reject duplicate non-null elements at creation"); } catch (IllegalArgumentException expected) { } }
@MapFeature.Require({ALLOWS_NULL_KEYS, REJECTS_DUPLICATES_AT_CREATION}) @CollectionSize.Require(absent = {ZERO, ONE}) public void testCreateWithDuplicates_nullDuplicatesRejected() { Entry<K, V>[] entries = getEntriesMultipleNullKeys(); try { resetMap(entries); fail("Should reject duplicate null elements at creation"); } catch (IllegalArgumentException expected) { } }
@MapFeature.Require(REJECTS_DUPLICATES_AT_CREATION) @CollectionSize.Require(absent = {ZERO, ONE}) public void testCreateWithDuplicates_nonNullDuplicatesRejected() { Entry<K, V>[] entries = getEntriesMultipleNonNullKeys(); try { resetMap(entries); fail("Should reject duplicate non-null elements at creation"); } catch (IllegalArgumentException expected) { } }