verify( javaScriptExecutor ).execute( eq( "document.title = \"foo "\";" ) );
}
@Test
public void testSetTitleUpdatesUi() {
WebClient webClient = mock( WebClient.class );
JavaScriptExecutor javaScriptExecutor = mock( JavaScriptExecutor.class );
when( webClient.getService( JavaScriptExecutor.class ) ).thenReturn( javaScriptExecutor );
environment.setClient( webClient );
webPage.setTitle( "foo" );
verify( uiRenderer ).updatePageSwitcher( descriptor, "foo" );