Added some tests for logics functions