@Test
public void onUpgradeFromV11() {

    final int oldVersion = 11;
    final int newVersion = DatabaseHelper.DATABASE_VERSION;
    final TableDefaultsCustomizer customizer = mock(TableDefaultsCustomizer.class);
    mPaymentMethodsTable.onUpgrade(mSQLiteDatabase, oldVersion, newVersion, customizer);
    verify(mSQLiteDatabase, atLeastOnce()).execSQL(mSqlCaptor.capture());
    verify(customizer).insertPaymentMethodDefaults(mPaymentMethodsTable);
    assertTrue(mSqlCaptor.getAllValues().get(0).contains(PaymentMethodsTable.TABLE_NAME));
    assertTrue(mSqlCaptor.getAllValues().get(0).contains(PaymentMethodsTable.COLUMN_ID));
    assertTrue(mSqlCaptor.getAllValues().get(0).contains(PaymentMethodsTable.COLUMN_METHOD));
    assertEquals(mSqlCaptor.getAllValues().get(0), "CREATE TABLE paymentmethods (id INTEGER PRIMARY KEY AUTOINCREMENT, method TEXT);");
    assertEquals(mSqlCaptor.getAllValues().get(1), "ALTER TABLE " + mPaymentMethodsTable.getTableName() + " ADD drive_sync_id TEXT");
    assertEquals(mSqlCaptor.getAllValues().get(2), "ALTER TABLE " + mPaymentMethodsTable.getTableName() + " ADD drive_is_synced BOOLEAN DEFAULT 0");
    assertEquals(mSqlCaptor.getAllValues().get(3), "ALTER TABLE " + mPaymentMethodsTable.getTableName() + " ADD drive_marked_for_deletion BOOLEAN DEFAULT 0");
    assertEquals(mSqlCaptor.getAllValues().get(4), "ALTER TABLE " + mPaymentMethodsTable.getTableName() + " ADD last_local_modification_time DATE");
    assertEquals(mSqlCaptor.getAllValues().get(5), "ALTER TABLE " + mPaymentMethodsTable.getTableName() + " ADD COLUMN custom_order_id INTEGER DEFAULT 0");
}