### Question:
CallTree { public void notifyParallel(SubsystemContext<?> context, String notificationKey, Map<String, String> alertParams) { context.logger().debug("Received an alertAll for cause [{}]", notificationKey); List<Map<String, Object>> callTree = getCallTree(context); for (Map<String, Object> cte : callTree){ MessageBody message = MessageBody.buildMessage( CallTreeEntry.TYPE.getRepresentation(), cte); if (CallTreeEntry.getEnabled(message)){ sendNotification(context, notificationKey, alertParams, CallTreeEntry.getPerson(message), NotificationCapability.NotifyRequest.PRIORITY_CRITICAL); } } } CallTree(String callTreeContextAttr); void notifySequential(SubsystemContext<?> context, String notificationKey, int delayMs); void notifySequential(SubsystemContext<?> context, String notificationKey, Map<String, String> params, int delayMs); void notifyParallel(SubsystemContext<?> context, String notificationKey, Map<String, String> alertParams); void onScheduledEvent(ScheduledEvent event, SubsystemContext<?> context); void cancel(SubsystemContext<?> context); boolean hasNext(SubsystemContext<?> context); void syncCallTree(SubsystemContext<? extends SubsystemModel> context); static LinkedHashMap<String, Boolean> callTreeToMap(List<Map<String, Object>> callTree); static List<Map<String, Object>> callTreeToList(Map<String, Boolean> callTree); static final String CALL_TREE_INDEX_KEY; static final String CALL_TREE_TIMEOUT_KEY; static final String NOTIFICATION_PARAMETERS_KEY; }### Answer:
@Test public void testNotifyAll() { callTree.notifyParallel(context,SAFETY_ALERT_KEY, ImmutableMap.<String, String> of()); Assert.assertEquals("should have sent three messages",3, messgaesSent.getValues().size()); }