// verify checksums of jar file
ChecksummedFile checksum =
new ChecksummedFile( new File( repoLocation,
"/org/apache/archiva/artifact-upload/1.0/artifact-upload-1.0-tests.jar" ) );
String sha1 = checksum.calculateChecksum( ChecksumAlgorithm.SHA1 );
String md5 = checksum.calculateChecksum( ChecksumAlgorithm.MD5 );
String contents =
FileUtils.readFileToString( new File( repoLocation,
"/org/apache/archiva/artifact-upload/1.0/artifact-upload-1.0-tests.jar.sha1" ) );
assertTrue( StringUtils.contains( contents, sha1 ) );