AlertsCountContext { public PrincipalUser getPrincipalUser() { return owner; } private  AlertsCountContext(AlertsCountContextBuilder builder); boolean isCountUserAlerts(); boolean isCountSharedAlerts(); boolean isCountPrivateAlerts(); PrincipalUser getPrincipalUser(); String getSearchText();  }
@Test public void getPrincipalUser() { AlertsCountContext context = new AlertsCountContext.AlertsCountContextBuilder().countPrivateAlerts() .setPrincipalUser(owner).setSearchText(searchText).build(); assertEquals(owner, context.getPrincipalUser()); assertNotEquals(null, context.getPrincipalUser()); context = new AlertsCountContext.AlertsCountContextBuilder().setPrincipalUser(null).build(); assertEquals(null, context.getPrincipalUser()); }