* @throws Exception
*/
public void testEjbDeploymentInWar() throws Exception
{
Context ctx = new InitialContext();
Counter counter = (Counter) ctx.lookup("CounterDelegateBean/remote");
int count = counter.increment();
assertEquals("Unexpected count after increment", 1, count);
// increment one more time
count = counter.increment();
assertEquals("Unexpected count after second increment", 2, count);
// now decrement
count = counter.decrement();
assertEquals("Unexpected count after decrement", 1, count);
// decrement one more time
count = counter.decrement();
assertEquals("Unexpected count after second decrement", 0, count);
}