ConfluenceIframeSpaceAppAction extends AbstractSpaceAction implements SpaceAware, ConfluenceSparkIframeAction { @Override public String getSpaQueryString() { return ServletActionContext.getRequest().getQueryString(); }  String index(); @Override String getIframeContextInfo(); @Override String getSpaQueryString(); @Override String getSpaBaseUrl(); @Override String getSelectedWebItem(); @Override List<String> getRequiredResourceKeys(); @Override boolean isSpaceRequired(); @Override boolean isViewPermissionRequired(); String getBodyAsHtml();  }
@Test public void iframeSpaceActionDefaultQueryParamHandling() throws IOException { Mockito.when(servletRequest.getQueryString()).thenReturn("?space_key=TEST&user=admin"); Assert.assertEquals("?space_key=TEST&user=admin", actionInstance.getSpaQueryString()); Mockito.when(servletRequest.getQueryString()).thenReturn(""); Assert.assertEquals("", actionInstance.getSpaQueryString()); Mockito.when(servletRequest.getQueryString()).thenReturn("test_param=value&other=42&third=75"); Assert.assertEquals("test_param=value&other=42&third=75", actionInstance.getSpaQueryString()); }