use of org.jgroups.stack.Protocol in project JGroups by belaban.
the class ConfiguratorTest method testAddingAboveTop.
public void testAddingAboveTop() throws Exception {
Protocol new_prot = new TRACE();
stack.insertProtocol(new_prot, ProtocolStack.Position.ABOVE, MFC.class);
List<Protocol> protocols = stack.getProtocols();
Assert.assertEquals(7, protocols.size());
assert protocols.get(0).getName().endsWith("TRACE");
assert stack.getTopProtocol().getUpProtocol() != null;
assert stack.getTopProtocol().getDownProtocol() != null;
assert stack.getTopProtocol().getDownProtocol().getUpProtocol() != null;
assert stack.getTopProtocol().getDownProtocol().getDownProtocol() != null;
}
use of org.jgroups.stack.Protocol in project JGroups by belaban.
the class ConfiguratorTest method testAddingBelowBottom.
@Test(expectedExceptions = { IllegalArgumentException.class })
public void testAddingBelowBottom() throws Exception {
Protocol new_prot = new TRACE();
stack.insertProtocol(new_prot, ProtocolStack.Position.BELOW, UDP.class);
}
Aggregations