@Test public void testGetNotificationRegistrationStatusAssertReturnNullWhenNotExist() { NotificationRegistrationStatusEntity notificationRegistrationStatusEntity = new NotificationRegistrationStatusEntity(); notificationRegistrationStatusEntity.setCode("test"); notificationRegistrationStatusEntity.setDescription("a description"); herdDao.saveAndRefresh(notificationRegistrationStatusEntity); NotificationRegistrationStatusEntity result = notificationRegistrationStatusDao.getNotificationRegistrationStatus("DOES_NOT_EXIST"); assertNull(result); }
@Test public void testGetNotificationRegistrationStatusAssertReturnEntityWhenExistsAndDifferentCase() { NotificationRegistrationStatusEntity notificationRegistrationStatusEntity = new NotificationRegistrationStatusEntity(); notificationRegistrationStatusEntity.setCode("test"); notificationRegistrationStatusEntity.setDescription("a description"); herdDao.saveAndRefresh(notificationRegistrationStatusEntity); NotificationRegistrationStatusEntity result = notificationRegistrationStatusDao.getNotificationRegistrationStatus("TEST"); assertNotNull(result); assertEquals("test", result.getCode()); }