### Question:
Session { public void removeVariables(final String pattern) { for (Iterator<String> iterator = variables.keySet().iterator(); iterator.hasNext(); ) { String s = iterator.next(); if (s.matches(pattern)) { iterator.remove(); } } } Session(final String sessionId); Report getReport(); void setReport(final Report report); static void removeInstance(final String sessionId); static synchronized Session getInstance(final String sessionId); static synchronized boolean hasInstance(final String sessionId); static synchronized Session getExistingInstance(final String sessionId); String id(); void setIsWindowOpen(final boolean isWindowOpen); boolean isWindowOpen(); boolean sendHTMLResponseAfterFileDownload(); void setSendHTMLResponseAfterFileDownload(boolean b); Recorder getRecorder(); String getVariable(final String name); void removeVariables(final String pattern); void setVariable(final String name, final String value); SahiScript xgetScript(); SahiTestSuite getSuite(); MockResponder mockResponder(); boolean isPlaying(); void setIsPlaying(boolean isPlaying); Status getStatus(); void setStatus(Status status); void touch(); long lastActiveTime(); NashornScriptRunner getScriptRunner(); void setScriptRunner(NashornScriptRunner scriptRunner); void setLauncher(BrowserLauncher launcher); BrowserLauncher getLauncher(); void addRequestCredentials(String realm, String username, String password); void removeRequestCredentials(String realm); void removeAllRequestCredentials(); RequestCredentials getMatchingCredentials(String realm, String scheme); boolean isRecording(); void setIsRecording(boolean isRecording); void setIsReadyForDriver(boolean isReadyForDriver); boolean isReadyForDriver(); boolean isPaused(); String getInfoJSON(); double getInactiveTimeout(); static void removeInactiveSessions(); void setObject(String key, Object value); Object getObject(String key); void addAjaxRedirect(String redirectedTo); boolean isAjaxRedirect(String url); void set204(boolean is204); boolean is204(); String getXHRReadyStatesToWaitFor(); void setXHRReadyStatesToWaitFor(String states);  }### Answer:
@Test public void testRemoveVariables() { session.setVariable("condn1", "1"); session.setVariable("condn2", "2"); session.setVariable("condn3", "3"); assertEquals("1", session.getVariable("condn1")); assertEquals("2", session.getVariable("condn2")); assertEquals("3", session.getVariable("condn3")); session.removeVariables("condn.*"); assertEquals(null, session.getVariable("condn1")); assertEquals(null, session.getVariable("condn2")); assertEquals(null, session.getVariable("condn3")); }