### Question:
FIXTransportListener extends AbstractTransportListener { public EndpointReference[] getEPRsForService(String serviceName, String ip) throws AxisFault { if (serviceName.indexOf('.') != -1) { serviceName = serviceName.substring(0, serviceName.indexOf('.')); } String[] serviceEPRStrings = fixSessionFactory.getServiceEPRs(serviceName, ip); if (serviceEPRStrings != null) { EndpointReference[] serviceEPRs = new EndpointReference[serviceEPRStrings.length]; for (int i = 0; i < serviceEPRStrings.length; i++) { serviceEPRs[i] = new EndpointReference(serviceEPRStrings[i]); } return serviceEPRs; } throw new AxisFault("Unable to get EPRs for the service " + serviceName); }  void init(ConfigurationContext cfgCtx,
                     TransportInDescription trpInDesc); void startListeningForService(AxisService service); EndpointReference[] getEPRsForService(String serviceName, String ip);  }### Answer:
@Test public void testGetEPRs() throws Exception { MockitoAnnotations.initMocks(this); String[] serviceEPRStrings = { "epr1", "epr2" }; PowerMockito.when(fixSessionFactory.getServiceEPRs(anyString(), anyString())).thenReturn(serviceEPRStrings); EndpointReference[] eprs = spy.getEPRsForService("test.service", "random.ip"); Assert.assertNotNull("Cannot get endpoint refernces from the service!", eprs); }