1 /* 2 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 3 * The software in this package is published under the terms of the CPAL v1.0 4 * license, a copy of which has been included with this distribution in the 5 * LICENSE.txt file. 6 */ 7 package org.mule.util.mock; 8 9 import org.mule.api.MuleMessage; 10 11 import com.mockobjects.constraint.Constraint; 12 13 /** 14 * TODO 15 */ 16 public class PayloadConstraint implements Constraint 17 { 18 private Object object; 19 20 public PayloadConstraint(Object object) 21 { 22 this.object = object; 23 } 24 25 public boolean eval(Object o) 26 { 27 return ((MuleMessage) o).getPayload().equals(object); 28 } 29 }