gt:             if (listofappCustomerType.size() == 0) {
context: package com.survey.app.server.service;
  import org.junit.runner.RunWith;
  import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  import org.springframework.test.context.web.WebAppConfiguration;
  import com.survey.app.config.WebConfigExtended;
  import org.springframework.test.context.ContextConfiguration;
  import org.junit.FixMethodOrder;
  import org.junit.runners.MethodSorters;
  import org.springframework.test.context.TestExecutionListeners;
  import com.survey.app.server.repository.AppCustomerRepository;
  import com.survey.app.shared.customers.AppCustomer;
  import org.springframework.beans.factory.annotation.Autowired;
  import com.athena.framework.server.helper.RuntimeLogInfoHelper;
  import com.athena.framework.server.helper.EntityValidatorHelper;
  import com.athena.framework.server.test.RandomValueGenerator;
  import java.util.HashMap;
  import com.spartan.healthmeter.entity.scheduler.ArtMethodCallStack;
  import org.springframework.mock.web.MockHttpSession;
  import org.springframework.mock.web.MockHttpServletRequest;
  import org.springframework.mock.web.MockHttpServletResponse;
  import org.junit.Before;
  import org.junit.After;
  import com.athena.framework.shared.entity.web.entityInterface.CommonEntityInterface.RECORD_TYPE;
  import org.junit.Test;
  import com.survey.app.shared.customers.AppCustomerCategory;
  import com.survey.app.server.repository.AppCustomerCategoryRepository;
  import com.survey.app.shared.customers.AppCustomerType;
  import com.survey.app.server.repository.AppCustomerTypeRepository;
  import com.survey.app.shared.contacts.CoreContacts;
  import com.survey.app.server.repository.CoreContactsRepository;
  import com.survey.app.shared.contacts.Gender;
  import com.survey.app.server.repository.GenderRepository;
  import com.survey.app.shared.location.Language;
  import com.survey.app.server.repository.LanguageRepository;
  import com.survey.app.shared.location.Timezone;
  import com.survey.app.server.repository.TimezoneRepository;
  import com.survey.app.shared.contacts.Title;
  import com.survey.app.server.repository.TitleRepository;
  
  @RunWith(SpringJUnit4ClassRunner.class)
  @WebAppConfiguration
  @ContextConfiguration(classes = WebConfigExtended.class)
  @FixMethodOrder(MethodSorters.NAME_ASCENDING)
  @TestExecutionListeners({ org.springframework.test.context.support.DependencyInjectionTestExecutionListener.class, org.springframework.test.context.support.DirtiesContextTestExecutionListener.class, org.springframework.test.context.transaction.TransactionalTestExecutionListener.class })
  public class AppCustomerTestCase {
  
      @Autowired
      private AppCustomerRepository<AppCustomer> appcustomerRepository;
  
      @Autowired
      private RuntimeLogInfoHelper runtimeLogInfoHelper;
  
      @Autowired
      private EntityValidatorHelper<Object> entityValidator;
  
      private RandomValueGenerator valueGenerator = new RandomValueGenerator();
  
      private static HashMap<String, Object> map = new HashMap<String, Object>();
  
      @Autowired
      private ArtMethodCallStack methodCallStack;
  
      protected MockHttpSession session;
  
      protected MockHttpServletRequest request;
  
      protected MockHttpServletResponse response;
  
      protected void startSession() {
          session = new MockHttpSession();
      }
  
      protected void endSession() {
          session.clearAttributes();
          session.invalidate();
          session = null;
      }
  
      protected void startRequest() {
          request = new MockHttpServletRequest();
          request.setSession(session);
          org.springframework.web.context.request.RequestContextHolder.setRequestAttributes(new org.springframework.web.context.request.ServletRequestAttributes(request));
      }
  
      protected void endRequest() {
          ((org.springframework.web.context.request.ServletRequestAttributes) org.springframework.web.context.request.RequestContextHolder.getRequestAttributes()).requestCompleted();
          org.springframework.web.context.request.RequestContextHolder.resetRequestAttributes();
          request = null;
      }
  
      @Before
      public void before() {
          startSession();
          startRequest();
          setBeans();
      }
  
      @After
      public void after() {
          endSession();
          endRequest();
      }
  
      private void setBeans() {
          runtimeLogInfoHelper.createRuntimeLogUserInfo(1, "AAAAA", request.getRemoteHost());
          org.junit.Assert.assertNotNull(runtimeLogInfoHelper);
          methodCallStack.setRequestId(java.util.UUID.randomUUID().toString().toUpperCase());
      }
  
      @Test
      public void test1Save() {
          try {
              AppCustomerCategory appcustomercategory = new AppCustomerCategory();
              appcustomercategory.setCustomerCategory("OucmTtSA8YqZOSlAOuNFpfDL9zfef59TOgzqTxeg2F0krwsdtP");
              AppCustomerCategory AppCustomerCategoryTest = appcustomercategoryRepository.save(appcustomercategory);
              map.put("AppCustomerCategoryPrimaryKey", appcustomercategory._getPrimarykey());
              AppCustomerType appcustomertype = new AppCustomerType();
              appcustomertype.setCustomerType("Of2mK711TFEJ0RLFxzltXFBZ6jukIaVhvNsPyIMpY36Re4Nv68");
              appcustomertype.setDefaults(1);
              appcustomertype.setSequenceId(2147483647);
              AppCustomerType AppCustomerTypeTest = appcustomertypeRepository.save(appcustomertype);
              map.put("AppCustomerTypePrimaryKey", appcustomertype._getPrimarykey());
              CoreContacts corecontacts = new CoreContacts();
              corecontacts.setAge(85);
              corecontacts.setApproximateDOB(new java.sql.Date(123456789));
              corecontacts.setDateofbirth(new java.sql.Date(123456789));
              corecontacts.setEmailId("DTUHYsaQGVLHcnceUc7yFaMukomgnrRde0g44jAk5fa89JYSiB");
              corecontacts.setFirstName("baKeAVOq6PC81B6tEp04GDuAfZOLrNkbLk47tsz4k9HYAg7odg");
              Gender gender = new Gender();
              gender.setGender("nYjElil9jNovmUFHwEpexkbAM5KZLZcEwH4zdlnPCgltQ4hj6z");
              Gender GenderTest = genderRepository.save(gender);
              map.put("GenderPrimaryKey", gender._getPrimarykey());
              Language language = new Language();
              language.setAlpha2("e2");
              language.setAlpha3("d7T");
              language.setAlpha4("f5XJ");
              language.setAlpha4parentid(4);
              language.setLanguage("zVTAKk4craAzSt8SXEgsodaDcsJNzbjO4xRcXYvRNmWS8trTlz");
              language.setLanguageDescription("Xw8Sk0s0gyziUcSLBF87onTNk3VcoLTMHio45rYuZvkBV5or4c");
              language.setLanguageIcon("lBiFpb7tA3QY3qce0rk8nA0rmhWnUvIaLo8JhwAtMFu2dmUMUx");
              language.setLanguageType("IUyjOFcQWRkyAEs0szpbbGg5coXwwzeE");
              Language LanguageTest = languageRepository.save(language);
              map.put("LanguagePrimaryKey", language._getPrimarykey());
              Timezone timezone = new Timezone();
              timezone.setCities("cATzmaejOFZW9uS1GjgnigezqxV6CXyxuVADIyGIcXNITXpe9f");
              timezone.setCountry("4qKYf5scJ5XJ8LmTMosPb21JSyflcegi24OolpxiS0VuU6EK6G");
              timezone.setGmtLabel("NCmNxV0EdUDN6BgmzBeE6cUc95iMSHzgBRyy6ey7i9QolMmBaO");
              timezone.setTimeZoneLabel("kgfUJ5bvD65vVbgtLJKSc6TMMFnTqbrmsltMPYsEjOMpUq91ca");
              timezone.setUtcdifference(7);
              Timezone TimezoneTest = timezoneRepository.save(timezone);
              map.put("TimezonePrimaryKey", timezone._getPrimarykey());
              Title title = new Title();
              title.setTitles("Dr11YhAUXRuxUd5Tc4azJPbS1tkJtIBhfgxPr0SXZK0ECcto0n");
              Title TitleTest = titleRepository.save(title);
              map.put("TitlePrimaryKey", title._getPrimarykey());
              corecontacts.setAge(25);
              corecontacts.setApproximateDOB(new java.sql.Date(123456789));
              corecontacts.setDateofbirth(new java.sql.Date(123456789));
              corecontacts.setEmailId("n8An7feCPRH26CZxeD0zXSYNbuDNJFv2eQAjiO6J3fijEUdIr8");
              corecontacts.setFirstName("Spy66tGINBOX4wTmC1JZRPjHvSVpengE39vPpsfQjZ1PHUVYqO");
              corecontacts.setGenderId((java.lang.String) GenderTest._getPrimarykey()); /* ******Adding refrenced table data */
              corecontacts.setLastName("tYaEzqPVxYmWS6lggbPqhM8aMf0VRCiGzijoGI4dNFtrsm8Kec");
              corecontacts.setMiddleName("kZYwlCX1LkXiEo5Eaj2OuQKooR0LR9HxLI6OaxaVgxBR2nQeek");
              corecontacts.setNativeFirstName("NphF23EHQWF15JMrCJdIf9lDk6XOADxVzgie8W4JuCetWMNitg");
              corecontacts.setNativeLanguageCode((java.lang.String) LanguageTest._getPrimarykey()); /* ******Adding refrenced table data */
              corecontacts.setNativeLastName("XPbbrddbu3LyeFlPQNKAVxSjBQtgNjSA23gIpSDNB9XBkvVNhh");
              corecontacts.setNativeMiddleName("bBgCY0FIJe3JrjpT0uhZ9cMZ8WoLq0kJGm4EnZ1mXPrqtEZfxB");
              corecontacts.setNativeTitle("XeJjSrJp91JYOIvOFiisRMPMBwfBmhFEQegpcQTCH7DDIwxFKX");
              corecontacts.setPhoneNumber("982NikGac2Zf9pkTXady");
              corecontacts.setTimeZone((java.lang.String) TimezoneTest._getPrimarykey()); /* ******Adding refrenced table data */
              corecontacts.setTitleId((java.lang.String) TitleTest._getPrimarykey()); /* ******Adding refrenced table data */
              CoreContacts CoreContactsTest = corecontactsRepository.save(corecontacts);
              map.put("CoreContactsPrimaryKey", corecontacts._getPrimarykey());
              AppCustomer appcustomer = new AppCustomer();
              appcustomer.setAppCustomerCategory((java.lang.String) AppCustomerCategoryTest._getPrimarykey()); /* ******Adding refrenced table data */
              appcustomer.setAppCustomerType((java.lang.String) AppCustomerTypeTest._getPrimarykey()); /* ******Adding refrenced table data */
              appcustomer.setContactId((java.lang.String) CoreContactsTest._getPrimarykey());
              appcustomer.setCustomerName("DSsxzCKgJpoZvRaXaJRyQOHSWDqEiHsfOWHTMIYb2ahiEEAgYo");
              appcustomer.setCustomerStatus(0);
              appcustomer.setDeploymentModel(true);
              appcustomer.setEvalTimePeriod(2147483647);
              appcustomer.setUserRequested(2147483647);
              appcustomer.setEntityAudit(1, "xyz", RECORD_TYPE.ADD);
              appcustomer.setEntityValidator(entityValidator);
              appcustomer.isValid();
              appcustomerRepository.save(appcustomer);
              map.put("AppCustomerPrimaryKey", appcustomer._getPrimarykey());
          } catch (com.athena.framework.server.exception.biz.SpartanConstraintViolationException e) {
              org.junit.Assert.fail(e.getMessage());
          } catch (java.lang.Exception e) {
              org.junit.Assert.fail(e.getMessage());
          }
      }
  
      @Autowired
      private AppCustomerCategoryRepository<AppCustomerCategory> appcustomercategoryRepository;
  
      @Autowired
      private AppCustomerTypeRepository<AppCustomerType> appcustomertypeRepository;
  
      @Autowired
      private CoreContactsRepository<CoreContacts> corecontactsRepository;
  
      @Autowired
      private GenderRepository<Gender> genderRepository;
  
      @Autowired
      private LanguageRepository<Language> languageRepository;
  
      @Autowired
      private TimezoneRepository<Timezone> timezoneRepository;
  
      @Autowired
      private TitleRepository<Title> titleRepository;
  
      @Test
      public void test2Update() {
          try {
              org.junit.Assert.assertNotNull(map.get("AppCustomerPrimaryKey"));
              AppCustomer appcustomer = appcustomerRepository.findById((java.lang.String) map.get("AppCustomerPrimaryKey"));
              appcustomer.setCustomerName("P4XIwr4Six1KtkG5nQNzhsyoPZ1cis2xIl9db0UO7o8fB3lM1C");
              appcustomer.setCustomerStatus(1);
              appcustomer.setEvalTimePeriod(2147483647);
              appcustomer.setUserRequested(2147483647);
              appcustomer.setVersionId(1);
              appcustomer.setEntityAudit(1, "xyz", RECORD_TYPE.UPDATE);
              appcustomerRepository.update(appcustomer);
          } catch (com.athena.framework.server.exception.repository.SpartanPersistenceException e) {
              org.junit.Assert.fail(e.getMessage());
          } catch (java.lang.Exception e) {
              org.junit.Assert.fail(e.getMessage());
          }
      }
  
      @Test
      public void test3findByappCustomerCategory() {
          try {
              java.util.List<AppCustomer> listofappCustomerCategory = appcustomerRepository.findByAppCustomerCategory((java.lang.String) map.get("AppCustomerCategoryPrimaryKey"));
              if (listofappCustomerCategory.size() == 0) {
                  org.junit.Assert.fail("Query did not return any records.");
              }
          } catch (com.athena.framework.server.exception.repository.SpartanPersistenceException e) {
              org.junit.Assert.fail(e.getMessage());
          } catch (Exception e) {
              org.junit.Assert.fail(e.getMessage());
          }
      }
  
      @Test
      public void test3FindById() {
          try {
              org.junit.Assert.assertNotNull(map.get("AppCustomerPrimaryKey"));
              appcustomerRepository.findById((java.lang.String) map.get("AppCustomerPrimaryKey"));
          } catch (com.athena.framework.server.exception.repository.SpartanPersistenceException e) {
              org.junit.Assert.fail(e.getMessage());
          } catch (Exception e) {
              org.junit.Assert.fail(e.getMessage());
          }
      }
  
      @Test
      public void test3findByappCustomerType() {
          try {
              java.util.List<AppCustomer> listofappCustomerType = appcustomerRepository.findByAppCustomerType((java.lang.String) map.get("AppCustomerTypePrimaryKey"));
  