throws Exception
{
Date whenGathered = Calendar.getInstance().getTime();
whenGathered.setTime( 123456789 );
ArchivaArtifact artifact = createArtifact( "org.apache.archiva", "artifact-one", "1.0" );
artifact.getModel().setWhenGathered( null );
artifactDao.saveArtifact( artifact );
artifact = createArtifact( "org.apache.archiva", "artifact-one", "1.0.1" );
artifact.getModel().setWhenGathered( whenGathered );
artifactDao.saveArtifact( artifact );
artifact = createArtifact( "org.apache.archiva", "artifact-one", "1.0.2" );
artifact.getModel().setWhenGathered( whenGathered );
artifactDao.saveArtifact( artifact );
artifact = createArtifact( "org.apache.archiva", "artifact-one", "2.0" );
artifact.getModel().setRepositoryId( "different-repo" );
artifact.getModel().setWhenGathered( whenGathered );
artifactDao.saveArtifact( artifact );
}