### Question:
MultiplexingJdbcRecordHandler extends JdbcRecordHandler { @Override public void readWithConstraint( final BlockSpiller blockSpiller, final ReadRecordsRequest readRecordsRequest, QueryStatusChecker queryStatusChecker) { validateMultiplexer(readRecordsRequest.getCatalogName()); this.recordHandlerMap.get(readRecordsRequest.getCatalogName()).readWithConstraint(blockSpiller, readRecordsRequest, queryStatusChecker); } MultiplexingJdbcRecordHandler(); @VisibleForTesting  MultiplexingJdbcRecordHandler(final AmazonS3 amazonS3, final AWSSecretsManager secretsManager, final AmazonAthena athena, final JdbcConnectionFactory jdbcConnectionFactory,
            final DatabaseConnectionConfig databaseConnectionConfig, final Map<String, JdbcRecordHandler> recordHandlerMap); @Override void readWithConstraint(
            final BlockSpiller blockSpiller,
            final ReadRecordsRequest readRecordsRequest, QueryStatusChecker queryStatusChecker); @Override PreparedStatement buildSplitSql(Connection jdbcConnection, String catalogName, TableName tableName, Schema schema, Constraints constraints, Split split);  }### Answer:
@Test public void readWithConstraint() { BlockSpiller blockSpiller = Mockito.mock(BlockSpiller.class); ReadRecordsRequest readRecordsRequest = Mockito.mock(ReadRecordsRequest.class); Mockito.when(readRecordsRequest.getCatalogName()).thenReturn("mysql"); this.jdbcRecordHandler.readWithConstraint(blockSpiller, readRecordsRequest, queryStatusChecker); Mockito.verify(this.mySqlRecordHandler, Mockito.times(1)).readWithConstraint(Mockito.eq(blockSpiller), Mockito.eq(readRecordsRequest), Mockito.eq(queryStatusChecker)); }
@Test(expected = RuntimeException.class) public void readWithConstraintWithUnsupportedCatalog() { BlockSpiller blockSpiller = Mockito.mock(BlockSpiller.class); ReadRecordsRequest readRecordsRequest = Mockito.mock(ReadRecordsRequest.class); Mockito.when(readRecordsRequest.getCatalogName()).thenReturn("unsupportedCatalog"); this.jdbcRecordHandler.readWithConstraint(blockSpiller, readRecordsRequest, queryStatusChecker); }