public synchronized String getBrowserName() {
    final String userAgent = getUserAgent();
    if ( userAgent == null ) {
      return "";
    }

    String edgeUserAgent = WINDOWS_BROWSER.substring( 0, 3 ); // Edg
    if ( userAgent.contains( edgeUserAgent ) ) {
      return  WINDOWS_BROWSER;
    } else if ( userAgent.contains( UBUNTU_BROWSER ) ) {
      return  UBUNTU_BROWSER;
    } else if ( userAgent.contains( MAC_BROWSER ) ) {
      return MAC_BROWSER;
    }

    return "";
  }
@Test
  public void testGetBrowserName_mac() {
    EnvironmentUtilsMock mock = new EnvironmentUtilsMock( Case.MAC_OS_X );
    assertEquals( MAC_BROWSER, mock.getMockedInstance().getBrowserName() );

    mock = new EnvironmentUtilsMock( Case.MAC_OS_X_WRONG );
    assertEquals( MAC_BROWSER, mock.getMockedInstance().getBrowserName() );
  }