@Test public void getAllRulesByTargetTypeAndRuleIdListTest() { List<RuleProjection> ruleDetails = Lists.newArrayList(); ruleDetails.add(getRuleProjection()); when(ruleRepository.findByTargetTypeAndRuleIdIn(anyString(), any())).thenReturn(ruleDetails); assertThat(ruleService.getAllRulesByTargetTypeAndRuleIdList(anyString(), any()).size(), is(1)); }
@Override public List<RuleProjection> getAllRulesByTargetTypeAndRuleIdList(final String targetType, final List<String> ruleIdList) { return ruleRepository.findByTargetTypeAndRuleIdIn(targetType, ruleIdList); }
RuleServiceImpl implements RuleService { @Override public List<RuleProjection> getAllRulesByTargetTypeAndRuleIdList(final String targetType, final List<String> ruleIdList) { return ruleRepository.findByTargetTypeAndRuleIdIn(targetType, ruleIdList); } }
RuleServiceImpl implements RuleService { @Override public List<RuleProjection> getAllRulesByTargetTypeAndRuleIdList(final String targetType, final List<String> ruleIdList) { return ruleRepository.findByTargetTypeAndRuleIdIn(targetType, ruleIdList); }  }
RuleServiceImpl implements RuleService { @Override public List<RuleProjection> getAllRulesByTargetTypeAndRuleIdList(final String targetType, final List<String> ruleIdList) { return ruleRepository.findByTargetTypeAndRuleIdIn(targetType, ruleIdList); }  @Override List<Rule> getAllRulesByTargetType(String targetType); @Override List<RuleProjection> getAllRulesByTargetTypeName(String targetType); @Override List<RuleProjection> getAllRulesByTargetTypeAndNotInRuleIdList(final String targetType, final List<String> ruleIdList); @Override List<RuleProjection> getAllRulesByTargetTypeAndRuleIdList(final String targetType, final List<String> ruleIdList); @Override Rule getByRuleId(String ruleId); @Override Page<Rule> getRules(final String searchTerm, final int page, final int size); @Override Collection<String> getAllAlexaKeywords(); @Override Collection<String> getAllRuleIds(); @Override String createRule(final MultipartFile fileToUpload, final CreateUpdateRuleDetails ruleDetails, final String userId); @Override String updateRule(MultipartFile fileToUpload, CreateUpdateRuleDetails updateRuleDetails, String userId); @Override String invokeRule(String ruleId, List<Map<String, Object>> ruleOptionalParams); @Override String enableDisableRule(final String ruleId, final String action, final String userId); @Override Map<String, Object> invokeAllRules(List<String> ruleIds); boolean isRuleIdExits(String ruleId); @Override List<RuleCategory> getAllRuleCategories(); }
RuleServiceImpl implements RuleService { @Override public List<RuleProjection> getAllRulesByTargetTypeAndRuleIdList(final String targetType, final List<String> ruleIdList) { return ruleRepository.findByTargetTypeAndRuleIdIn(targetType, ruleIdList); }  @Override List<Rule> getAllRulesByTargetType(String targetType); @Override List<RuleProjection> getAllRulesByTargetTypeName(String targetType); @Override List<RuleProjection> getAllRulesByTargetTypeAndNotInRuleIdList(final String targetType, final List<String> ruleIdList); @Override List<RuleProjection> getAllRulesByTargetTypeAndRuleIdList(final String targetType, final List<String> ruleIdList); @Override Rule getByRuleId(String ruleId); @Override Page<Rule> getRules(final String searchTerm, final int page, final int size); @Override Collection<String> getAllAlexaKeywords(); @Override Collection<String> getAllRuleIds(); @Override String createRule(final MultipartFile fileToUpload, final CreateUpdateRuleDetails ruleDetails, final String userId); @Override String updateRule(MultipartFile fileToUpload, CreateUpdateRuleDetails updateRuleDetails, String userId); @Override String invokeRule(String ruleId, List<Map<String, Object>> ruleOptionalParams); @Override String enableDisableRule(final String ruleId, final String action, final String userId); @Override Map<String, Object> invokeAllRules(List<String> ruleIds); boolean isRuleIdExits(String ruleId); @Override List<RuleCategory> getAllRuleCategories();  }