+ variableBindings.size() + ": " + variableBindings);
@SuppressWarnings("unchecked")
ListIterator<VariableBinding> variableBindingsIterator = variableBindings.listIterator();
VariableBinding variableBinding = variableBindingsIterator.next();
assertEquals(variableBinding.getOid(), SnmpConstants.sysUpTime);
variableBinding = variableBindingsIterator.next();
assertEquals(variableBinding.getOid(), SnmpConstants.snmpTrapOID);
assertEquals(variableBinding.getVariable(), expectedValues.getSnmpTrapOid());
OID oidPrefix = new OID(TEST_VARIABLE_BINDING_PREFIX);
while (variableBindingsIterator.hasNext()) {
variableBinding = variableBindingsIterator.next();
assertVariableBindingIsPrefixed(variableBinding, oidPrefix);
assertVariableBindingHasStringValue(variableBinding);
switch (variableBindingsIterator.previousIndex()) {
case 2:
assertEquals(variableBinding.getVariable(), new OctetString(expectedValues.getAlertDefinitionName()));
break;
case 3:
assertEquals(variableBinding.getVariable(), new OctetString(expectedValues.getResourceName()));
break;
case 4:
assertEquals(variableBinding.getVariable(), new OctetString(expectedValues.getPlatformName()));
break;
case 5:
assertEquals(variableBinding.getVariable(), new OctetString(expectedValues.getAlertConditions()));
break;
case 6:
assertEquals(variableBinding.getVariable(), new OctetString(expectedValues.getAlertPriority()
.toString().toLowerCase()));
break;
case 7:
assertEquals(variableBinding.getVariable(), new OctetString(expectedValues.getAlertUrl()));
break;
case 8:
assertEquals(variableBinding.getVariable(), new OctetString(expectedValues.getPlatformName() + "::"
+ expectedValues.getResourceName() + "::"));
break;
default:
throw new RuntimeException("Unexpected index: " + variableBindingsIterator.previousIndex());
}