EasyMock.expect(engine.getAggregatedServicePolicy(si)).andReturn(sp);
Policy ep = control.createMock(Policy.class);
EasyMock.expect(engine.getAggregatedEndpointPolicy(ei)).andReturn(ep);
Policy merged = control.createMock(Policy.class);
EasyMock.expect(sp.merge(ep)).andReturn(merged);
EasyMock.expect(merged.normalize(true)).andReturn(merged);
control.replay();
EndpointPolicyImpl epi = new EndpointPolicyImpl();
epi.initialisePolicy(ei, engine);
assertSame(merged, epi.getPolicy());