APNSConnectionFactory { @Nonnull public APNSGatewayConnection createPushConnection() throws APNSGatewayConnectionException { return new APNSGatewayConnection(createConnection(gatewayHost, gatewayPort)); } APNSConnectionFactory(@Nonnull final String gatewayHost,
                                 @Nonnull final Integer gatewayPort,
                                 @Nonnull final String feedbackHost,
                                 @Nonnull final Integer feedbackPort,
                                 @Nonnull final String p12KeyStorePath,
                                 @Nonnull final String p12KeyStorePassword); @Nonnull APNSGatewayConnection createPushConnection(); @Nonnull APNSGatewayConnection createFeedbackConnection();  }
@Ignore @Test(expected = APNSGatewayConnectionException.class) public void testCreateConnectionInvalidP12Path() throws APNSGatewayConnectionException { LOG.info("testCreateConnectionInvalidP12Path"); apnsConnectionFactory = new APNSConnectionFactory("gateway.sandbox.push.apple.com", 2195, "feedback.sandbox.push.apple.com", 2196, "/com/tomtom/speedtools/connectors/push/implementation/apns/place-your-certificate-here-for-apns-sandbox.p12-XYZ", "<password>"); apnsConnectionFactory.createPushConnection(); }
@Ignore @Test(expected = APNSGatewayConnectionException.class) public void testCreateConnectionInvalidP12Password() throws APNSGatewayConnectionException { LOG.info("testCreateConnectionInvalidP12Password"); apnsConnectionFactory = new APNSConnectionFactory("gateway.sandbox.push.apple.com", 2195, "feedback.sandbox.push.apple.com", 2196, "/com/tomtom/speedtools/push/implementation/apns/place-your-certificate-here-for-apns-sandbox.p12", "<wrong-password>"); apnsConnectionFactory.createPushConnection(); }