Logic of test finish boolean