String testStackName = "org.apache.commons.digester3.tests.testNamedStackPushPeekPop";
Digester digester = new Digester();
assertTrue( "Stack starts empty:", digester.isEmpty( testStackName ) );
digester.push( testStackName, archimedesAveragePi );
assertEquals( "Peeked value:", archimedesAveragePi, digester.peek( testStackName ) );
assertEquals( "Popped value:", archimedesAveragePi, digester.pop( testStackName ) );
assertTrue( "Stack ends empty:", digester.isEmpty( testStackName ) );
digester.push( testStackName, "1" );
digester.push( testStackName, "2" );
digester.push( testStackName, "3" );