### Question:
DeferringStatementLocksFactory implements StatementLocksFactory, LoadableConfig { @Override public void initialize( Locks locks, Config config ) { this.locks = requireNonNull( locks ); this.deferredLocksEnabled = config.get( deferred_locks_enabled ); }  @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 initializeThrowsForNullLocks() { DeferringStatementLocksFactory factory = new DeferringStatementLocksFactory(); try { factory.initialize( null, Config.defaults() ); fail( "Exception expected" ); } catch ( Exception e ) { assertThat( e, instanceOf( NullPointerException.class ) ); } }
@Test public void initializeThrowsForNullConfig() { DeferringStatementLocksFactory factory = new DeferringStatementLocksFactory(); try { factory.initialize( mock( Locks.class ), null ); fail( "Exception expected" ); } catch ( Exception e ) { assertThat( e, instanceOf( NullPointerException.class ) ); } }