Add specs for threadsafe environment