### Question:
SniNettyRouteSource implements SniRouteSource { @Override public void validate() { if (sniHostName == null || "".equals(sniHostName)) { throw new IllegalArgumentException("SNI Host name can not be null"); } if (jdkContext == null) { throw new IllegalArgumentException("JDK SSL Context must not be null"); } } SniNettyRouteSource(String sniHostName, SSLContext sslContext);  SniNettyRouteSource(String sniHostName, String keyStoreFileName, char[] keyStorePassword); @Override SSLContext getSslContext(); @Override String getSniHostName(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override void validate();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void shouldValidateSniHostName() throws Exception { new SniNettyRouteSource(null, SSLContext.getDefault()).validate(); }
@Test(expected = IllegalArgumentException.class) public void shouldValidateSSLContext() throws Exception { new SniNettyRouteSource("test", null).validate(); }