@Test(expected = IllegalArgumentException.class) public void shouldValidateName() { new HotRodServerRouteDestination(null, new HotRodServer()).validate(); }
@Override public void validate() { if (name == null || "".equals(name)) { throw new IllegalArgumentException("Name can not be null"); } if (hotrodServer == null) { throw new IllegalArgumentException("Channels can not be null"); } }
HotRodServerRouteDestination implements RouteDestination { @Override public void validate() { if (name == null || "".equals(name)) { throw new IllegalArgumentException("Name can not be null"); } if (hotrodServer == null) { throw new IllegalArgumentException("Channels can not be null"); } } }
HotRodServerRouteDestination implements RouteDestination { @Override public void validate() { if (name == null || "".equals(name)) { throw new IllegalArgumentException("Name can not be null"); } if (hotrodServer == null) { throw new IllegalArgumentException("Channels can not be null"); } } HotRodServerRouteDestination(String name, HotRodServer hotRodServer); }
HotRodServerRouteDestination implements RouteDestination { @Override public void validate() { if (name == null || "".equals(name)) { throw new IllegalArgumentException("Name can not be null"); } if (hotrodServer == null) { throw new IllegalArgumentException("Channels can not be null"); } } HotRodServerRouteDestination(String name, HotRodServer hotRodServer); HotRodServer getHotrodServer(); @Override String toString(); @Override void validate(); }
HotRodServerRouteDestination implements RouteDestination { @Override public void validate() { if (name == null || "".equals(name)) { throw new IllegalArgumentException("Name can not be null"); } if (hotrodServer == null) { throw new IllegalArgumentException("Channels can not be null"); } } HotRodServerRouteDestination(String name, HotRodServer hotRodServer); HotRodServer getHotrodServer(); @Override String toString(); @Override void validate();  }