AdhocQueryRequestDescriptionBuilder extends TargetEventDescriptionBuilder { @Override public void setArguments(Object... arguments) { extractRequest(arguments); extractAssertion(arguments); extractTarget(arguments); } AdhocQueryRequestDescriptionBuilder(); @Override void buildTimeStamp(); @Override void buildStatuses(); @Override void buildPayloadTypes(); @Override void buildPayloadSizes(); @Override void buildErrorCodes(); @Override void setArguments(Object... arguments); @Override void setReturnValue(Object returnValue);  }
@Test public void noAssertion() { Object[] arguments = {request}; builder.setArguments(arguments); EventDescription eventDescription = assertBasicBuild(builder); assertNull(eventDescription.getNPI()); assertNull(eventDescription.getInitiatingHCID()); }
@Test public void withAssertion() { builder.setAssertionExtractor(assertionExtractor); Object[] arguments = {request, assertion}; builder.setArguments(arguments); EventDescription eventDescription = assertBasicBuild(builder); assertEquals("hcid", eventDescription.getInitiatingHCID()); assertEquals("npi", eventDescription.getNPI()); }