@Test
public void buildUrl_insecureMode_doAsUserQueryParam() throws Exception {

    final String principalUser = "user";
    List<ComponentProcess> componentProcesses = buildUiComponentProcesses();
    new Expectations() {{
        securityContext.getAuthenticationScheme(); result = StreamlineSecurityContext.KERBEROS_AUTH;
        securityContext.getUserPrincipal().getName(); result = principalUser;
        environmentService.listComponentProcesses(stormUi.getId()); result = componentProcesses;
    }};
    final StormMetadataService stormMetadataService = new StormMetadataService
            .Builder(environmentService, 1L, securityContext, subject).build();
    final String tpSumUrl = stormMetadataService.getTopologySummaryUrl();
    Assert.assertTrue(tpSumUrl.equals(STORM_UI_URL_EXPECTED +"?" + StormMetadataService.STORM_REST_API_DO_AS_USER_QUERY_PARAM
            + "=" + principalUser));
}