### Question:
FlashImpl extends Flash implements ReleasableFlash { @Override public void setRedirect(boolean redirect) { FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); Map<String, Object> requestMap = externalContext.getRequestMap(); Boolean alreadySet = (Boolean) requestMap.get(FLASH_REDIRECT); alreadySet = (alreadySet == null ? Boolean.FALSE : Boolean.TRUE); if (!alreadySet && redirect) { requestMap.put(FLASH_REDIRECT, Boolean.TRUE); _saveRedirectValue(facesContext); } else { if (alreadySet) { log.warning("Multiple call to setRedirect() ignored."); } else { log.warning("Ignored call to setRedirect(false), because this " + "should only be set to true by the NavigationHandler. " + "No one else should change it."); } } } FlashImpl(ExternalContext externalContext); static Flash getCurrentInstance(ExternalContext context); static Flash getCurrentInstance(ExternalContext context, boolean create); @Override void doPrePhaseActions(FacesContext facesContext); @Override void doPostPhaseActions(FacesContext facesContext); @Override boolean isRedirect(); @Override void setRedirect(boolean redirect); @Override void keep(String key); @Override void putNow(String key, Object value); @Override boolean isKeepMessages(); @Override void setKeepMessages(boolean keepMessages); @Override void clear(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override Set<java.util.Map.Entry<String, Object>> entrySet(); @Override Object get(Object key); @Override boolean isEmpty(); @Override Set<String> keySet(); @Override Object put(String key, Object value); @Override void putAll(Map<? extends String, ? extends Object> m); @Override Object remove(Object key); @Override int size(); @Override Collection<Object> values(); @Override void clearFlashMap(FacesContext facesContext, String clientWindowId, String token);  }### Answer:
@Test public void testSetRedirect() { Assert.assertFalse(_flash.isRedirect()); Assert.assertFalse((Boolean) _flash.get("redirect")); _flash.put("redirect", true); Assert.assertTrue(_flash.isRedirect()); Assert.assertTrue((Boolean) _flash.get("redirect")); }