@Test(expected = IllegalArgumentException.class)
public void testCreateWhenTaskThrowsException() {

    final RevisionInfo requestRevision = new RevisionInfo("client1", 0L);
    final RevisableEntity requestEntity = new TestEntity("1", requestRevision);
    entityService.create(requestEntity, "user1", () -> {
        throw new IllegalArgumentException("");
    });
}