Program: 175973
Project: 175973
Buggy source:
@Test public void testPersist(){
  EntityManager em=emf.createEntityManager();
  em.clear();
  RedisGeneratedIdDefault idDefault=new RedisGeneratedIdDefault();
  idDefault.setName("String_Node_Str");
  try {
    em.persist(idDefault);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.AUTO+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
  RedisGeneratedIdStrategyAuto strategyAuto=new RedisGeneratedIdStrategyAuto();
  strategyAuto.setName("String_Node_Str");
  em.clear();
  try {
    em.persist(strategyAuto);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.AUTO+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
  em.clear();
  RedisGeneratedIdStrategyIdentity strategyIdentity=new RedisGeneratedIdStrategyIdentity();
  strategyIdentity.setName("String_Node_Str");
  try {
    em.persist(strategyIdentity);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.IDENTITY+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
  em.clear();
  RedisGeneratedIdStrategySequence strategySequence=new RedisGeneratedIdStrategySequence();
  strategySequence.setName("String_Node_Str");
  try {
    em.persist(strategySequence);
    List<RedisGeneratedIdStrategySequence> list=em.createQuery("String_Node_Str").getResultList();
    Assert.assertNotNull(list);
    Assert.assertEquals(1,list.size());
    Assert.assertEquals("String_Node_Str",list.get(0).getName());
    Object id=list.get(0).getId();
    em.clear();
    strategySequence=em.find(RedisGeneratedIdStrategySequence.class,id);
    Assert.assertNotNull(strategySequence);
    Assert.assertEquals("String_Node_Str",strategySequence.getName());
  }
 catch (  KunderaException e) {
    Assert.fail();
  }
  em.clear();
  RedisGeneratedIdStrategyTable strategyTable=new RedisGeneratedIdStrategyTable();
  strategyTable.setName("String_Node_Str");
  try {
    em.persist(strategyTable);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.TABLE+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
  em.clear();
  RedisGeneratedIdWithOutSequenceGenerator withOutSequenceGenerator=new RedisGeneratedIdWithOutSequenceGenerator();
  withOutSequenceGenerator.setName("String_Node_Str");
  try {
    em.persist(withOutSequenceGenerator);
    List<RedisGeneratedIdWithOutSequenceGenerator> list=em.createQuery("String_Node_Str").getResultList();
    Assert.assertNotNull(list);
    Assert.assertEquals(1,list.size());
    Assert.assertEquals("String_Node_Str",list.get(0).getName());
    Object id=list.get(0).getId();
    em.clear();
    withOutSequenceGenerator=em.find(RedisGeneratedIdWithOutSequenceGenerator.class,id);
    Assert.assertNotNull(withOutSequenceGenerator);
    Assert.assertEquals("String_Node_Str",withOutSequenceGenerator.getName());
  }
 catch (  KunderaException e) {
    Assert.fail();
  }
  em.clear();
  RedisGeneratedIdWithOutTableGenerator withOutTableGenerator=new RedisGeneratedIdWithOutTableGenerator();
  withOutTableGenerator.setName("String_Node_Str");
  try {
    em.persist(withOutTableGenerator);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.TABLE+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
  em.clear();
  RedisGeneratedIdWithSequenceGenerator withSequenceGenerator=new RedisGeneratedIdWithSequenceGenerator();
  withSequenceGenerator.setName("String_Node_Str");
  try {
    em.persist(withSequenceGenerator);
    List<RedisGeneratedIdWithSequenceGenerator> list=em.createQuery("String_Node_Str").getResultList();
    Assert.assertNotNull(list);
    Assert.assertEquals(1,list.size());
    Assert.assertEquals("String_Node_Str",list.get(0).getName());
    Object id=list.get(0).getId();
    em.clear();
    withSequenceGenerator=em.find(RedisGeneratedIdWithSequenceGenerator.class,id);
    Assert.assertNotNull(withSequenceGenerator);
    Assert.assertEquals("String_Node_Str",withSequenceGenerator.getName());
  }
 catch (  KunderaException e) {
    Assert.fail();
  }
  em.clear();
  RedisGeneratedIdWithTableGenerator withTableGenerator=new RedisGeneratedIdWithTableGenerator();
  withTableGenerator.setName("String_Node_Str");
  try {
    em.persist(withTableGenerator);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.TABLE+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
}

Fixed version (ground truth):
@Test public void testPersist(){
  purge();
  RedisGeneratedIdDefault idDefault=new RedisGeneratedIdDefault();
  idDefault.setName("String_Node_Str");
  try {
    em.persist(idDefault);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.AUTO+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
  RedisGeneratedIdStrategyAuto strategyAuto=new RedisGeneratedIdStrategyAuto();
  strategyAuto.setName("String_Node_Str");
  em.clear();
  try {
    em.persist(strategyAuto);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.AUTO+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
  em.clear();
  RedisGeneratedIdStrategyIdentity strategyIdentity=new RedisGeneratedIdStrategyIdentity();
  strategyIdentity.setName("String_Node_Str");
  try {
    em.persist(strategyIdentity);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.IDENTITY+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
  em.clear();
  RedisGeneratedIdStrategySequence strategySequence=new RedisGeneratedIdStrategySequence();
  strategySequence.setName("String_Node_Str");
  try {
    em.persist(strategySequence);
    List<RedisGeneratedIdStrategySequence> list=em.createQuery("String_Node_Str").getResultList();
    Assert.assertNotNull(list);
    Assert.assertEquals(1,list.size());
    Assert.assertEquals("String_Node_Str",list.get(0).getName());
    Object id=list.get(0).getId();
    em.clear();
    strategySequence=em.find(RedisGeneratedIdStrategySequence.class,id);
    Assert.assertNotNull(strategySequence);
    Assert.assertEquals("String_Node_Str",strategySequence.getName());
  }
 catch (  KunderaException e) {
    Assert.fail();
  }
  em.clear();
  RedisGeneratedIdStrategyTable strategyTable=new RedisGeneratedIdStrategyTable();
  strategyTable.setName("String_Node_Str");
  try {
    em.persist(strategyTable);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.TABLE+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
  em.clear();
  RedisGeneratedIdWithOutSequenceGenerator withOutSequenceGenerator=new RedisGeneratedIdWithOutSequenceGenerator();
  withOutSequenceGenerator.setName("String_Node_Str");
  try {
    em.persist(withOutSequenceGenerator);
    List<RedisGeneratedIdWithOutSequenceGenerator> list=em.createQuery("String_Node_Str").getResultList();
    Assert.assertNotNull(list);
    Assert.assertEquals(1,list.size());
    Assert.assertEquals("String_Node_Str",list.get(0).getName());
    Object id=list.get(0).getId();
    em.clear();
    withOutSequenceGenerator=em.find(RedisGeneratedIdWithOutSequenceGenerator.class,id);
    Assert.assertNotNull(withOutSequenceGenerator);
    Assert.assertEquals("String_Node_Str",withOutSequenceGenerator.getName());
  }
 catch (  KunderaException e) {
    Assert.fail();
  }
  em.clear();
  RedisGeneratedIdWithOutTableGenerator withOutTableGenerator=new RedisGeneratedIdWithOutTableGenerator();
  withOutTableGenerator.setName("String_Node_Str");
  try {
    em.persist(withOutTableGenerator);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.TABLE+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
  em.clear();
  RedisGeneratedIdWithSequenceGenerator withSequenceGenerator=new RedisGeneratedIdWithSequenceGenerator();
  withSequenceGenerator.setName("String_Node_Str");
  try {
    em.persist(withSequenceGenerator);
    List<RedisGeneratedIdWithSequenceGenerator> list=em.createQuery("String_Node_Str").getResultList();
    Assert.assertNotNull(list);
    Assert.assertEquals(1,list.size());
    Assert.assertEquals("String_Node_Str",list.get(0).getName());
    Object id=list.get(0).getId();
    em.clear();
    withSequenceGenerator=em.find(RedisGeneratedIdWithSequenceGenerator.class,id);
    Assert.assertNotNull(withSequenceGenerator);
    Assert.assertEquals("String_Node_Str",withSequenceGenerator.getName());
  }
 catch (  KunderaException e) {
    Assert.fail();
  }
  em.clear();
  RedisGeneratedIdWithTableGenerator withTableGenerator=new RedisGeneratedIdWithTableGenerator();
  withTableGenerator.setName("String_Node_Str");
  try {
    em.persist(withTableGenerator);
    Assert.fail();
  }
 catch (  KunderaException e) {
    Assert.assertEquals("String_Node_Str" + GenerationType.class.getSimpleName() + "String_Node_Str"+ GenerationType.TABLE+ "String_Node_Str"+ RedisClient.class.getName(),e.getMessage());
  }
}