public class TestEnumValueAnnotation extends BaseTestCase {
@Test
public void test() {
EBasic b = new EBasic();
b.setName("Banana");
b.setStatus(Status.NEW);
Ebean.save(b);
SqlQuery q = Ebean.createSqlQuery("select * from e_basic where id = :id");
q.setParameter("id", b.getId());
SqlRow sqlRow = q.findUnique();
String strStatus = sqlRow.getString("status");
Assert.assertEquals("N", strStatus);
EBasic b2 = new EBasic();
b2.setName("Apple");
b2.setStatus(Status.NEW);
Ebean.save(b2);
EBasic b3 = Ebean.find(EBasic.class, b2.getId());
b3.setName("Orange");
Ebean.save(b3);
}