### Question:
EnvironmentUtils { public synchronized String getBrowserName() { final String userAgent = getUserAgent(); if ( userAgent == null ) { return ""; } if ( userAgent.contains( WINDOWS_BROWSER ) ) { return WINDOWS_BROWSER; } else if ( userAgent.contains( UBUNTU_BROWSER ) ) { return UBUNTU_BROWSER; } else if ( userAgent.contains( MAC_BROWSER ) ) { return MAC_BROWSER; } return ""; }  static synchronized EnvironmentUtils getInstance( ); synchronized boolean isUnsupportedBrowserEnvironment(); synchronized boolean isWebkitUnavailable(); boolean isBrowserEnvironmentCheckDisabled(); synchronized String getBrowserName(); static final String UBUNTU_BROWSER; static final String MAC_BROWSER; static final String WINDOWS_BROWSER; }### Answer:
@Test public void getBrowserName( ) { EnvironmentUtilsMock mock = new EnvironmentUtilsMock( Case.UBUNTU_16 ); assertEquals( mock.getMockedInstance().getBrowserName(), "Midori" ); mock = new EnvironmentUtilsMock( Case.UBUNTU_14 ); assertEquals( mock.getMockedInstance().getBrowserName(), "Midori" ); mock = new EnvironmentUtilsMock( Case.MAC_OS_X ); assertEquals( mock.getMockedInstance().getBrowserName(), "Safari" ); mock = new EnvironmentUtilsMock( Case.MACOS_X_WRONG ); assertEquals( mock.getMockedInstance().getBrowserName(), "Safari" ); mock = new EnvironmentUtilsMock( Case.WINDOWS ); assertEquals( mock.getMockedInstance().getBrowserName(), "MSIE" ); mock = new EnvironmentUtilsMock( Case.WINDOWS_WRONG ); assertEquals( mock.getMockedInstance().getBrowserName(), "MSIE" ); }