bc.url&quot;, &quot;jndi:testConnection&quot;);</b>
&nbsp;
&nbsp;        //set up the initial context
<b class="fc">&nbsp;        NamingManager.setInitialContextFactoryBuilder(environment -&gt; {</b>
<b class="fc">&nbsp;            InitialContextFactory mockFactory = mock(InitialContextFactory.class);</b>
<b class="fc">&nbsp;            Context mockContext = mock(Context.class);</b>
<b class="fc">&nbsp;            when(mockFactory.getInitialContext(ArgumentMatchers.any())).thenReturn(mockContext);</b>
&nbsp