Test for the childWithChildren method