### Question:
DefaultGetResolver extends GetResolver<T> { @NonNull @Override public Cursor performGet(@NonNull StorIOSQLite storIOSQLite, @NonNull RawQuery rawQuery) { return storIOSQLite.lowLevel().rawQuery(rawQuery); }  @NonNull @Override Cursor performGet(@NonNull StorIOSQLite storIOSQLite, @NonNull RawQuery rawQuery); @NonNull @Override Cursor performGet(@NonNull StorIOSQLite storIOSQLite, @NonNull Query query);  }### Answer:
@Test public void rawQuery() { final StorIOSQLite storIOSQLite = mock(StorIOSQLite.class); final StorIOSQLite.LowLevel lowLevel = mock(StorIOSQLite.LowLevel.class); final RawQuery rawQuery = RawQuery.builder() .query("test sql") .build(); final Cursor expectedCursor = mock(Cursor.class); when(storIOSQLite.lowLevel()) .thenReturn(lowLevel); when(lowLevel.rawQuery(rawQuery)) .thenReturn(expectedCursor); final DefaultGetResolver<TestItem> defaultGetResolver = new DefaultGetResolver<TestItem>() { @NonNull @Override public TestItem mapFromCursor(@NonNull StorIOSQLite storIOSQLite, @NonNull Cursor cursor) { return mock(TestItem.class); } }; final Cursor actualCursor = defaultGetResolver.performGet(storIOSQLite, rawQuery); verify(lowLevel, times(1)).rawQuery(any(RawQuery.class)); verify(lowLevel, times(1)).rawQuery(rawQuery); assertThat(actualCursor).isSameAs(expectedCursor); }
@Test public void query() { final StorIOSQLite storIOSQLite = mock(StorIOSQLite.class); final StorIOSQLite.LowLevel lowLevel = mock(StorIOSQLite.LowLevel.class); final Query query = Query.builder() .table("test_table") .build(); final Cursor expectedCursor = mock(Cursor.class); when(storIOSQLite.lowLevel()) .thenReturn(lowLevel); when(lowLevel.query(query)) .thenReturn(expectedCursor); final DefaultGetResolver<TestItem> defaultGetResolver = new DefaultGetResolver<TestItem>() { @NonNull @Override public TestItem mapFromCursor(@NonNull StorIOSQLite storIOSQLite, @NonNull Cursor cursor) { return mock(TestItem.class); } }; final Cursor actualCursor = defaultGetResolver.performGet(storIOSQLite, query); verify(lowLevel, times(1)).query(any(Query.class)); verify(lowLevel, times(1)).query(query); assertThat(actualCursor).isSameAs(expectedCursor); }