ApplicationLifecycleServiceImpl implements ApplicationLifecycleService { @Override public ApplicationEntity findAppByInstanceIds(final String accountId, final String region, final Collection<String> instanceIds) { return applicationRepository.findByInstanceIds(accountId, region, instanceIds); }  @Override @Retryable(maxAttempts = 10, backoff = @Backoff(delay = 100, maxDelay = 500), include = {ObjectOptimisticLockingFailureException.class, OptimisticLockException.class, DataIntegrityViolationException.class}) @Transactional(REQUIRES_NEW) LifecycleEntity saveLifecycle(final ApplicationEntity applicationEntity, final VersionEntity versionEntity,
            final LifecycleEntity lifecycleToSave); @Override LifecycleEntity saveInstanceLogLifecycle(final String instanceId, final DateTime instanceBootTime,
            final String userdataPath, final String region, final String logData, final String accountId); @Override ApplicationEntity findAppByInstanceIds(final String accountId, final String region, final Collection<String> instanceIds); @Override Page<LifecycleEntity> findByApplicationNameAndVersion(final String name, final String version, final Pageable pageable);  }
@Test public void testFindAppByInstanceIds() throws Exception { final ApplicationEntity result = applicationLifecycleServiceImpl.findAppByInstanceIds(ACCOUNT_ID, REGION, INSTANCE_IDS); assertThat(result).isEqualTo(helloWorldApplication); verify(mockApplicationRepository).findByInstanceIds(eq(ACCOUNT_ID), eq(REGION), eq(INSTANCE_IDS)); }