@Test(expected = ExecutionException.class)
public void sendEmailInvalidPortTest() throws Exception {

    config.replace("port", 1);
    Method m = es.getClass().getDeclaredMethod("modified", BundleContext.class, Map.class);
    m.setAccessible(true);
    m.invoke(es, bundleContext, config);
    CompletableFuture<Set<String>> cf = es.sendEmail(SUBJECT_LINE, HTML_MESSAGE, TO_EMAIL_ADDRESS);
    cf.get();
}