test_class.declarator: REFRESH_INTERVAL = 10
test_class.modifier: private static final
test_class.original_string: private static final long REFRESH_INTERVAL = 10;
test_class.type: long
test_class.var_name: REFRESH_INTERVAL
test_class.declarator: projectListCaptor
test_class.modifier: @Captor
      private
test_class.original_string: @Captor
      private ArgumentCaptor<List<Project>> projectListCaptor;
test_class.type: ArgumentCaptor<List<Project>>
test_class.var_name: projectListCaptor
test_class.declarator: projectServiceMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ProjectService projectServiceMock;
test_class.type: ProjectService
test_class.var_name: projectServiceMock
test_class.declarator: projectReaderMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ProjectReader projectReaderMock;
test_class.type: ProjectReader
test_class.var_name: projectReaderMock
test_class.declarator: pbConfigPropertiesMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ProjectBoardConfigurationProperties pbConfigPropertiesMock;
test_class.type: ProjectBoardConfigurationProperties
test_class.var_name: pbConfigPropertiesMock
test_class.declarator: projectMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Project projectMock;
test_class.type: Project
test_class.var_name: projectMock
test_class.declarator: normalizerMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Normalizer<Project> normalizerMock;
test_class.type: Normalizer<Project>
test_class.var_name: normalizerMock
test_class.declarator: clock
test_class.modifier: private
test_class.original_string: private Clock clock;
test_class.type: Clock
test_class.var_name: clock
test_class.declarator: projectUpdater
test_class.modifier: private
test_class.original_string: private ProjectUpdater projectUpdater;
test_class.type: ProjectUpdater
test_class.var_name: projectUpdater
test_class.file: backend/project-board/src/test/java/de/adesso/projectboard/base/project/updater/ProjectUpdaterTest.java
test_class.identifier: ProjectUpdaterTest
test_case.body: @Test
      public void executeSavesInitialProjects() throws Exception {
          // given
          var expectedProjects = List.of(projectMock);
  
          given(projectReaderMock.getInitialProjects())
                  .willReturn(expectedProjects);
          given(normalizerMock.normalize(expectedProjects))
                  .willReturn(expectedProjects);
  
          // when
          projectUpdater.execute();
  
          // then
          verify(projectServiceMock).saveAll(projectListCaptor.capture());
  
          var actualProjects = projectListCaptor.getValue();
          assertThat(actualProjects).containsExactlyElementsOf(expectedProjects);
      }
test_case.class_method_signature: ProjectUpdaterTest.executeSavesInitialProjects()
test_case.full_signature: @Test public void executeSavesInitialProjects()
test_case.identifier: executeSavesInitialProjects
test_case.invocations: of willReturn given getInitialProjects willReturn given normalize execute saveAll verify capture getValue containsExactlyElementsOf assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void executeSavesInitialProjects()
focal_class.declarator: projectService
focal_class.modifier: private final
focal_class.original_string: private final ProjectService projectService;
focal_class.type: ProjectService
focal_class.var_name: projectService
focal_class.declarator: projectReader
focal_class.modifier: private final
focal_class.original_string: private final ProjectReader projectReader;
focal_class.type: ProjectReader
focal_class.var_name: projectReader
focal_class.declarator: refreshIntervalDuration
focal_class.modifier: private final
focal_class.original_string: private final Duration refreshIntervalDuration;
focal_class.type: Duration
focal_class.var_name: refreshIntervalDuration
focal_class.declarator: normalizers
focal_class.modifier: private final
focal_class.original_string: private final List<Normalizer<Project>> normalizers;
focal_class.type: List<Normalizer<Project>>
focal_class.var_name: normalizers
focal_class.declarator: clock
focal_class.modifier: private final
focal_class.original_string: private final Clock clock;
focal_class.type: Clock
focal_class.var_name: clock
focal_class.file: backend/project-board/src/main/java/de/adesso/projectboard/base/project/updater/ProjectUpdater.java
focal_class.identifier: ProjectUpdater
focal_class.interfaces: implements ScheduledJob
focal_class.class_method_signature: ProjectUpdater.ProjectUpdater(ProjectService projectService,
                            ProjectReader projectReader,
                            ProjectBoardConfigurationProperties properties,
                            @Lazy List<Normalizer<Project>> normalizers,
                            Clock clock)
