

package gov.va.med.cds.mediator.work;

import org.easymock.EasyMock;




public class MockExceptionWorkFlowFactory
{
    WorkStateInterface workState = new MapBackedWorkState();


    public WorkerInterface createHL7XmlToVhimCreateXmlWork( )
    {
        WorkerInterface worker = EasyMock.createMock( WorkerInterface.class );
        worker.doWork( workState );
        EasyMock.expectLastCall().andThrow( new RuntimeException( "HL7XmlToVhimCreateXmlWork - Exception" ) );
        //EasyMock.replay( worker );
        return worker;
    }


    public WorkerInterface createRegisterHL7SupportWork( )
    {
        WorkerInterface worker = EasyMock.createMock( WorkerInterface.class );
        worker.doWork( workState );
        EasyMock.expectLastCall().andThrow( new RuntimeException( "RegisterHL7SupportWork - Exception" ) );
        //EasyMock.replay( worker );
        return worker;
    }


    public WorkerInterface createRegisterHL7DataWithWorkStateWork( )
    {
        WorkerInterface worker = EasyMock.createMock( WorkerInterface.class );
        worker.doWork( workState );
        EasyMock.expectLastCall().andThrow( new RuntimeException( "RegisterHL7DataWithWorkStateWork - Exception" ) );
        //EasyMock.replay( worker );
        return worker;
    }


    public WorkerInterface createHL7XmlToFilterXmlWork( )
    {
        WorkerInterface worker = EasyMock.createMock( WorkerInterface.class );
        worker.doWork( workState );
        EasyMock.expectLastCall().andThrow( new RuntimeException( "HL7XmlToFilterXmlWork - Exception" ) );
        //EasyMock.replay( worker );
        return worker;
    }


    public WorkerInterface createClinicalDataCreateMessageWork( )
    {
        WorkerInterface worker = EasyMock.createMock( WorkerInterface.class );
        worker.doWork( workState );
        EasyMock.expectLastCall().andThrow( new RuntimeException( "ClinicalDataCreateMessageWork - Exception" ) );
        //EasyMock.replay( worker );
        return worker;
    }


    public WorkerInterface createClinicalDataReadMessageWork( )
    {
        WorkerInterface worker = EasyMock.createMock( WorkerInterface.class );
        worker.doWork( workState );
        EasyMock.expectLastCall().andThrow( new RuntimeException( "ClinicalDataReadMessageWork - Exception" ) );
        //EasyMock.replay( worker );
        return worker;
    }


    public WorkerInterface createVhimXmlReadResponseToHl7Er7Work( )
    {
        WorkerInterface worker = EasyMock.createMock( WorkerInterface.class );
        worker.doWork( workState );
        EasyMock.expectLastCall().andThrow( new RuntimeException( "VhimXmlReadResponseToHl7Er7Work - Exception" ) );
        //EasyMock.replay( worker );
        return worker;
    }

}
