unit test for  and