Add tests

These tests would have detected this missing return value in the case
of a single datapoint.