@Before public void before() { lockProcessInstanceWork = new LockProcessInstanceWork(wrappedWork, processInstanceId); when(wrappedWork.getTenantId()).thenReturn(TENANT_ID); tenantAccessor = mock(TenantServiceAccessor.class); lockService = mock(LockService.class); workService = mock(WorkService.class); when(tenantAccessor.getLockService()).thenReturn(lockService); when(tenantAccessor.getWorkService()).thenReturn(workService); when(tenantAccessor.getTechnicalLoggerService()).thenReturn(mock(TechnicalLoggerService.class)); }
@Test public void getRecoveryProcedure() { when(wrappedWork.getRecoveryProcedure()).thenReturn("recoveryProcedure"); assertEquals("recoveryProcedure", lockProcessInstanceWork.getRecoveryProcedure()); }
@Test public void getDescription() { when(wrappedWork.getDescription()).thenReturn("The description"); assertEquals("The description", lockProcessInstanceWork.getDescription()); }
@Test public void testToString() { when(wrappedWork.toString()).thenReturn("the to string"); assertEquals("the to string", lockProcessInstanceWork.toString()); }
@Test public void getTenantId() { when(wrappedWork.getTenantId()).thenReturn(12L); assertEquals(12, lockProcessInstanceWork.getTenantId()); }