assertTrue("Policies are compatible.", spc.compatible(p1, p2));
}
@Test
public void testIntersectServerPolicies() {
ServerPolicyCalculator spc = new ServerPolicyCalculator();
HTTPServerPolicy p1 = new HTTPServerPolicy();
HTTPServerPolicy p2 = new HTTPServerPolicy();
HTTPServerPolicy p = null;
p1.setServerType("server");
p = spc.intersect(p1, p2);
assertEquals("server", p.getServerType());
p1.setServerType(null);
p1.setReceiveTimeout(10000L);
p = spc.intersect(p1, p2);
assertEquals(10000L, p.getReceiveTimeout());
p1.setSuppressClientSendErrors(true);
p2.setSuppressClientSendErrors(true);
p = spc.intersect(p1, p2);
assertTrue(p.isSuppressClientSendErrors());
}