Added test case

Tests if code will work with out of order data