### Question:
DeferringStatementLocksFactory implements StatementLocksFactory, LoadableConfig { @Override public StatementLocks newInstance() { if ( locks == null ) { throw new IllegalStateException( "Factory has not been initialized" ); } Locks.Client client = locks.newClient(); return deferredLocksEnabled ? new DeferringStatementLocks( client ) : new SimpleStatementLocks( client ); }  @Override void initialize( Locks locks, Config config ); @Override StatementLocks newInstance(); @Internal
    @Description( "Enable deferring of locks to commit time. This feature weakens the isolation level. " +
                  "It can result in both domain and storage level inconsistencies." )
    static final Setting<Boolean> deferred_locks_enabled; }### Answer:
@Test public void newInstanceThrowsWhenNotInitialized() { DeferringStatementLocksFactory factory = new DeferringStatementLocksFactory(); try { factory.newInstance(); fail( "Exception expected" ); } catch ( Exception e ) { assertThat( e, instanceOf( IllegalStateException.class ) ); } }