### Question:
ClusterV4Request implements JsonEntity { public void setName(String name) { this.name = name; }  String getUserName(); void setUserName(String userName); String getPassword(); void setPassword(String password); ExecutorType getExecutorType(); void setExecutorType(ExecutorType executorType); String getName(); void setName(String name); String getDatabaseServerCrn(); void setDatabaseServerCrn(String databaseServerCrn); Set<String> getDatabases(); void setDatabases(Set<String> databases); String getProxyConfigCrn(); void setProxyConfigCrn(String proxyConfigCrn); CloudStorageRequest getCloudStorage(); void setCloudStorage(CloudStorageRequest cloudStorage); ClouderaManagerV4Request getCm(); void setCm(ClouderaManagerV4Request cm); GatewayV4Request getGateway(); void setGateway(GatewayV4Request gateway); String getCustomQueue(); void setCustomQueue(String customQueue); CustomContainerV4Request getCustomContainer(); void setCustomContainer(CustomContainerV4Request customContainer); String getBlueprintName(); void setBlueprintName(String blueprintName); Boolean getValidateBlueprint(); void setValidateBlueprint(Boolean validateBlueprint); boolean isRangerRazEnabled(); void setRangerRazEnabled(boolean rangerRazEnabled);  }### Answer:
@Test public void testClusterRequestCreationWhenNameHasMeetsTheRequirementsThenEverythingGoesFine() { underTest.setName("some-name"); Set<ConstraintViolation<ClusterV4Request>> constraintViolations = localValidatorFactory.validate(underTest); assertFalse(constraintViolations.stream().anyMatch(violation -> !NOT_NULL_VIOLATION_TEMPLATE.equalsIgnoreCase(violation.getMessageTemplate()))); }
@Test public void testClusterRequestCreationWhenNameDoesNotContainsHyphenThenEverythingGoesFine() { underTest.setName("somename"); Set<ConstraintViolation<ClusterV4Request>> constraintViolations = localValidatorFactory.validate(underTest); assertFalse(constraintViolations.stream().anyMatch(violation -> !NOT_NULL_VIOLATION_TEMPLATE.equalsIgnoreCase(violation.getMessageTemplate()))); }