//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void keysIteratorFailsWhenMapIsClosed()
        internal virtual void KeysIteratorFailsWhenMapIsClosed()
        {
            _map.putAll(newWithKeysValues(0, 10, 1, 11, 2, 12));

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.eclipse.collections.api.iterator.MutableLongIterator iter = map.longIterator();
            MutableLongIterator iter = _map.longIterator();

            assertTrue(iter.hasNext());
            assertEquals(0, iter.next());

            _map.close();

            assertThrows(typeof(ConcurrentModificationException), iter.hasNext);
            assertThrows(typeof(ConcurrentModificationException), iter.next);
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void keysIterator()
        internal virtual void KeysIterator()
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.eclipse.collections.api.set.primitive.LongSet keys = org.eclipse.collections.impl.factory.primitive.LongSets.immutable.of(0L, 1L, 2L, 42L);
            LongSet keys = LongSets.immutable.of(0L, 1L, 2L, 42L);

            keys.forEach(k => _map.put(k, k * 10));

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.eclipse.collections.api.iterator.MutableLongIterator iter = map.longIterator();
            MutableLongIterator iter = _map.longIterator();
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.eclipse.collections.api.set.primitive.MutableLongSet found = new org.eclipse.collections.impl.set.mutable.primitive.LongHashSet();
            MutableLongSet found = new LongHashSet();

            while (iter.hasNext())
            {
                found.add(iter.next());
            }

            assertEquals(keys, found);
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private static void verifyConstraintOn(org.eclipse.collections.impl.list.mutable.primitive.LongArrayList nodeIds, org.neo4j.storageengine.api.NodePropertyAccessor nodePropertyAccessor, org.neo4j.storageengine.api.schema.StoreIndexDescriptor descriptor) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
        private static void VerifyConstraintOn(LongArrayList nodeIds, NodePropertyAccessor nodePropertyAccessor, StoreIndexDescriptor descriptor)
        {
            MutableMap <Value, long> points = Maps.mutable.empty();
            MutableLongIterator      iter   = nodeIds.longIterator();

            try
            {
                while (iter.hasNext())
                {
                    long  id    = iter.next();
                    Value value = nodePropertyAccessor.GetNodePropertyValue(id, descriptor.Schema().PropertyId);
                    long? other = points.getIfAbsentPut(value, id);
                    if (other.Value != id)
                    {
                        throw new IndexEntryConflictException(other.Value, id, value);
                    }
                }
            }
            catch (EntityNotFoundException e)
            {
                throw new Exception("Failed to validate uniqueness constraint", e);
            }
        }