### Question:
ChromeServiceImpl implements ChromeService { @Override public ChromeTab createTab() throws ChromeServiceException { return createTab(ABOUT_BLANK_PAGE); } ChromeServiceImpl(String host, int port, WebSocketServiceFactory webSocketServiceFactory);  ChromeServiceImpl(String host, int port);  ChromeServiceImpl(int port);  ChromeServiceImpl(int port, WebSocketServiceFactory webSocketServiceFactory); void setWebSocketServiceFactory(WebSocketServiceFactory webSocketServiceFactory); @Override List<ChromeTab> getTabs(); @Override ChromeTab createTab(); @Override ChromeTab createTab(String tab); @Override void activateTab(ChromeTab tab); @Override void closeTab(ChromeTab tab); @Override ChromeVersion getVersion(); @Override synchronized ChromeDevToolsService createDevToolsService(ChromeTab tab); @Override synchronized ChromeDevToolsService createDevToolsService(
      ChromeTab tab, ChromeDevToolsServiceConfiguration chromeDevToolsServiceConfiguration); int getPort(); String getHost(); void clearChromeDevToolsServiceCache(ChromeTab tab); static String inputStreamToString(InputStream inputStream); static final String ABOUT_BLANK_PAGE; }### Answer:
@Test public void testCreateTab() throws IOException, ChromeServiceException, InterruptedException { MockWebServer server = new MockWebServer(); InputStream fixture = getFixture("chrome/tab.json"); server.enqueue(new MockResponse().setBody(ChromeServiceImpl.inputStreamToString(fixture))); server.start(); ChromeServiceImpl service = new ChromeServiceImpl(server.getHostName(), server.getPort()); ChromeTab tab = service.createTab("some-tab-name"); RecordedRequest request = server.takeRequest(); assertEquals(1, server.getRequestCount()); assertEquals("GET /json/new?some-tab-name HTTP/1.1", request.getRequestLine()); assertEquals("", tab.getDescription()); assertEquals( "/devtools/inspector.html?ws=localhost:9222/devtools/page/(2C5C79DD1137419CC8839D61D91CEB2A)", tab.getDevtoolsFrontendUrl()); assertEquals( "https: assertEquals("(2C5C79DD1137419CC8839D61D91CEB2A)", tab.getId()); assertEquals("Google", tab.getTitle()); assertEquals("page", tab.getType()); assertTrue(tab.isPageType()); assertEquals("https: assertEquals( "ws: tab.getWebSocketDebuggerUrl()); server.shutdown(); }