public void testGetSetThresholdValues() throws Exception {
// Getting default value
String id = "watch";
ThresholdWatch watch = (ThresholdWatch) construct1(id);
ThresholdValues values = watch.getThresholdValues();
Assert.assertTrue(Double.isNaN(values.getLowThreshold()));
Assert.assertTrue(Double.isNaN(values.getHighThreshold()));
// "set" followed by "get"
ThresholdValues newValues = new ThresholdValues(7.13, 13.7);
watch.setThresholdValues(newValues);
values = watch.getThresholdValues();
Assert.assertEquals(newValues.getLowThreshold(),
values.getLowThreshold(), 0);
Assert.assertEquals(newValues.getHighThreshold(),
values.getHighThreshold(), 0);
// Check that the watch holds the same object (at the time
// of writing this test it does)
Assert.assertSame(newValues, values);