### Question:
TableRegisterSupport { public boolean dropTables(@Nonnull final String source, @Nonnull final String entity, @Nonnull final Set<TableType> tableTypes, @Nonnull final Set<String> additionalTables) { for (final TableType tableType : tableTypes) { final String identifier = tableType.deriveQualifiedName(source, entity); if (!dropTable(identifier)) { return false; } } for (final String identifier : additionalTables) { if (!dropTable(identifier)) { return false; } } return true; } TableRegisterSupport(Connection conn, TableRegisterConfiguration configuration);  TableRegisterSupport(Connection conn); protected  TableRegisterSupport(); boolean registerDatabase(String source); boolean registerTable(String source, String tableEntity, ColumnSpec[] feedColumnSpecs, String feedFormatOptions, String targetFormatOptions, ColumnSpec[] partitions, ColumnSpec[]
        columnSpecs, String feedTableProperties, String targetTableProperties, TableType tableType, boolean registerDatabase); boolean registerTable(String source, String tableEntity, ColumnSpec[] feedColumnSpecs, String feedFormatOptions, String targetFormatOptions, ColumnSpec[] partitions, ColumnSpec[]
            columnSpecs, String feedTableProperties, String targetTableProperties, TableType tableType, boolean registerDatabase, String feedTableOverride); Set<String> fetchExisting(String source, String tableEntity); String formatOptionsForType(TableType tableType, String rawSpecification, String targetSpecification); boolean registerStandardTables(String source, String tableEntity, ColumnSpec[] feedColumnSpecs, String feedFormatOptions, String targetFormatOptions, ColumnSpec[] partitions, ColumnSpec[]
        columnSpecs, String feedTblProperties, String targetTblProperties, String feedTblOverride); boolean registerStandardTables(String source, String tableEntity, ColumnSpec[] feedColumnSpecs, String feedFormatOptions, String targetFormatOptions, ColumnSpec[] partitions, ColumnSpec[]
            columnSpecs, String feedTblProperties, String targetTblProperties); boolean dropTable(@Nonnull final String identifier); boolean dropTables(@Nonnull final String source, @Nonnull final String entity, @Nonnull final Set<TableType> tableTypes, @Nonnull final Set<String> additionalTables);  }### Answer:
@Test public void testDropTables() throws Exception { final Statement statement = Mockito.mock(Statement.class); Mockito.when(statement.execute(Mockito.anyString())).then(invocation -> { final String sql = (String) invocation.getArguments()[0]; if (sql.startsWith("DROP TABLE IF EXISTS `invalid`")) { throw new SQLException(); } return true; }); final Connection connection = Mockito.mock(Connection.class); Mockito.when(connection.createStatement()).thenReturn(statement); TableRegisterSupport support = new TableRegisterSupport(connection); Assert.assertTrue(support.dropTables("cat", "feed", EnumSet.of(TableType.MASTER, TableType.VALID, TableType.INVALID), ImmutableSet.of("backup.feed"))); Mockito.verify(statement).execute("DROP TABLE IF EXISTS `cat`.`feed`"); Mockito.verify(statement).execute("DROP TABLE IF EXISTS `cat`.`feed_valid`"); Mockito.verify(statement).execute("DROP TABLE IF EXISTS `cat`.`feed_invalid`"); Mockito.verify(statement).execute("DROP TABLE IF EXISTS backup.feed"); Assert.assertFalse(support.dropTables("invalid", "feed", EnumSet.allOf(TableType.class), ImmutableSet.of())); Assert.assertFalse(support.dropTables("cat", "feed", ImmutableSet.of(), ImmutableSet.of("`invalid`"))); }