### Question:
EffectivePolicyImpl implements EffectivePolicy { public void initialise(EndpointPolicy epi, PolicyEngine engine, boolean inbound, Message m) { initialise(epi, engine, inbound, false, m); } EffectivePolicyImpl(); Policy getPolicy(); List<Interceptor<? extends org.apache.cxf.message.Message>> getInterceptors(); Collection<Assertion> getChosenAlternative(); void initialise(EndpointPolicy epi, PolicyEngine engine, boolean inbound, Message m); void initialise(EndpointPolicy epi, PolicyEngine engine, boolean inbound, boolean fault, Message m); void initialise(EndpointInfo ei,
                    BindingOperationInfo boi,
                    PolicyEngine engine,
                    Assertor assertor,
                    boolean requestor,
                    boolean request,
                    Message m); void initialise(EndpointInfo ei,
                    BindingOperationInfo boi,
                    PolicyEngine engine,
                    Assertor assertor,
                    List<List<Assertion>> incoming,
                    Message m); void initialise(EndpointInfo ei,
                    BindingOperationInfo boi,
                    PolicyEngine engine,
                    boolean requestor, boolean request,
                    Message m); void initialise(EndpointInfo ei,
                    BindingOperationInfo boi,
                    BindingFaultInfo bfi,
                    PolicyEngine engine,
                    Assertor assertor,
                    Message m);  }### Answer:
@Test public void testInitialise() throws NoSuchMethodException { Method m1 = EffectivePolicyImpl.class.getDeclaredMethod("initialisePolicy", new Class[] {EndpointInfo.class, BindingOperationInfo.class, PolicyEngine.class, boolean.class, boolean.class, Assertor.class, Message.class}); Method m2 = EffectivePolicyImpl.class.getDeclaredMethod("chooseAlternative", new Class[] {PolicyEngine.class, Assertor.class, Message.class}); Method m3 = EffectivePolicyImpl.class.getDeclaredMethod("initialiseInterceptors", new Class[] {PolicyEngine.class, Message.class}); EffectivePolicyImpl effectivePolicy = EasyMock.createMockBuilder(EffectivePolicyImpl.class) .addMockedMethods(m1, m2, m3).createMock(control); EndpointInfo ei = control.createMock(EndpointInfo.class); BindingOperationInfo boi = control.createMock(BindingOperationInfo.class); PolicyEngineImpl pe = new PolicyEngineImpl(); Assertor a = control.createMock(Assertor.class); boolean requestor = true; effectivePolicy.initialisePolicy(ei, boi, pe, requestor, requestor, a, null); EasyMock.expectLastCall().andReturn(a); effectivePolicy.chooseAlternative(pe, a, null); EasyMock.expectLastCall(); effectivePolicy.initialiseInterceptors(pe, false, msg); EasyMock.expectLastCall(); control.replay(); effectivePolicy.initialise(ei, boi, pe, a, requestor, requestor, null); control.verify(); }