//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void loadSingleAvailableFactory()
        public virtual void LoadSingleAvailableFactory()
        {
            Locks locks = mock(typeof(Locks));
            StatementLocksFactory factory = mock(typeof(StatementLocksFactory));

            StatementLocksFactorySelector loader = NewLoader(locks, factory);

            StatementLocksFactory loadedFactory = loader.Select();

            assertSame(factory, loadedFactory);
            verify(factory).initialize(same(locks), any(typeof(Config)));
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void loadSimpleStatementLocksFactoryWhenNoServices()
        public virtual void LoadSimpleStatementLocksFactoryWhenNoServices()
        {
            Locks        locks       = mock(typeof(Locks));
            Locks_Client locksClient = mock(typeof(Locks_Client));

            when(locks.NewClient()).thenReturn(locksClient);

            StatementLocksFactorySelector loader = NewLoader(locks);

            StatementLocksFactory factory        = loader.Select();
            StatementLocks        statementLocks = factory.NewInstance();

            assertThat(factory, instanceOf(typeof(SimpleStatementLocksFactory)));
            assertThat(statementLocks, instanceOf(typeof(SimpleStatementLocks)));

            assertSame(locksClient, statementLocks.Optimistic());
            assertSame(locksClient, statementLocks.Pessimistic());
        }