Moved 'sidedness' logic to StatTest. Added error assertion to unit test