@Override
    public void run() {
        JobRunrMetadata metadata = storageProvider.getMetadata("database_version", "cluster");
        if (metadata != null && "6.0.0".equals(metadata.getValue())) return;

        migrateScheduledJobsIfNecessary();

        storageProvider.saveMetadata(new JobRunrMetadata("database_version", "cluster", "6.0.0"));
    }
@Test
    void doesMigrationsOfAllScheduledJobsIfStorageProviderIsAnSqlStorageProvider() {
        doReturn(PostgresStorageProvider.class).when(storageProviderInfo).getImplementationClass();

        when(storageProvider.getScheduledJobs(any(), any()))
                .thenAnswer(i -> aLotOfScheduledJobs(i.getArgument(1, OffsetBasedPageRequest.class), 5500));

        task.run();

        verify(storageProvider, times(2)).getScheduledJobs(any(), any());
        verify(storageProvider, times(6)).save(anyList());
    }