### Question:
BeanMap extends AbstractMap<String, Object> implements Cloneable { @Override public void clear() { if (bean == null) { return; } Class<?> beanClass = null; try { beanClass = bean.getClass(); bean = beanClass.newInstance(); } catch (Exception e) { throw new UnsupportedOperationException("Could not create new instance of class: " + beanClass); } } BeanMap();  BeanMap(Object bean); @Override String toString(); @Override Object clone(); void putAllWriteable(BeanMap map); @Override void clear(); boolean containsKey(String name); Object get(String name); @Override Object put(String name, Object value); @Override int size(); @Override Set<String> keySet(); @Override Set<Entry<String, Object>> entrySet(); @Override Collection<Object> values(); Class<?> getType(String name); Iterator<String> keyIterator(); Iterator<Object> valueIterator(); Iterator<Entry<String, Object>> entryIterator(); Object getBean(); void setBean(Object newBean); Method getReadMethod(String name); Method getWriteMethod(String name);  }### Answer:
@Test public void clear() { beanMap.clear(); assertEquals(4, beanMap.size()); }