DefaultMetadataVersionService implements MetadataVersionService { @Override @Transactional( readOnly = true ) public MetadataVersion getInitialVersion() { try { return versionStore.getInitialVersion(); } catch ( Exception ex ) { log.error( ex.getMessage(), ex ); throw new MetadataVersionServiceException( ex.getMessage(), ex ); } } DefaultMetadataVersionService( MetadataVersionStore metadataVersionStore,
        MetadataExportService metadataExportService, MetadataKeyJsonService metaDataKeyJsonService,
        NodeService nodeService, MetadataSystemSettingService metadataSystemSettingService,
        RenderService renderService ); @Override @Transactional long addVersion( MetadataVersion version ); @Override @Transactional void updateVersion( MetadataVersion version ); @Override @Transactional void updateVersionName( long id, String name ); @Override @Transactional void deleteVersion( MetadataVersion version ); @Override @Transactional( readOnly = true ) MetadataVersion getVersionById( long id ); @Override @Transactional( readOnly = true ) MetadataVersion getVersionByName( String versionName ); @Override @Transactional( readOnly = true ) List<MetadataVersion> getAllVersions(); @Override @Transactional( readOnly = true ) MetadataVersion getCurrentVersion(); @Override @Transactional( readOnly = true ) MetadataVersion getInitialVersion(); @Override @Transactional( readOnly = true ) List<MetadataVersion> getAllVersionsInBetween( Date startDate, Date endDate ); @Override @Transactional( readOnly = true ) Date getCreatedDate( String versionName ); @Override @Transactional synchronized boolean saveVersion( VersionType versionType ); @Override @Transactional( readOnly = true ) String getVersionData( String versionName ); @Override @Transactional void createMetadataVersionInDataStore( String versionName, String versionSnapshot ); @Override @Transactional void deleteMetadataVersionInDataStore( String nameSpaceKey ); @Override boolean isMetadataPassingIntegrity( MetadataVersion version, String versionSnapshot );  }
@Test public void testGetInitialVersion() { versionService.addVersion( versionA ); sleepFor( 100 ); versionService.addVersion( versionB ); assertEquals( versionA, versionService.getInitialVersion() ); }