dtest for replace_addr