@Test
public void testNonSerializable2() throws IgniteCheckedException {

    OptimizedMarshaller marsh = marshaller();
    marsh.setRequireSerializable(false);
    TcpDiscoveryIpFinderAdapter ipFinder = new TcpDiscoveryIpFinderAdapter() {
        @Override public Collection<InetSocketAddress> getRegisteredAddresses() {
            return null;
        }
        @Override public void registerAddresses(Collection<InetSocketAddress> addrs) {
            //No-op.
        }
        @Override public void unregisterAddresses(Collection<InetSocketAddress> addrs) {
            //No-op.
        }
    };
    ipFinder.setShared(false);
    byte[] bytes = marsh.marshal(ipFinder);
    ipFinder = marsh.unmarshal(bytes, null);
    assertFalse(ipFinder.isShared());
}