@Test
public void testGetVersionByKey() throws Exception
{

    MetadataVersion metadataVersion = new MetadataVersion( "version1", VersionType.ATOMIC );
    metadataVersion.setHashCode( "12345" );
    metadataVersionStore.save( metadataVersion );
    assertEquals( metadataVersion, metadataVersionStore.getVersionByKey( metadataVersionStore.getCurrentVersion().getId() ) );
    int nonExistingId = 9999;
    assertNull( metadataVersionStore.getVersionByKey( nonExistingId ) );
    metadataVersionStore.delete( metadataVersion );
}