@Test(expected = InvalidRoadNameException.class) public void emptyString() { underTest.validate(""); }
@Override public String validate(String roadName) throws InvalidRoadNameException { if (roadName == null || !ROAD_NAME_PATTERN.matcher(roadName).matches()) { throw new InvalidRoadNameException(ERROR_MESSAGE); } return roadName; }
RoadNameValidator implements ModelValidator<String> { @Override public String validate(String roadName) throws InvalidRoadNameException { if (roadName == null || !ROAD_NAME_PATTERN.matcher(roadName).matches()) { throw new InvalidRoadNameException(ERROR_MESSAGE); } return roadName; } }
RoadNameValidator implements ModelValidator<String> { @Override public String validate(String roadName) throws InvalidRoadNameException { if (roadName == null || !ROAD_NAME_PATTERN.matcher(roadName).matches()) { throw new InvalidRoadNameException(ERROR_MESSAGE); } return roadName; }  }
RoadNameValidator implements ModelValidator<String> { @Override public String validate(String roadName) throws InvalidRoadNameException { if (roadName == null || !ROAD_NAME_PATTERN.matcher(roadName).matches()) { throw new InvalidRoadNameException(ERROR_MESSAGE); } return roadName; }  @Override String validate(String roadName); static String validateRoadName(String roadName); }
RoadNameValidator implements ModelValidator<String> { @Override public String validate(String roadName) throws InvalidRoadNameException { if (roadName == null || !ROAD_NAME_PATTERN.matcher(roadName).matches()) { throw new InvalidRoadNameException(ERROR_MESSAGE); } return roadName; }  @Override String validate(String roadName); static String validateRoadName(String roadName);  }