### Question:
Constraint { public String getName() { return name; } Constraint(final String name, final String... allowedValue); String getName(); Collection<String> getAllowedValues(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }### Answer:
@Test public void shouldSetName() { final String name = "name"; final Constraint constraint = new Constraint(name,new String[1]); assertThat(constraint.getName(), is(name)); }