@Test
public void optimisticLockException_shouldThrowOptimisticLockErrorPage() throws Exception {

    ExecutionContext context = new ExecutionContext();
    context.addHandler((o, context1) -> {
        throw new OptimisticLockException();
    });
    expectedException.expect(HttpErrorResponse.class);
    expectedException.expect(
            ContentPathMatcher.hasContentPath("/WEB-INF/view/common/errorPages/optimisticLockError.jsp"));
    expectedException.expect(StatusCodeMatcher.isStatusCode(400));
    sut.handle(new Object(), context);
}