List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
assertNotNull( "Unprocessed Results should not be null.", unprocessedResultList );
assertEquals( "Incorrect number of unprocessed artifacts detected.", 1, unprocessedResultList.size() );
// Execute the database task.
DatabaseTask dataTask = new DatabaseTask();
taskExecutor.executeTask( dataTask );
// Test for artifact existance.
artifactList = adao.queryArtifacts( null );
assertNotNull( "Artifact list should not be null.", artifactList );