added test that covers the example from the spec