@Test public void constructTheExceptionWithADescriptor() { final SelectOneDescriptor<PersistentObject> descriptor = new SelectOneDescriptor<PersistentObject>( "getPersistentObject", null, PersistentObject.class); final SBonitaReadException cause = new SBonitaReadException("problem", null, descriptor); final SProcessInstanceReadException exception = new SProcessInstanceReadException(cause); assertEquals(descriptor.toString(), exception.getMessage()); }
@Test public void constructTheExceptionWithoutADescriptor() { final SBonitaReadException cause = new SBonitaReadException("problem"); final SProcessInstanceReadException exception = new SProcessInstanceReadException(cause); assertTrue(exception.getMessage().isEmpty()); }