Connection databaseConnection = testConfig.createDatabaseConnection();
// Run
TestSqlUtil.runSqlFromResource(databaseConnection, "test.insert.set3.sql");
FileContentSqlDao fileContentDao = new FileContentSqlDao(databaseConnection);
FileContent fileContent1WithChunks = fileContentDao.getFileContent(FileChecksum.parseFileChecksum("eba69a8e359ce3258520138a50ed9860127ab6e0"), true);
FileContent fileContent1WithoutChunks = fileContentDao.getFileContent(FileChecksum.parseFileChecksum("eba69a8e359ce3258520138a50ed9860127ab6e0"), false);
FileContent fileContent2WithChunks = fileContentDao.getFileContent(FileChecksum.parseFileChecksum("254416e71ae50431fc6ced6751075b3366db7cc8"), true);
FileContent fileContent2WithoutChunks = fileContentDao.getFileContent(FileChecksum.parseFileChecksum("254416e71ae50431fc6ced6751075b3366db7cc8"), false);
FileContent fileContentNonExistingWithChunks = fileContentDao.getFileContent(FileChecksum.parseFileChecksum("beefbeefbeefbeefbeefbeefbeefbeefbeefbeef"), true);
FileContent fileContentNonExistingWithoutChunks = fileContentDao.getFileContent(FileChecksum.parseFileChecksum("beefbeefbeefbeefbeefbeefbeefbeefbeefbeef"), false);
FileContent fileContentNullChecksum = fileContentDao.getFileContent(null, false);
// Test
assertNotNull(fileContent1WithChunks);
assertEquals(1, fileContent1WithChunks.getChunks().size());
assertEquals("eba69a8e359ce3258520138a50ed9860127ab6e0", fileContent1WithChunks.getChecksum().toString());