refractor unittest