@Test public void testTransformLongResult() { context.checking(new Expectations() { { allowing(actionContext).getParams(); will(returnValue(request)); allowing(request).getEntityId(); will(returnValue(5L)); } }); assertEquals(5L, sut.transform(actionContext)); context.assertIsSatisfied(); }
@Override public Serializable transform(final ActionContext inActionContext) { ResizeAvatarRequest request = (ResizeAvatarRequest) inActionContext.getParams(); return returnValueAsString ? request.getEntityId().toString() : request.getEntityId(); }
EntityIdFromResizeAvatarRequestTransformer implements RequestTransformer { @Override public Serializable transform(final ActionContext inActionContext) { ResizeAvatarRequest request = (ResizeAvatarRequest) inActionContext.getParams(); return returnValueAsString ? request.getEntityId().toString() : request.getEntityId(); } }
EntityIdFromResizeAvatarRequestTransformer implements RequestTransformer { @Override public Serializable transform(final ActionContext inActionContext) { ResizeAvatarRequest request = (ResizeAvatarRequest) inActionContext.getParams(); return returnValueAsString ? request.getEntityId().toString() : request.getEntityId(); }  }
EntityIdFromResizeAvatarRequestTransformer implements RequestTransformer { @Override public Serializable transform(final ActionContext inActionContext) { ResizeAvatarRequest request = (ResizeAvatarRequest) inActionContext.getParams(); return returnValueAsString ? request.getEntityId().toString() : request.getEntityId(); }  @Override Serializable transform(final ActionContext inActionContext); void setReturnValueAsString(final Boolean inReturnValueAsString); }
EntityIdFromResizeAvatarRequestTransformer implements RequestTransformer { @Override public Serializable transform(final ActionContext inActionContext) { ResizeAvatarRequest request = (ResizeAvatarRequest) inActionContext.getParams(); return returnValueAsString ? request.getEntityId().toString() : request.getEntityId(); }  @Override Serializable transform(final ActionContext inActionContext); void setReturnValueAsString(final Boolean inReturnValueAsString);  }