@Test public void testisAllPropertiesExisting() throws Exception { List<ConfigProperty> cfList = new ArrayList<>(); when(configPropertyRepository.findAll()).thenReturn(cfList); ConfigPropertyRequest configPropertyRequest = new ConfigPropertyRequest(); List<ConfigPropertyItem> configPropertyItemList = new ArrayList<>(); ConfigPropertyItem item = new ConfigPropertyItem(); item.setApplication("dummy"); configPropertyItemList.add(item); configPropertyRequest.setConfigProperties(configPropertyItemList); assertTrue(configPropertyService.isAllPropertiesExisting(configPropertyRequest) == false); }
@Override public boolean isAllPropertiesExisting(ConfigPropertyRequest configPropertyRequest) throws Exception { List<String> invalidList = new ArrayList<>(); configPropertyRequest.getConfigProperties().forEach(configPropertyItem -> { try { if (!isPropertyExisting(configPropertyItem)) { invalidList.add(configPropertyItem.toString()); } } catch (Exception e) { } }); return invalidList.isEmpty(); }
ConfigPropertyServiceImpl implements ConfigPropertyService { @Override public boolean isAllPropertiesExisting(ConfigPropertyRequest configPropertyRequest) throws Exception { List<String> invalidList = new ArrayList<>(); configPropertyRequest.getConfigProperties().forEach(configPropertyItem -> { try { if (!isPropertyExisting(configPropertyItem)) { invalidList.add(configPropertyItem.toString()); } } catch (Exception e) { } }); return invalidList.isEmpty(); } }
ConfigPropertyServiceImpl implements ConfigPropertyService { @Override public boolean isAllPropertiesExisting(ConfigPropertyRequest configPropertyRequest) throws Exception { List<String> invalidList = new ArrayList<>(); configPropertyRequest.getConfigProperties().forEach(configPropertyItem -> { try { if (!isPropertyExisting(configPropertyItem)) { invalidList.add(configPropertyItem.toString()); } } catch (Exception e) { } }); return invalidList.isEmpty(); }  }
ConfigPropertyServiceImpl implements ConfigPropertyService { @Override public boolean isAllPropertiesExisting(ConfigPropertyRequest configPropertyRequest) throws Exception { List<String> invalidList = new ArrayList<>(); configPropertyRequest.getConfigProperties().forEach(configPropertyItem -> { try { if (!isPropertyExisting(configPropertyItem)) { invalidList.add(configPropertyItem.toString()); } } catch (Exception e) { } }); return invalidList.isEmpty(); }  @Override ConfigTreeNode listProperties(); @Override @Transactional List<ConfigProperty> addUpdateProperties(ConfigPropertyRequest configPropertyRequest, String user,
			String userMessage, String timeNow, boolean partOfRollbackOperation); @Override @Transactional String deleteProperty(ConfigPropertyItem configPropertyItem, String user, String userMessage, String timeNow,
			boolean partOfRollbackOperation); @Override boolean isAllPropertiesExisting(ConfigPropertyRequest configPropertyRequest); @Override boolean isAnyPropertyExisting(ConfigPropertyRequest configPropertyRequest); @Override boolean isPropertyExisting(ConfigPropertyItem configPropertyItem); @Override boolean isCfkeyExisting(String cfkey); @Override boolean isAllCfkeysExisting(ConfigPropertyRequest configPropertyRequest); @Override boolean isApplicationExisting(String application); @Override boolean isAllApplicationsExisting(ConfigPropertyRequest configPropertyRequest); @Override List<String> listAllKeys(); @Override ConfigPropertyAuditTrail listAllConfigPropertyAudits(String timestamp); @Override ConfigPropertyRollbackPreview getRollbackPreview(String timestamp); @Override @Transactional String doConfigPropertyRollbackToTimestamp(String timestamp, String user, String userMessage); @Override List<ConfigProperty> listProperty(String cfkey, String application); }
ConfigPropertyServiceImpl implements ConfigPropertyService { @Override public boolean isAllPropertiesExisting(ConfigPropertyRequest configPropertyRequest) throws Exception { List<String> invalidList = new ArrayList<>(); configPropertyRequest.getConfigProperties().forEach(configPropertyItem -> { try { if (!isPropertyExisting(configPropertyItem)) { invalidList.add(configPropertyItem.toString()); } } catch (Exception e) { } }); return invalidList.isEmpty(); }  @Override ConfigTreeNode listProperties(); @Override @Transactional List<ConfigProperty> addUpdateProperties(ConfigPropertyRequest configPropertyRequest, String user,
			String userMessage, String timeNow, boolean partOfRollbackOperation); @Override @Transactional String deleteProperty(ConfigPropertyItem configPropertyItem, String user, String userMessage, String timeNow,
			boolean partOfRollbackOperation); @Override boolean isAllPropertiesExisting(ConfigPropertyRequest configPropertyRequest); @Override boolean isAnyPropertyExisting(ConfigPropertyRequest configPropertyRequest); @Override boolean isPropertyExisting(ConfigPropertyItem configPropertyItem); @Override boolean isCfkeyExisting(String cfkey); @Override boolean isAllCfkeysExisting(ConfigPropertyRequest configPropertyRequest); @Override boolean isApplicationExisting(String application); @Override boolean isAllApplicationsExisting(ConfigPropertyRequest configPropertyRequest); @Override List<String> listAllKeys(); @Override ConfigPropertyAuditTrail listAllConfigPropertyAudits(String timestamp); @Override ConfigPropertyRollbackPreview getRollbackPreview(String timestamp); @Override @Transactional String doConfigPropertyRollbackToTimestamp(String timestamp, String user, String userMessage); @Override List<ConfigProperty> listProperty(String cfkey, String application);  }