SimpleSQLiteQuery implements SupportSQLiteQuery { @Override public void bindTo(SupportSQLiteProgram statement) { bind(statement, mBindArgs); } SimpleSQLiteQuery(String query, @Nullable Object[] bindArgs);  SimpleSQLiteQuery(String query); @Override String getSql(); @Override void bindTo(SupportSQLiteProgram statement); @Override int getArgCount(); static void bind(SupportSQLiteProgram statement, Object[] bindArgs);  }
@Test public void bindTo_noArgs() { SimpleSQLiteQuery query = new SimpleSQLiteQuery("foo"); SupportSQLiteProgram program = Mockito.mock(SupportSQLiteProgram.class); query.bindTo(program); verifyNoMoreInteractions(program); }
@Test public void bindTo_withArgs() { byte[] bytes = new byte[3]; SimpleSQLiteQuery query = new SimpleSQLiteQuery("foo", new Object[]{"bar", 2, true, .5f, null, bytes}); SupportSQLiteProgram program = Mockito.mock(SupportSQLiteProgram.class); query.bindTo(program); verify(program).bindString(1, "bar"); verify(program).bindLong(2, 2); verify(program).bindLong(3, 1); verify(program).bindDouble(4, .5f); verify(program).bindNull(5); verify(program).bindBlob(6, bytes); verifyNoMoreInteractions(program); }