@Test public void testFindWithUnknownKey() throws IOException, SyntaxErrorException, InterruptedException, ExecutionException { SenderFinder dataFinder = new SenderFinder(senderServcie) { @Override protected String getValueForKey(String key) throws SenderException { throw new SenderException("unknown key"); } }; List<Sender> results = dataFinder.find(List.of(ImmutablePair.of("column", "\"${test}\""))).get(); assertTrue(results.isEmpty()); }
public CompletableFuture<List<Sender>> find(ConfigThingy conf) { List<Pair<String, String>> query = new ArrayList<>(); for (ConfigThingy element : conf) { query.add(new ImmutablePair<>(element.getName(), element.toString())); } return find(query); }
SenderFinder { public CompletableFuture<List<Sender>> find(ConfigThingy conf) { List<Pair<String, String>> query = new ArrayList<>(); for (ConfigThingy element : conf) { query.add(new ImmutablePair<>(element.getName(), element.toString())); } return find(query); } }
SenderFinder { public CompletableFuture<List<Sender>> find(ConfigThingy conf) { List<Pair<String, String>> query = new ArrayList<>(); for (ConfigThingy element : conf) { query.add(new ImmutablePair<>(element.getName(), element.toString())); } return find(query); } SenderFinder(SenderService senderList); }
SenderFinder { public CompletableFuture<List<Sender>> find(ConfigThingy conf) { List<Pair<String, String>> query = new ArrayList<>(); for (ConfigThingy element : conf) { query.add(new ImmutablePair<>(element.getName(), element.toString())); } return find(query); } SenderFinder(SenderService senderList); CompletableFuture<List<Sender>> find(ConfigThingy conf); CompletableFuture<List<Sender>> find(List<Pair<String, String>> query); }
SenderFinder { public CompletableFuture<List<Sender>> find(ConfigThingy conf) { List<Pair<String, String>> query = new ArrayList<>(); for (ConfigThingy element : conf) { query.add(new ImmutablePair<>(element.getName(), element.toString())); } return find(query); } SenderFinder(SenderService senderList); CompletableFuture<List<Sender>> find(ConfigThingy conf); CompletableFuture<List<Sender>> find(List<Pair<String, String>> query);  }