//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldThrowOnIndexExistsWithMismatchingConfiguration()
        public virtual void ShouldThrowOnIndexExistsWithMismatchingConfiguration()
        {
            // given
            ExplicitIndexTransactionStateImpl state = NewExplicitIndexTxState();

            when(_provider.configMatches(anyMap(), anyMap())).thenReturn(false);

            // when
            try
            {
                state.CheckIndexExistence(IndexEntityType.Node, "name", _config);
                fail("Should've failed");
            }
            catch (System.ArgumentException)
            {               // then good
            }
            try
            {
                state.CheckIndexExistence(IndexEntityType.Node, "name", _config);
                fail("Should have failed");
            }
            catch (System.ArgumentException)
            {               // then good
            }
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldReportIndexExists()
        public virtual void ShouldReportIndexExists()
        {
            // given
            ExplicitIndexTransactionStateImpl state = NewExplicitIndexTxState();

            // when
            bool nodeExists = state.CheckIndexExistence(IndexEntityType.Node, "name", null);
            bool relExists  = state.CheckIndexExistence(IndexEntityType.Relationship, "name", null);

            // then
            assertTrue(nodeExists);
            assertTrue(relExists);
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldReportIndexExistsWithMatchingConfiguration()
        public virtual void ShouldReportIndexExistsWithMatchingConfiguration()
        {
            // given
            ExplicitIndexTransactionStateImpl state = NewExplicitIndexTxState();

            when(_provider.configMatches(anyMap(), anyMap())).thenReturn(true);

            // when
            bool nodeExists = state.CheckIndexExistence(IndexEntityType.Node, "name", _config);
            bool relExists  = state.CheckIndexExistence(IndexEntityType.Node, "name", _config);

            // then
            assertTrue(nodeExists);
            assertTrue(relExists);
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldReportIndexDoesNotExist()
        public virtual void ShouldReportIndexDoesNotExist()
        {
            // given
            ExplicitIndexTransactionStateImpl state = NewExplicitIndexTxState();

            when(_indexConfigStore.get(any(typeof(Type)), anyString())).thenReturn(null);

            // when
            bool exists = state.CheckIndexExistence(IndexEntityType.Relationship, "name", null);

            // then
            assertFalse(exists);
        }