tundra.tn.document:derive - add unit tests