1 package no.knowit.helloejb;
   2 import org.testng.Assert;
   3 import org.testng.annotations.Test;
   4 import no.knowit.openejb.mock.OpenEjbTest;
   5 
   6 public class HelloEjbTest extends OpenEjbTest {
   7   private static final String  EXPECTED_HELLO = "hello";
   8 
   9   @Test
  10   public void shouldSayHello()  throws Exception {
  11 
  12     HelloEjb hello = (HelloEjb)initialContext.lookup("HelloEjbBean/Local");
  13     assert hello != null : "initialContext.lookup(\"HelloEjbBean/Local\") returned null";
  14 
  15     Assert.assertEquals(EXPECTED_HELLO, hello.sayHello(), "hello.sayHello:");
  16   }
  17 }