private void assertUpdatedSnapshotVersionMetadata( String artifactId, String version, String expectedDate,
String expectedTime, String expectedBuildNumber )
throws Exception
{
ManagedRepositoryContent testRepo = createTestRepoContent();
VersionedReference reference = new VersionedReference();
reference.setGroupId( "org.apache.archiva.metadata.tests" );
reference.setArtifactId( artifactId );
reference.setVersion( version );
prepTestRepo( testRepo, reference );
tools.updateMetadata( testRepo, reference );
StringBuilder buf = new StringBuilder();
buf.append( "<metadata>\n" );
buf.append( " <groupId>" ).append( reference.getGroupId() ).append( "</groupId>\n" );
buf.append( " <artifactId>" ).append( reference.getArtifactId() ).append( "</artifactId>\n" );
buf.append( " <version>" ).append( reference.getVersion() ).append( "</version>\n" );
buf.append( " <versioning>\n" );
buf.append( " <snapshot>\n" );
buf.append( " <buildNumber>" ).append( expectedBuildNumber ).append( "</buildNumber>\n" );
buf.append( " <timestamp>" );
buf.append( expectedDate ).append( "." ).append( expectedTime );