DefaultUpdateCheckManager implements UpdateCheckManager, Service { public String getEffectiveUpdatePolicy( RepositorySystemSession session, String policy1, String policy2 ) { return ordinalOfUpdatePolicy( policy1 ) < ordinalOfUpdatePolicy( policy2 ) ? policy1 : policy2; } DefaultUpdateCheckManager();  DefaultUpdateCheckManager( Logger logger ); void initService( ServiceLocator locator ); DefaultUpdateCheckManager setLogger( Logger logger ); String getEffectiveUpdatePolicy( RepositorySystemSession session, String policy1, String policy2 ); void checkArtifact( RepositorySystemSession session, UpdateCheck<Artifact, ArtifactTransferException> check ); void checkMetadata( RepositorySystemSession session, UpdateCheck<Metadata, MetadataTransferException> check ); boolean isUpdatedRequired( RepositorySystemSession session, long lastModified, String policy ); void touchArtifact( RepositorySystemSession session, UpdateCheck<Artifact, ArtifactTransferException> check ); void touchMetadata( RepositorySystemSession session, UpdateCheck<Metadata, MetadataTransferException> check );  }
@Test public void testEffectivePolicy() { assertEquals( UPDATE_POLICY_ALWAYS, manager.getEffectiveUpdatePolicy( session, UPDATE_POLICY_ALWAYS, UPDATE_POLICY_DAILY ) ); assertEquals( UPDATE_POLICY_ALWAYS, manager.getEffectiveUpdatePolicy( session, UPDATE_POLICY_ALWAYS, UPDATE_POLICY_NEVER ) ); assertEquals( UPDATE_POLICY_DAILY, manager.getEffectiveUpdatePolicy( session, UPDATE_POLICY_DAILY, UPDATE_POLICY_NEVER ) ); assertEquals( UPDATE_POLICY_INTERVAL + ":60", manager.getEffectiveUpdatePolicy( session, UPDATE_POLICY_DAILY, UPDATE_POLICY_INTERVAL + ":60" ) ); assertEquals( UPDATE_POLICY_INTERVAL + ":60", manager.getEffectiveUpdatePolicy( session, UPDATE_POLICY_INTERVAL + ":100", UPDATE_POLICY_INTERVAL + ":60" ) ); }