### Question:
FlashImpl extends Flash implements ReleasableFlash { @Override public void setKeepMessages(boolean keepMessages) { FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); Map<String, Object> requestMap = externalContext.getRequestMap(); requestMap.put(FLASH_KEEP_MESSAGES, keepMessages); } 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 testSetKeepMessages() { Assert.assertFalse(_flash.isKeepMessages()); Assert.assertFalse((Boolean) _flash.get("keepMessages")); _flash.put("keepMessages", true); Assert.assertTrue(_flash.isKeepMessages()); Assert.assertTrue((Boolean) _flash.get("keepMessages")); }