### Question:
EnvironmentDeletionService { public List<EnvironmentDto> deleteMultipleByNames(Set<String> environmentNames, String accountId, String actualUserCrn, boolean cascading, boolean forced) { Collection<Environment> environments = environmentService.findByNameInAndAccountIdAndArchivedIsFalse(environmentNames, accountId); return deleteMultiple(actualUserCrn, cascading, forced, environments); } EnvironmentDeletionService(EnvironmentService environmentService, EnvironmentDtoConverter environmentDtoConverter,
            EnvironmentReactorFlowManager reactorFlowManager, EnvironmentResourceDeletionService environmentResourceDeletionService,
            EnvironmentJobService environmentJobService); EnvironmentDto deleteByNameAndAccountId(String environmentName, String accountId, String actualUserCrn,
        boolean cascading, boolean forced); EnvironmentDto deleteByCrnAndAccountId(String crn, String accountId, String actualUserCrn,
        boolean cascading, boolean forced); Environment delete(Environment environment, String userCrn,
        boolean cascading, boolean forced); List<EnvironmentDto> deleteMultipleByNames(Set<String> environmentNames, String accountId, String actualUserCrn,
        boolean cascading, boolean forced); List<EnvironmentDto> deleteMultipleByCrns(Set<String> crns, String accountId, String actualUserCrn,
        boolean cascading, boolean forced);  }### Answer:
@Test public void deleteMultipleByNames() { Set<String> names = Set.of("name1", "name2"); Set<Environment> envs = Set.of(new Environment(), new Environment()); int expected = envs.size(); EnvironmentDeletionService environmentDeletionServiceWired = spy(environmentDeletionService); when(environmentService .findByNameInAndAccountIdAndArchivedIsFalse(eq(names), eq(TestConstants.ACCOUNT_ID))).thenReturn(envs); assertEquals(expected, environmentDeletionServiceWired .deleteMultipleByNames(names, TestConstants.ACCOUNT_ID, TestConstants.USER, false, false).size()); verify(environmentDeletionServiceWired, times(expected)).delete(any(), eq(TestConstants.USER), anyBoolean(), anyBoolean()); }