ComponentType implements Validatable { public void setInstance(String instance) { instanceValidator.validate(instance); this.instance = instance; }  String getName(); void setName(String name); String getInstance(); void setInstance(String instance); EVSEType getEvse(); void setEvse(EVSEType evse); @Override boolean validate(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test(expected = PropertyConstraintException.class) public void setInstance_StringExceeds50_throwsPropertyConstraintException() { String bitString = aString(51); VariableType sut = new VariableType(); sut.setInstance(bitString); }