@Test public void testApply() throws Exception { OAuthConsumerAppDTO oAuthConsumerAppDTO = new OAuthConsumerAppDTO(); oAuthConsumerAppDTO.setApplicationName("TestApp"); oAuthConsumerAppDTO.setOauthConsumerKey("TestConsumerKey"); AuthorizedAppDTO authorizedAppDTO = new OAuthConsumerAppToExternal().apply(oAuthConsumerAppDTO); Assert.assertEquals(authorizedAppDTO.getAppId(), oAuthConsumerAppDTO.getApplicationName()); Assert.assertEquals(authorizedAppDTO.getClientId(), oAuthConsumerAppDTO.getOauthConsumerKey()); }
@Override public AuthorizedAppDTO apply(OAuthConsumerAppDTO oAuthConsumerAppDTO) { AuthorizedAppDTO authorizedAppDTO = new AuthorizedAppDTO(); authorizedAppDTO.setAppId(oAuthConsumerAppDTO.getApplicationName()); authorizedAppDTO.setClientId(oAuthConsumerAppDTO.getOauthConsumerKey()); return authorizedAppDTO; }
OAuthConsumerAppToExternal implements Function<OAuthConsumerAppDTO, AuthorizedAppDTO> { @Override public AuthorizedAppDTO apply(OAuthConsumerAppDTO oAuthConsumerAppDTO) { AuthorizedAppDTO authorizedAppDTO = new AuthorizedAppDTO(); authorizedAppDTO.setAppId(oAuthConsumerAppDTO.getApplicationName()); authorizedAppDTO.setClientId(oAuthConsumerAppDTO.getOauthConsumerKey()); return authorizedAppDTO; } }
OAuthConsumerAppToExternal implements Function<OAuthConsumerAppDTO, AuthorizedAppDTO> { @Override public AuthorizedAppDTO apply(OAuthConsumerAppDTO oAuthConsumerAppDTO) { AuthorizedAppDTO authorizedAppDTO = new AuthorizedAppDTO(); authorizedAppDTO.setAppId(oAuthConsumerAppDTO.getApplicationName()); authorizedAppDTO.setClientId(oAuthConsumerAppDTO.getOauthConsumerKey()); return authorizedAppDTO; }  }
OAuthConsumerAppToExternal implements Function<OAuthConsumerAppDTO, AuthorizedAppDTO> { @Override public AuthorizedAppDTO apply(OAuthConsumerAppDTO oAuthConsumerAppDTO) { AuthorizedAppDTO authorizedAppDTO = new AuthorizedAppDTO(); authorizedAppDTO.setAppId(oAuthConsumerAppDTO.getApplicationName()); authorizedAppDTO.setClientId(oAuthConsumerAppDTO.getOauthConsumerKey()); return authorizedAppDTO; }  @Override AuthorizedAppDTO apply(OAuthConsumerAppDTO oAuthConsumerAppDTO); }
OAuthConsumerAppToExternal implements Function<OAuthConsumerAppDTO, AuthorizedAppDTO> { @Override public AuthorizedAppDTO apply(OAuthConsumerAppDTO oAuthConsumerAppDTO) { AuthorizedAppDTO authorizedAppDTO = new AuthorizedAppDTO(); authorizedAppDTO.setAppId(oAuthConsumerAppDTO.getApplicationName()); authorizedAppDTO.setClientId(oAuthConsumerAppDTO.getOauthConsumerKey()); return authorizedAppDTO; }  @Override AuthorizedAppDTO apply(OAuthConsumerAppDTO oAuthConsumerAppDTO);  }