@Test public void testCopy() { Map<Symbol, Object> properties = new HashMap<>(); properties.put(Symbol.valueOf("x-opt"), "value"); Open open = new Open(); open.setContainerId("test"); open.setHostname("host"); open.setMaxFrameSize(UnsignedInteger.valueOf(42)); open.setChannelMax(UnsignedShort.MAX_VALUE); open.setIdleTimeOut(UnsignedInteger.valueOf(111)); open.setOfferedCapabilities(new Symbol[] { Symbol.valueOf("anonymous-relay") }); open.setDesiredCapabilities(new Symbol[0]); open.setProperties(properties); Open copyOf = open.copy(); assertEquals(open.getContainerId(), copyOf.getContainerId()); assertEquals(open.getHostname(), copyOf.getHostname()); assertEquals(open.getMaxFrameSize(), copyOf.getMaxFrameSize()); assertEquals(open.getChannelMax(), copyOf.getChannelMax()); assertEquals(open.getIdleTimeOut(), copyOf.getIdleTimeOut()); assertArrayEquals(open.getDesiredCapabilities(), copyOf.getDesiredCapabilities()); assertArrayEquals(open.getOfferedCapabilities(), copyOf.getOfferedCapabilities()); assertEquals(open.getProperties(), copyOf.getProperties()); }
@Override public Open copy() { return new Open(this); }
Open implements FrameBody { @Override public Open copy() { return new Open(this); } }
Open implements FrameBody { @Override public Open copy() { return new Open(this); } Open(); @SuppressWarnings("unchecked")  Open(Open other); }
Open implements FrameBody { @Override public Open copy() { return new Open(this); } Open(); @SuppressWarnings("unchecked")  Open(Open other); String getContainerId(); void setContainerId(String containerId); String getHostname(); void setHostname(String hostname); UnsignedInteger getMaxFrameSize(); void setMaxFrameSize(UnsignedInteger maxFrameSize); UnsignedShort getChannelMax(); void setChannelMax(UnsignedShort channelMax); UnsignedInteger getIdleTimeOut(); void setIdleTimeOut(UnsignedInteger idleTimeOut); Symbol[] getOutgoingLocales(); void setOutgoingLocales(Symbol... outgoingLocales); Symbol[] getIncomingLocales(); void setIncomingLocales(Symbol... incomingLocales); Symbol[] getOfferedCapabilities(); void setOfferedCapabilities(Symbol... offeredCapabilities); Symbol[] getDesiredCapabilities(); void setDesiredCapabilities(Symbol... desiredCapabilities); Map getProperties(); void setProperties(Map properties); @Override void invoke(FrameBodyHandler<E> handler, Binary payload, E context); @Override String toString(); @Override Open copy(); }
Open implements FrameBody { @Override public Open copy() { return new Open(this); } Open(); @SuppressWarnings("unchecked")  Open(Open other); String getContainerId(); void setContainerId(String containerId); String getHostname(); void setHostname(String hostname); UnsignedInteger getMaxFrameSize(); void setMaxFrameSize(UnsignedInteger maxFrameSize); UnsignedShort getChannelMax(); void setChannelMax(UnsignedShort channelMax); UnsignedInteger getIdleTimeOut(); void setIdleTimeOut(UnsignedInteger idleTimeOut); Symbol[] getOutgoingLocales(); void setOutgoingLocales(Symbol... outgoingLocales); Symbol[] getIncomingLocales(); void setIncomingLocales(Symbol... incomingLocales); Symbol[] getOfferedCapabilities(); void setOfferedCapabilities(Symbol... offeredCapabilities); Symbol[] getDesiredCapabilities(); void setDesiredCapabilities(Symbol... desiredCapabilities); Map getProperties(); void setProperties(Map properties); @Override void invoke(FrameBodyHandler<E> handler, Binary payload, E context); @Override String toString(); @Override Open copy();  }