Add mask parameter to composite and associated test

References #212