### Question:
SpannerConnectionFactoryProvider implements ConnectionFactoryProvider { @Override public boolean supports(ConnectionFactoryOptions connectionFactoryOptions) { Assert.requireNonNull(connectionFactoryOptions, "connectionFactoryOptions must not be null"); String driver = connectionFactoryOptions.getValue(DRIVER); return DRIVER_NAME.equals(driver); }  @Override ConnectionFactory create(ConnectionFactoryOptions connectionFactoryOptions); @Override boolean supports(ConnectionFactoryOptions connectionFactoryOptions); @Override String getDriver(); static final String DRIVER_NAME; static final Option<String> PROJECT; static final Option<String> INSTANCE; static final Option<String> URL; static final Option<Integer> THREAD_POOL_SIZE; static final Option<Integer> PARTIAL_RESULT_SET_FETCH_SIZE; static final Option<Duration> DDL_OPERATION_TIMEOUT; static final Option<Duration> DDL_OPERATION_POLL_INTERVAL; static final Option<GoogleCredentials> GOOGLE_CREDENTIALS; }### Answer:
@Test public void testSupportsThrowsExceptionOnNullOptions() { assertThatThrownBy(() -> { this.spannerConnectionFactoryProvider.supports(null); }).isInstanceOf(IllegalArgumentException.class) .hasMessage("connectionFactoryOptions must not be null"); }
@Test public void testSupportsReturnsFalseWhenNoDriverInOptions() { assertFalse(this.spannerConnectionFactoryProvider.supports( ConnectionFactoryOptions.builder().build())); }
@Test public void testSupportsReturnsFalseWhenWrongDriverInOptions() { assertFalse(this.spannerConnectionFactoryProvider.supports(buildOptions("not spanner"))); }
@Test public void testSupportsReturnsTrueWhenCorrectDriverInOptions() { assertTrue(this.spannerConnectionFactoryProvider.supports(buildOptions("spanner"))); }