@@ -0,0 +1,913 @@
+//%0A// Triple Play - utilities for use in PlayN-based games%0A// Copyright (c) 2011-2013, Three Rings Design, Inc. - All rights reserved.%0A// http://github.com/threerings/tripleplay/blob/master/LICENSE%0A%0Apackage tripleplay.util;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport playn.core.Connection;%0A%0Apublic class LayersTest%0A%7B%0A    @Test%0A    public void testJoin () %7B%0A        class TestConn implements Connection %7B%0A            int disconnects;%0A            @Override public void disconnect () %7B%0A                disconnects++;%0A            %7D%0A        %7D%0A%0A        Connection joined;%0A        joined = Layers.join();%0A        joined.disconnect();%0A        joined.disconnect();%0A%0A        TestConn c1 = new TestConn();%0A        joined = Layers.join(c1, joined);%0A        joined.disconnect();%0A        Assert.assertEquals(c1.disconnects, 1);%0A        joined.disconnect();%0A        Assert.assertEquals(c1.disconnects, 1);%0A    %7D%0A%7D%0A

Test for Layers