tests for all the cases