private void controlBackgroundColor(final DeviceProxy deviceProxy,
final String attName, final Color bgColor,
final JTextField txtField, final boolean bAlarmEnabled)
throws DevFailed {
DeviceAttribute devAttr;
if (bAlarmEnabled) {
devAttr = deviceProxy.read_attribute(attName);
Assert.assertEquals("the color is not valid", ColorAttributeQuality
.getColorForQuality(devAttr.getQuality()), txtField
.getBackground());
} else {
Assert.assertEquals("AlarmEnabled = false but bean has a color",
(bgColor == null) ? defaultColor : bgColor,
txtField.getBackground());