### Question:
RestServerRouteDestination implements RouteDestination { @Override public void validate() { if (name == null || "".equals(name)) { throw new IllegalArgumentException("Name can not be null"); } if (restServer == null) { throw new IllegalArgumentException("REST resource can not be null"); } } RestServerRouteDestination(String name, RestServer restServer); String getName(); RestServer getRestServer(); @Override String toString(); @Override void validate();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void shouldValidateName() { new RestServerRouteDestination(null, new RestServer()).validate(); }
@Test(expected = IllegalArgumentException.class) public void shouldValidateRestResource() { new RestServerRouteDestination("test", null).validate(); }