### Question:
TraverseGraphRequest implements ValidatingRequest { public TraverseGraphRequest setQuery(String query) { this.query = query; return this; }  String getQuery(); TraverseGraphRequest setQuery(String query); Boolean getIncludeRetracted(); TraverseGraphRequest setIncludeRetracted(Boolean includeRetracted); Long getBefore(); TraverseGraphRequest setBefore(Long before); Long getAfter(); TraverseGraphRequest setAfter(Long after); Integer getLimit(); TraverseGraphRequest setLimit(Integer limit);  }### Answer:
@Test public void testRequestValidationFailsOnEmpty() { Set<ConstraintViolation<TraverseGraphRequest>> violations = getValidator().validate(new TraverseGraphRequest() .setQuery("") ); assertEquals(1, violations.size()); assertPropertyInvalid(violations, "query"); }
@Test public void testRequestValidationFailsOnBlank() { Set<ConstraintViolation<TraverseGraphRequest>> violations = getValidator().validate(new TraverseGraphRequest() .setQuery(" ") ); assertEquals(1, violations.size()); assertPropertyInvalid(violations, "query"); }
@Test public void testRequestValidationSucceeds() { assertTrue(getValidator().validate(new TraverseGraphRequest().setQuery("g.out()")).isEmpty()); }