@Test public void testUnregisteredAppAuthException() { String message = "Authentication invoked for unregistered application - Integration jira"; String solution = "Check if the CNAME on provided certificate for integration jira matches " + "with the application identifier."; doReturn(message).when(logMessage).getMessage(UNREGISTERED_APP_MESSAGE, JIRA); doReturn(solution).when(logMessage).getMessage(UNREGISTERED_APP_SOLUTION, JIRA); try { proxy.httpClientForApplication(JIRA, SERVICE_NAME); fail(); } catch (UnregisteredAppAuthException e) { assertEquals(ExceptionMessageFormatter.format("Authentication Proxy", message, solution), e.getMessage()); } }
@Override public Client httpClientForApplication(String applicationId, ServiceName serviceName) { return contextForApplication(applicationId).httpClientForContext(serviceName); }
AppAuthenticationProxyImpl implements AppAuthenticationProxy { @Override public Client httpClientForApplication(String applicationId, ServiceName serviceName) { return contextForApplication(applicationId).httpClientForContext(serviceName); } }
AppAuthenticationProxyImpl implements AppAuthenticationProxy { @Override public Client httpClientForApplication(String applicationId, ServiceName serviceName) { return contextForApplication(applicationId).httpClientForContext(serviceName); }  }
AppAuthenticationProxyImpl implements AppAuthenticationProxy { @Override public Client httpClientForApplication(String applicationId, ServiceName serviceName) { return contextForApplication(applicationId).httpClientForContext(serviceName); }  @PostConstruct void init(); @Override void registerApplication(String applicationId, KeyStore keyStore, String keyStorePassword); @Override Client httpClientForApplication(String applicationId, ServiceName serviceName); @Override AppToken authenticate(String appId, String appToken); @Override PodCertificate getPodPublicCertificate(String appId); }
AppAuthenticationProxyImpl implements AppAuthenticationProxy { @Override public Client httpClientForApplication(String applicationId, ServiceName serviceName) { return contextForApplication(applicationId).httpClientForContext(serviceName); }  @PostConstruct void init(); @Override void registerApplication(String applicationId, KeyStore keyStore, String keyStorePassword); @Override Client httpClientForApplication(String applicationId, ServiceName serviceName); @Override AppToken authenticate(String appId, String appToken); @Override PodCertificate getPodPublicCertificate(String appId);  }