@Test public void testWithSuccess() { SharedResourceRequest request = new SharedResourceRequest(); request.setUniqueKey("HI"); mockery.checking(new Expectations() { { oneOf(nested).transform("HI"); will(returnValue("BYE")); } }); assertEquals("BYE", sut.transform(request)); }
public String transform(final SharedResourceRequest inSharedResourceRequest) { if (inSharedResourceRequest == null || inSharedResourceRequest.getUniqueKey() == null) { return null; } return transformer.transform(inSharedResourceRequest.getUniqueKey()); }
SharedResourceRequestToCacheKeySuffixTransformer implements Transformer<SharedResourceRequest, String> { public String transform(final SharedResourceRequest inSharedResourceRequest) { if (inSharedResourceRequest == null || inSharedResourceRequest.getUniqueKey() == null) { return null; } return transformer.transform(inSharedResourceRequest.getUniqueKey()); } }
SharedResourceRequestToCacheKeySuffixTransformer implements Transformer<SharedResourceRequest, String> { public String transform(final SharedResourceRequest inSharedResourceRequest) { if (inSharedResourceRequest == null || inSharedResourceRequest.getUniqueKey() == null) { return null; } return transformer.transform(inSharedResourceRequest.getUniqueKey()); } SharedResourceRequestToCacheKeySuffixTransformer(final Transformer<String, String> inTransformer); }
SharedResourceRequestToCacheKeySuffixTransformer implements Transformer<SharedResourceRequest, String> { public String transform(final SharedResourceRequest inSharedResourceRequest) { if (inSharedResourceRequest == null || inSharedResourceRequest.getUniqueKey() == null) { return null; } return transformer.transform(inSharedResourceRequest.getUniqueKey()); } SharedResourceRequestToCacheKeySuffixTransformer(final Transformer<String, String> inTransformer); String transform(final SharedResourceRequest inSharedResourceRequest); }
SharedResourceRequestToCacheKeySuffixTransformer implements Transformer<SharedResourceRequest, String> { public String transform(final SharedResourceRequest inSharedResourceRequest) { if (inSharedResourceRequest == null || inSharedResourceRequest.getUniqueKey() == null) { return null; } return transformer.transform(inSharedResourceRequest.getUniqueKey()); } SharedResourceRequestToCacheKeySuffixTransformer(final Transformer<String, String> inTransformer); String transform(final SharedResourceRequest inSharedResourceRequest);  }