@Test
public void testScanContainer() throws Exception {

    Container c = Folder.builder()
            .setUri(TestData.URI_FOLDER1)
            .setParentUri(Uri.parse("content://foo/root"))
            .setName("folder1")
            .build();
    Intent i = new Intent().putExtra(ScannerService.EXTRA_LIBRARY_EXTRAS, LibraryExtras.b()
            .putBundleable(c).get());
    scannerService.onHandleIntent(i);
    Assertions.assertThat(indexDatabase.findTopLevelContainers(null).size()).isEqualTo(1);
    Assertions.assertThat(scannerService.numTotal.get()).isEqualTo(5);
    Assertions.assertThat(scannerService.numProcessed.get()).isEqualTo(5);
    Assertions.assertThat(scannerService.numError.get()).isEqualTo(0);
    List<Track> insertedTracks = indexDatabase.getTracks(null, null);
    Assertions.assertThat(insertedTracks.size()).isEqualTo(5);
}