@Test public void testGettersWithNullConfigXPaths() { apiConfig = Mockito.mock(AdsApiConfiguration.class); xPathSet = new ResponseInfoXPathSet(apiConfig, nodeExtractor); assertFalse( "getOperationsXPath should have returned an empty iterator", xPathSet.getOperationsCountXPath().iterator().hasNext()); }
@Test public void testGettersWithNullConfigXPaths() { when(apiConfig.getRequestContextXPath()).thenReturn(null); xPathSet = new RequestInfoXPathSet(apiConfig, nodeExtractor, transformerSupplier, logger); assertNull( "getContextName should have returned null when no context XPath was supplied", xPathSet.getContextName()); assertFalse( "getContextXPath should have returned an empty iterator when no context XPath was supplied", xPathSet.getContextXPath().iterator().hasNext()); }