### Question:
CreateOriginRequest implements ValidatingRequest { public CreateOriginRequest setName(String name) { this.name = name; return this; }  UUID getOrganization(); CreateOriginRequest setOrganization(UUID organization); String getName(); CreateOriginRequest setName(String name); String getDescription(); CreateOriginRequest setDescription(String description); float getTrust(); CreateOriginRequest setTrust(float trust);  }### Answer:
@Test public void testRequestValidationFailsOnEmpty() { Set<ConstraintViolation<CreateOriginRequest>> violations = getValidator().validate(new CreateOriginRequest() .setName("") ); assertEquals(1, violations.size()); assertPropertyInvalid(violations, "name"); }
@Test public void testRequestValidationFailsOnBlank() { Set<ConstraintViolation<CreateOriginRequest>> violations = getValidator().validate(new CreateOriginRequest() .setName(" ") ); assertEquals(1, violations.size()); assertPropertyInvalid(violations, "name"); }
@Test public void testRequestValidationSucceeds() { assertTrue(getValidator().validate(new CreateOriginRequest() .setName("name") ).isEmpty()); }