@Test
public void testMeasurementScheduleRequest() throws Exception {
MeasurementScheduleRequest test = new MeasurementScheduleRequest(1,"test",30000,true, DataType.AVAILABILITY,
NumericType.DYNAMIC);
assert test.getDataType()==DataType.AVAILABILITY;
assert test.getRawNumericType()==NumericType.DYNAMIC;
assert test.getInterval()==30000;
test = new MeasurementScheduleRequest(1,"test",30000,true, DataType.AVAILABILITY, null);
assert test.getDataType()==DataType.AVAILABILITY;
assert test.getRawNumericType()==null;
assert test.getInterval()==30000;
test = new MeasurementScheduleRequest(1,"test",30005,true, DataType.MEASUREMENT, NumericType.TRENDSDOWN);
assert test.getDataType()==DataType.MEASUREMENT;
assert test.getRawNumericType()==NumericType.TRENDSDOWN;
assert test.getInterval()==30000; // We loose a bit of precision in the sub-second area
MeasurementScheduleRequest test2 = new MeasurementScheduleRequest(test);
assert test2.getDataType()==DataType.MEASUREMENT;
assert test2.getRawNumericType()==NumericType.TRENDSDOWN;
assert test2.getInterval()==30000; // We loose a bit of precision in the sub-second area
test = new MeasurementScheduleRequest(1,"test",30105,true, DataType.MEASUREMENT);
assert test.getDataType()==DataType.MEASUREMENT;
assert test.getRawNumericType()==null;
assert test.getInterval()==30000; // We loose a bit of precision in the sub-second area
test2 = new MeasurementScheduleRequest(test);
assert test2.getDataType()==DataType.MEASUREMENT;
assert test2.getRawNumericType()==null;
assert test2.getInterval()==30000;
}