improve mock testing