DAQ-1015 : Handle condition when max is 0; added unit tests for boundary conditions