@Test public void testWrongTruststoreType() throws Exception { boolean sawExpectedEx = false; String expectedLogMessage = "Exception .* caught loading file .*truststore-JCEKS.db.* you may need to specify " + "\"<type>JCEKS</type>\" in the gateway configuration file"; String expected = "Invalid keystore format"; LogMessageInspector inspector = LogMessageInspector.create(Gateway.class); try { configFile = createTempFileFromResource("org/kaazing/gateway/server/config/parse/data/gateway-config-wrong-truststore" + "-type.xml"); GatewayConfigDocument doc = parser.parse(configFile); Assert.assertNotNull(doc); resolver.resolve(doc); } catch (IOException e) { if (e.getMessage().contains(expected)) { sawExpectedEx = true; } final List<LoggingEvent> grepResult = inspector.grep(org.apache.log4j.Level.ERROR, expectedLogMessage); Assert.assertEquals("Expected to find a matching error message", 1, grepResult.size()); } Assert.assertTrue(String .format("Did not see expected IllegalArgumentException with message '%s'", expected), sawExpectedEx); }
public GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc) throws Exception { return resolve(gatewayConfigDoc, System.getProperties()); }
GatewayContextResolver { public GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc) throws Exception { return resolve(gatewayConfigDoc, System.getProperties()); } }
GatewayContextResolver { public GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc) throws Exception { return resolve(gatewayConfigDoc, System.getProperties()); } GatewayContextResolver(File configDir, File webDir, File tempDir);  GatewayContextResolver(File configDir, File webDir, File tempDir, MBeanServer mbeanServer);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir, MBeanServer mbeanServer); }
GatewayContextResolver { public GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc) throws Exception { return resolve(gatewayConfigDoc, System.getProperties()); } GatewayContextResolver(File configDir, File webDir, File tempDir);  GatewayContextResolver(File configDir, File webDir, File tempDir, MBeanServer mbeanServer);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir, MBeanServer mbeanServer); GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc); GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc, Properties configuration); void addInjectable(String key, Object value); Map<String, Object> getInjectables(); ConfigurationObserver getObserver(); void setObserver(ConfigurationObserver observer); }
GatewayContextResolver { public GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc) throws Exception { return resolve(gatewayConfigDoc, System.getProperties()); } GatewayContextResolver(File configDir, File webDir, File tempDir);  GatewayContextResolver(File configDir, File webDir, File tempDir, MBeanServer mbeanServer);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir, MBeanServer mbeanServer); GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc); GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc, Properties configuration); void addInjectable(String key, Object value); Map<String, Object> getInjectables(); ConfigurationObserver getObserver(); void setObserver(ConfigurationObserver observer); static final String AUTHORIZATION_MODE_CHALLENGE; static final String AUTH_SCHEME_BASIC; static final String AUTH_SCHEME_NEGOTIATE; static final String AUTH_SCHEME_APPLICATION_TOKEN; static final String AUTH_SCHEME_APPLICATION_PREFIX; }