    @Test
    public void testCreateIndexDB() throws Exception {

        assertThat(javadocLocation, notNullValue());
        final IndexData indexData = JavadocSupport.findIndexFile(javadocLocation);
        final List<SearchIndexValue> indexValues = JavadocSupport.findSearchIndexValues(indexData.getFilesToIndex());
        final String docFileRoot = FilenameUtils.concat(temporaryFolder.getRoot().getPath(), "Foo");
        final String dbDirName = DocSetSupport.getDBDir(docFileRoot);
        final File dbDir = getFile(dbDirName);
        FileUtils.forceMkdir(dbDir);
        DBSupport.createIndex(indexValues, dbDirName);
        final File dbFile = getFile(dbDir, "docSet.dsidx");
        assertTrue("DB file does not exist", dbFile.exists());

        final Map<String, Integer> expectedTypes = ExpectedDataUtil.getExpectedData().getExpectedDataBaseTypes();
        try (final Connection connection = DriverManager.getConnection("jdbc:sqlite:" + dbFile);
             final PreparedStatement stmt = connection.prepareStatement(QUERY)){

            for (Map.Entry<String, Integer> expectedEntry : expectedTypes.entrySet()) {
                stmt.setString(1, expectedEntry.getKey());
                try (final ResultSet rs = stmt.executeQuery()) {
                    while (rs.next()) {
                        final int count = rs.getInt(1);
                        assertThat(expectedEntry.getValue().intValue(), is(count));
                    }
                }
            }
        }
    }