rearrange hasmany array test