Tests

The tests for the remaining cases have been added.