webadmin,userportal: JUnit rule for testing UiCommon models

This patch adds a JUnit TestRule used to set up the necessary
UiCommon infrastructure in order to test individual UiCommon
models.

This TestRule ensures that hidden expectations of UiCommon
models (represented by static method calls) are satisfied and
provides a 'Mocks' interface for stubbing the infrastructure
behavior, if necessary.

Example - UiCommon infrastructure setup per test class:

  public class MyTest {

    @ClassRule
    public static UiCommonSetup setup = new UiCommonSetup();

    // This is optional, but often necessary
    @BeforeClass
    public static void stubUiCommonInfra() {
      AsyncDataProvider adp = setup.getMocks().asyncDataProvider();
      when(adp.isWindowsOsType(anyInt())).thenReturn(true);
    }

    // Actual test code to exercise model instance(s)

  }

Example - UiCommon infrastructure setup per test method:

  public class MyTest {

    @Rule
    public UiCommonSetup setup = new UiCommonSetup();

    // This is optional, but often necessary
    @Before
    public void stubUiCommonInfra() {
      AsyncDataProvider adp = setup.getMocks().asyncDataProvider();
      when(adp.isWindowsOsType(anyInt())).thenReturn(true);
    }

    // Actual test code to exercise model instance(s)

  }

Existing test code was modified to utilize UiCommonSetup rule.

Change-Id: Ifca6bf6a6b77813fa90f419ccfe2ef9f2cd09561
Signed-off-by: Vojtech Szocs <vszocs@redhat.com>