Add unit tests for zpool replace, offline and detach