### Question:
BaseStringProperty extends BaseProperty { @Override public void setValue(Object value) { String stringValue; if (value instanceof String) { stringValue = (String) value; } else { stringValue = getConverterManager().convert(String.class, value); } if (!isValueDirty() && !StringUtils.equals(stringValue, getValue())) { setValueDirty(true); } this.value = stringValue; }  @Override String getValue(); @Override void setValue(Object value); @Override String toText(); @Override boolean equals(Object obj); @Override int hashCode(); @Override BaseStringProperty clone();  }### Answer:
@Test public void setValueWhenTypeIsNotStringAndSameValue() throws Exception { BaseStringProperty p = new BaseStringProperty(); Integer value = new Integer(42); ConverterManager converterManager = this.oldcore.getMocker().registerMockComponent(ConverterManager.class); when(converterManager.convert(String.class, value)).thenReturn("42"); p.setValue("42"); p.setValueDirty(false); p.setValue(value); assertFalse(p.isValueDirty()); }