thread and singleton tests