Extract assertEquals() method.