assertTrue( "Default Test Repository should exist.", repoDir.exists() && repoDir.isDirectory() );
String repoUri = "file://" + StringUtils.replace( repoDir.getAbsolutePath(), "\\", "/" );
// Create it
ArchivaRepository repo = repoDao.createRepository( "testRepo", "Test Repository", repoUri );
assertNotNull( repo );
// Set some mandatory values
repo.getModel().setCreationSource( "Test Case" );
repo.getModel().setLayoutName( "default" );
// Save it.
ArchivaRepository repoSaved = repoDao.saveRepository( repo );
assertNotNull( repoSaved );
assertNotNull( repoSaved.getModel() );
assertEquals( "testRepo", JDOHelper.getObjectId( repoSaved.getModel() ).toString() );
ArtifactDAO adao = dao.getArtifactDAO();
ArchivaArtifact sqlArtifact = adao.createArtifact( "javax.sql", "jdbc", "2.0", "", "jar" );
sqlArtifact.getModel().setLastModified( new Date() );