{
MuleEvent e = getTestEvent("testing");
e.getSession().setProperty("Prop", "session");
RequestContext.setEvent(e);
MessagePropertiesContext mpc = new MessagePropertiesContext();
//Note that we cannot write to the Inbound scope, its read only
mpc.setProperty("Prop", "invocation", PropertyScope.INVOCATION);
mpc.setProperty("Prop", "outbound", PropertyScope.OUTBOUND);
assertEquals("outbound", mpc.getProperty("Prop", PropertyScope.OUTBOUND));
mpc.removeProperty("Prop", PropertyScope.OUTBOUND);
assertEquals("invocation", mpc.getProperty("Prop", PropertyScope.INVOCATION));
mpc.removeProperty("Prop", PropertyScope.INVOCATION);
assertEquals("session", mpc.getProperty("Prop", PropertyScope.SESSION));
assertNull(mpc.getProperty("Prop", PropertyScope.INBOUND));
assertNull(mpc.getProperty("Prop", PropertyScope.INVOCATION));
assertNull(mpc.getProperty("Prop", PropertyScope.OUTBOUND));
}