### Question:
PassThroughHttpListener implements TransportListener { public EndpointReference getEPRForService(String serviceName, String ip) throws AxisFault { String trailer = ""; if (serviceName.indexOf('/') != -1) { trailer += serviceName.substring(serviceName.indexOf("/")); serviceName = serviceName.substring(0, serviceName.indexOf('/')); } if (serviceName.indexOf('.') != -1) { trailer += serviceName.substring(serviceName.indexOf(".")); serviceName = serviceName.substring(0, serviceName.indexOf('.')); } if (serviceNameToEPRMap.containsKey(serviceName)) { return new EndpointReference( sourceConfiguration.getCustomEPRPrefix() + serviceNameToEPRMap.get(serviceName) + trailer); } else { return new EndpointReference(sourceConfiguration.getServiceEPRPrefix() + serviceName + trailer); } }  void init(ConfigurationContext cfgCtx, TransportInDescription transportInDescription); void start(); EndpointReference getEPRForService(String serviceName, String ip); EndpointReference[] getEPRsForService(String serviceName, String ip); SessionContext getSessionContext(MessageContext messageContext); void stop(); void destroy(); void pause(); void resume(); void reload(final TransportInDescription transportIn); void reloadSpecificEndPoints(final TransportInDescription transportIn); void maintenanceShutdown(long milliSecs); String getTransportName(); void reloadDynamicSSLConfig(TransportInDescription transportInDescription); static final long ACTIVE_CONNECTION_MONITOR_DELAY; }### Answer:
@Test public void testGetEPRForService() throws Exception { Assert.assertEquals("Service URL mismatched", getServiceEndpoint("myservice"), passThroughHttpListener.getEPRForService("myservice", HOST).getAddress()); Assert.assertEquals("Service URL mismatched", getServiceEndpoint("myservice.endpoint"), passThroughHttpListener.getEPRForService("myservice.endpoint", HOST).getAddress()); Assert.assertEquals("Service URL mismatched", getServiceEndpoint("t/myservice"), passThroughHttpListener.getEPRForService("t/myservice", HOST).getAddress()); }