@Override
    public void onChange(List<JobRunrMetadata> metadataList) {
        if (this.serversWithLongGCCyclesMetadataList == null || this.serversWithLongGCCyclesMetadataList.size() != metadataList.size()) {
            problems.removeProblemsOfType(CpuAllocationIrregularityProblem.PROBLEM_TYPE);
            if (!metadataList.isEmpty()) {
                problems.addProblem(new CpuAllocationIrregularityProblem(metadataList));
                problems.removeProblemsOfType(PollIntervalInSecondsTimeBoxIsTooSmallProblem.PROBLEM_TYPE);
                storageProvider.deleteMetadata(PollIntervalInSecondsTimeBoxIsTooSmallNotification.class.getSimpleName());
            }
            this.serversWithLongGCCyclesMetadataList = metadataList;
        }
    }
@Test
    void ifCpuAllocationIrregularitiesIsDeletedThenProblemIsRemoved() {
        final JobRunrMetadata jobRunrMetadata = new JobRunrMetadata(CpuAllocationIrregularityNotification.class.getSimpleName(), "BackgroundJobServer " + UUID.randomUUID(), "23");
        cpuAllocationIrregularityProblemHandler.onChange(asList(jobRunrMetadata));
        reset(problems);

        cpuAllocationIrregularityProblemHandler.onChange(emptyList());
        verify(problems).removeProblemsOfType(CpuAllocationIrregularityProblem.PROBLEM_TYPE);
        verify(problems, never()).addProblem(any());
    }