    @Test
    public void testShouldNotHandleRemoteMissingChallenge() throws Exception {

        Map<String, String> baseMessage = generateBaseMessage();
        baseMessage.remove(PushParser.CHALLENGE);
        RemoteMessage remoteMessage = generateMockRemoteMessage(MESSAGE_ID, CORRECT_SECRET, baseMessage);

        try {
            notificationFactory.handleMessage(remoteMessage);
            Assert.fail("Should throw InvalidNotificationException");
        } catch (Exception e) {
            assertTrue(e instanceof InvalidNotificationException);
            assertTrue(e.getLocalizedMessage().equals("Remote message did not contain required fields."));
        }
    }