@Test
public void testReplaceTop() throws Exception {

    stack.push("a");
    stack.push("b");
    stack.replaceTop("c");
    ReflectionAssert.assertReflectionEquals(new String[]{"a", "c"}, stack.getList().toArray());
    stack.replaceTop("d");
    stack.pop();
    stack.replaceTop("e");
    ReflectionAssert.assertReflectionEquals(new String[]{"e"}, stack.getList().toArray());
}