@Test(expected = IOException.class) public void shouldCatchSQLiteExceptionWhenOpeningDatabase() throws Exception { DBOpener dbOpener = mock(DBOpener.class); when(dbOpener.openDatabase(any(File.class))).thenThrow(new SQLiteException("failz")); new Whassup(decryptorFactory, dbProvider, dbOpener).queryMessages(); }
public Cursor queryMessages() throws IOException { return queryMessages(0, -1); }
Whassup { public Cursor queryMessages() throws IOException { return queryMessages(0, -1); } }
Whassup { public Cursor queryMessages() throws IOException { return queryMessages(0, -1); } Whassup(Context context);   Whassup(DecryptorFactory decryptorFactory, DBProvider dbProvider, DBOpener dbOpener); }
Whassup { public Cursor queryMessages() throws IOException { return queryMessages(0, -1); } Whassup(Context context);   Whassup(DecryptorFactory decryptorFactory, DBProvider dbProvider, DBOpener dbOpener); Cursor queryMessages(); Cursor queryMessages(long timestamp, int max); long getMostRecentTimestamp(boolean ignoreGroups); List<WhatsAppMessage> getMessages(long timestamp, int max); List<WhatsAppMessage> getMessages(); boolean hasBackupDB(); }
Whassup { public Cursor queryMessages() throws IOException { return queryMessages(0, -1); } Whassup(Context context);   Whassup(DecryptorFactory decryptorFactory, DBProvider dbProvider, DBOpener dbOpener); Cursor queryMessages(); Cursor queryMessages(long timestamp, int max); long getMostRecentTimestamp(boolean ignoreGroups); List<WhatsAppMessage> getMessages(long timestamp, int max); List<WhatsAppMessage> getMessages(); boolean hasBackupDB();  }