### Question:
ValueModeHandlerSerialization implements ValueModeHandler { @Override public ElementData createElementData(Element element) { if(element.isEternal()) { return new EternalElementData(element); } else { return new NonEternalElementData(element); } }  @Override Object getRealKeyObject(String portableKey); @Override String createPortableKey(Object key); @Override ElementData createElementData(Element element); @Override Element createElement(Object key, Serializable value);  }### Answer:
@Test public void testCreateElementDataForEternalElement() { ElementData elementData = valueModeHandler.createElementData(eternalElement); Assert.assertTrue(elementData instanceof EternalElementData); }
@Test public void testCreateElementDataForNonEternalElement() { ElementData elementData = valueModeHandler.createElementData(nonEternalElement); Assert.assertTrue(elementData instanceof NonEternalElementData); }