Unit Test for logic