DocQueryImpl extends BaseService { public AdhocQueryResponse respondingGatewayCrossGatewayQuery(AdhocQueryRequest body, WebServiceContext context) { AssertionType assertion = getAssertion(context, null); if (assertion != null) { assertion.setImplementsSpecVersion(UDDI_SPEC_VERSION.SPEC_3_0.toString()); } return inboundDocQuery.respondingGatewayCrossGatewayQuery(body, assertion, getWebContextProperties(context)); } DocQueryImpl(InboundDocQuery inboundDocQuery); AdhocQueryResponse respondingGatewayCrossGatewayQuery(AdhocQueryRequest body, WebServiceContext context);  }
@Test public void testImplementsSpecVersion() { final AssertionType assertion = new AssertionType(); InboundDocQuery service = mock(InboundDocQuery.class); DocQueryImpl docQuery = new DocQueryImpl(service) { @Override protected AssertionType getAssertion(WebServiceContext context, AssertionType oAssertionIn) { return assertion; } }; AdhocQueryRequest body = mock(AdhocQueryRequest.class); WebServiceContext context = mock(WebServiceContext.class); docQuery.respondingGatewayCrossGatewayQuery(body, context); Properties webContextProperties = new Properties(); verify(service).respondingGatewayCrossGatewayQuery(same(body), any(AssertionType.class), eq(webContextProperties)); assertTrue(!StringUtils.isBlank(assertion.getImplementsSpecVersion())); assertEquals(NhincConstants.UDDI_SPEC_VERSION.SPEC_3_0.toString(), assertion.getImplementsSpecVersion()); }