Skip to content

Instantly share code, notes, and snippets.

@billy-bacon
Created November 25, 2013 17:48
Show Gist options
  • Save billy-bacon/7645411 to your computer and use it in GitHub Desktop.
Save billy-bacon/7645411 to your computer and use it in GitHub Desktop.
@Mock
private PublishResult publishResult;
@Value("${GOOGLE_SERVER_API_KEY}")
private String googleServerApiKey;
@Value("${APPLE_CERT_FILE}")
private String appleCertificate;
@Value("${APPLE_PRIVATE_KEY_FILE}")
private String applePrivateKey;
private PushNotificationMessageProcessor processor;
@Before
public void before() {
initMocks(this);
processor = new PushNotificationMessageProcessor(snsClient, googleServerApiKey, appleCertificate, applePrivateKey);
when(snsClient.createPlatformApplication(any(CreatePlatformApplicationRequest.class))).thenReturn(createPlatformApplicationResult);
when(snsClient.createPlatformEndpoint(any(CreatePlatformEndpointRequest.class))).thenReturn(createPlatformEndpointResult);
when(snsClient.publish(any(PublishRequest.class))).thenReturn(publishResult);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment