@@ -0,0 +1,1151 @@
+package com.github.davidmoten.util;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport org.junit.Test;%0A%0Apublic class ImmutableStackTest %7B%0A%0A    private final Object a = new Object();%0A    private final Object b = new Object();%0A    %0A    @Test%0A    public void testNewStackIsEmpty() %7B%0A        ImmutableStack%3CObject%3E s = ImmutableStack.empty();%0A        assertTrue(s.isEmpty());%0A    %7D%0A%0A    @Test(expected = RuntimeException.class)%0A    public void testPopOnEmptyStackThrowsException() %7B%0A        ImmutableStack.empty().pop();%0A    %7D%0A%0A    @Test(expected = RuntimeException.class)%0A    public void testPeekOnEmptyStackThrowsException() %7B%0A        ImmutableStack.empty().peek();%0A    %7D%0A%0A    @Test%0A    public void testStackIsEmptyAfterPushThenPop() %7B%0A        assertTrue(ImmutableStack.empty().push(new Object()).pop().isEmpty());%0A    %7D%0A%0A    @Test%0A    public void testPeekGivesLastPushed() %7B%0A        assertEquals(b,ImmutableStack.empty().push(a).push(b).peek());%0A    %7D%0A%0A    @Test%0A    public void testPopPeekGivesSecondLastPushed() %7B%0A        assertEquals(a,ImmutableStack.empty().push(a).push(b).pop().peek());%0A    %7D%0A    %0A%7D%0A

add test for ImmutableStack