@Test
public void testDispatch_successful_v3() throws Exception {

  SNMPDispatcher dispatcher = new SNMPDispatcher(DEFAULT_SNMP_PORT);
  Notification notification = new Notification();
  notification.Callback = mock(DispatchCallback.class);
  notification.CallbackIds = new ArrayList<>();
  notification.Body = "body";
  notification.Subject = "subject";
  Map<String, String> properties = new HashMap<String, String>();
  properties.put(SNMPDispatcher.SUBJECT_OID_PROPERTY, "1");
  properties.put(SNMPDispatcher.BODY_OID_PROPERTY, "2");
  properties.put(SNMPDispatcher.PORT_PROPERTY, "162");
  properties.put(SNMPDispatcher.COMMUNITY_PROPERTY, "public");
  properties.put(SNMPDispatcher.SNMP_VERSION_PROPERTY, "SNMPv3");
  properties.put(SNMPDispatcher.TRAP_OID_PROPERTY, "1.3.6.1.6.3.1.1.5.4");
  properties.put(SNMPDispatcher.SECURITY_USERNAME_PROPERTY, "USER");
  properties.put(SNMPDispatcher.SECURITY_AUTH_PASSPHRASE_PROPERTY, "PASSPHRASE1");
  properties.put(SNMPDispatcher.SECURITY_PRIV_PASSPHRASE_PROPERTY, "PASSPHRASE2");
  properties.put(SNMPDispatcher.SECURITY_LEVEL_PROPERTY, "AUTH_NOPRIV");
  notification.DispatchProperties = properties;
  Recipient recipient = new Recipient();
  recipient.Identifier = "192.168.0.2";
  notification.Recipients = Arrays.asList(recipient);
  dispatcher.dispatch(notification);
  verify(notification.Callback, never()).onFailure(notification.CallbackIds);
  verify(notification.Callback).onSuccess(notification.CallbackIds);
}