@Test public void testRetrievingOauthToken() { context.checking(new Expectations() { { oneOf(actionContext).getParams(); will(returnValue("token")); oneOf(entryMapper).execute("token"); will(returnValue(new OAuthDomainEntry())); oneOf(conversionStrat).convertToEntry(with(any(OAuthDomainEntry.class))); } }); OAuthEntry results = (OAuthEntry) sut.execute(actionContext); assertNotNull(results); context.assertIsSatisfied(); }
@Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { String token = (String) inActionContext.getParams(); OAuthDomainEntry dto = entryMapper.execute(token); return (dto == null) ? null : conversionStrat.convertToEntry(dto); }
GetOAuthEntryByTokenExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { String token = (String) inActionContext.getParams(); OAuthDomainEntry dto = entryMapper.execute(token); return (dto == null) ? null : conversionStrat.convertToEntry(dto); } }
GetOAuthEntryByTokenExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { String token = (String) inActionContext.getParams(); OAuthDomainEntry dto = entryMapper.execute(token); return (dto == null) ? null : conversionStrat.convertToEntry(dto); } GetOAuthEntryByTokenExecution(final DomainMapper<String, OAuthDomainEntry> inMapper,
            final OAuthEntryConversionStrategy inConversionStrat); }
GetOAuthEntryByTokenExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { String token = (String) inActionContext.getParams(); OAuthDomainEntry dto = entryMapper.execute(token); return (dto == null) ? null : conversionStrat.convertToEntry(dto); } GetOAuthEntryByTokenExecution(final DomainMapper<String, OAuthDomainEntry> inMapper,
            final OAuthEntryConversionStrategy inConversionStrat); @Override Serializable execute(final PrincipalActionContext inActionContext); }
GetOAuthEntryByTokenExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { String token = (String) inActionContext.getParams(); OAuthDomainEntry dto = entryMapper.execute(token); return (dto == null) ? null : conversionStrat.convertToEntry(dto); } GetOAuthEntryByTokenExecution(final DomainMapper<String, OAuthDomainEntry> inMapper,
            final OAuthEntryConversionStrategy inConversionStrat); @Override Serializable execute(final PrincipalActionContext inActionContext);  }