final String message_fail_set = "Property being declared but after using instance.setAttribute the value inside the component did not correspont to the configured value";
final String message_fail_callback = "The callback for property change notifications(using 'method' attribute) was called %s times, and should have been called only once";
inst.setProperty(PROPERTY_NAME, VALUE_NEW);
PropertyChangeNotificationSwitch switchdevice = (PropertyChangeNotificationSwitch) inst
.getServiceObject();
Assert.assertTrue(message_fail_set,
switchdevice.getState().equals(VALUE_NEW));
Assert.assertTrue(
String.format(message_fail_callback,
switchdevice.getStateChangedCounter()),
switchdevice.getStateChangedCounter() == 1);
}