@Test
public void test2() {

    // having
    FocusManager focusManager = new FocusManagerImpl();
    String componentId = "someComponentId";
    String clientId = "someClientId";
    when(component.getClientId(facesContext)).thenReturn(clientId);
    when(viewRoot.findComponent(componentId)).thenReturn(component);
    // when
    focusManager.focus(componentId);
    // then
    // verify(attributes).put(FocusManager.FOCUS_CONTEXT_ATTRIBUTE, clientId);
    assertEquals(clientId, attributes.get(FocusManager.FOCUS_CONTEXT_ATTRIBUTE));
    assertTrue(attributes.containsKey(FocusManager.FOCUS_CONTEXT_ATTRIBUTE));
    assertTrue(FocusRendererUtils.isFocusEnforced(facesContext));
    verify(javaScriptService).addPageReadyScript(Mockito.any(FacesContext.class), Mockito.any(JSLiteral.class));
}