public void testExecuteOperationsSetsErrorOnInvalidRequestException() throws Exception {
String operationId = "op1";
OperationRequest operation = new OperationRequest("wavelet.create", operationId);
OperationService service =
mock(OperationService.class, new ThrowsException(new InvalidRequestException("")));
when(operationRegistry.getServiceFor(any(OperationType.class))).thenReturn(service);
OperationUtil.executeOperation(operation, operationRegistry, context, ALEX);
assertTrue("Expected one response", context.getResponses().size() == 1);