Fixed global leak
Added a common mock state
Added SpnrDetails tests