private void setUpCustomLogger(boolean useCustomLogger,
boolean expectFault,
boolean returnFromCustomLogger) {
if (useCustomLogger) {
FaultListener customLogger = control.createMock(FaultListener.class);
message.getContextualProperty(FaultListener.class.getName());
EasyMock.expectLastCall().andReturn(customLogger);
if (expectFault) {
customLogger.faultOccurred(EasyMock.isA(Exception.class),
EasyMock.isA(String.class),
EasyMock.isA(Message.class));
EasyMock.expectLastCall().andReturn(returnFromCustomLogger);
if (returnFromCustomLogger) {
//default logging should also be invoked