Adding new tests to increase coverage

Now that I think about it, I am not sure whether this is the most efficient thing to do. May be we should sort the indices when we create the datasets instead?