@Test
public void thatEnsureCreateTables() {

    SQLiteDatabase database = mock(SQLiteDatabase.class);
    final int[] numOps = {0};
    doAnswer(new Answer() {
        @Override
        public Object answer(InvocationOnMock invocation) throws Throwable {
            numOps[0]++;
            return null;
        }
    }).when(database).execSQL(any(String.class));
    mMigration.updateDatabase(database);
    assertThat(numOps[0]).isEqualTo(1);
}