focal_class.full_signature: @Autowired(required = false) public  ProjectUpdater(ProjectService projectService,
                            ProjectReader projectReader,
                            ProjectBoardConfigurationProperties properties,
                            @Lazy List<Normalizer<Project>> normalizers,
                            Clock clock)
focal_class.identifier: ProjectUpdater
focal_class.modifiers: @Autowired(required = false) public
focal_class.parameters: (ProjectService projectService,
                            ProjectReader projectReader,
                            ProjectBoardConfigurationProperties properties,
                            @Lazy List<Normalizer<Project>> normalizers,
                            Clock clock)
focal_class.signature:  ProjectUpdater(ProjectService projectService,
                            ProjectReader projectReader,
                            ProjectBoardConfigurationProperties properties,
                            @Lazy List<Normalizer<Project>> normalizers,
                            Clock clock)
focal_class.class_method_signature: ProjectUpdater.ProjectUpdater(ProjectService projectService,
                            ProjectReader projectReader,
                            ProjectBoardConfigurationProperties properties,
                            Clock clock)
focal_class.full_signature: @Autowired(required = false) public  ProjectUpdater(ProjectService projectService,
                            ProjectReader projectReader,
                            ProjectBoardConfigurationProperties properties,
                            Clock clock)
focal_class.identifier: ProjectUpdater
focal_class.modifiers: @Autowired(required = false) public
focal_class.parameters: (ProjectService projectService,
                            ProjectReader projectReader,
                            ProjectBoardConfigurationProperties properties,
                            Clock clock)
focal_class.signature:  ProjectUpdater(ProjectService projectService,
                            ProjectReader projectReader,
                            ProjectBoardConfigurationProperties properties,
                            Clock clock)
focal_class.class_method_signature: ProjectUpdater.execute(LocalDateTime lastExecuteTime)
focal_class.full_signature: @Override public void execute(LocalDateTime lastExecuteTime)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (LocalDateTime lastExecuteTime)
focal_class.return: void
focal_class.signature: void execute(LocalDateTime lastExecuteTime)
focal_class.class_method_signature: ProjectUpdater.execute()
focal_class.full_signature: @Override public void execute()
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void execute()
focal_class.class_method_signature: ProjectUpdater.getJobIdentifier()
focal_class.full_signature: @Override public String getJobIdentifier()
focal_class.identifier: getJobIdentifier
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getJobIdentifier()
focal_class.class_method_signature: ProjectUpdater.shouldExecute(LocalDateTime lastExecuteTime)
focal_class.full_signature: @Override public boolean shouldExecute(LocalDateTime lastExecuteTime)
focal_class.identifier: shouldExecute
focal_class.modifiers: @Override public
focal_class.parameters: (LocalDateTime lastExecuteTime)
focal_class.return: boolean
focal_class.signature: boolean shouldExecute(LocalDateTime lastExecuteTime)
focal_class.class_method_signature: ProjectUpdater.normalizeAndSave(List<Project> projects)
focal_class.full_signature: private void normalizeAndSave(List<Project> projects)
focal_class.identifier: normalizeAndSave
focal_class.modifiers: private
focal_class.parameters: (List<Project> projects)
focal_class.return: void
focal_class.signature: void normalizeAndSave(List<Project> projects)
focal_method.body: @Override
      public void execute(LocalDateTime lastExecuteTime) throws Exception {
          var projects = projectReader.getAllProjectsSince(lastExecuteTime);
          normalizeAndSave(projects);
      }
focal_method.class_method_signature: ProjectUpdater.execute(LocalDateTime lastExecuteTime)
focal_method.full_signature: @Override public void execute(LocalDateTime lastExecuteTime)
focal_method.identifier: execute
focal_method.invocations: getAllProjectsSince normalizeAndSave
focal_method.modifiers: @Override public
focal_method.parameters: (LocalDateTime lastExecuteTime)
focal_method.return: void
focal_method.signature: void execute(LocalDateTime lastExecuteTime)