### Question:
MicroTypeConverter { @Nullable public static <T> IMicroElement convertToMicroElement (@Nullable final T aObject, @Nonnull @Nonempty final String sTagName) { return convertToMicroElement (aObject, null, sTagName); } private  MicroTypeConverter(); @Nullable static IMicroElement convertToMicroElement(@Nullable final T aObject, @Nonnull @Nonempty final String sTagName); @Nullable static IMicroElement convertToMicroElement(@Nullable final T aObject,
                                                         @Nullable final String sNamespaceURI,
                                                         @Nonnull @Nonempty final String sTagName); @Nullable static DSTTYPE convertToNative(@Nullable final IMicroElement aElement, @Nonnull final Class <DSTTYPE> aDstClass); @Nullable static DSTTYPE convertToNative(@Nullable final IMicroElement aElement,
                                                   @Nonnull final Class <DSTTYPE> aDstClass,
                                                   @Nullable final DSTTYPE aNullValue);  }### Answer:
@Test public void testConvertToMicroElement () { assertNull (MicroTypeConverter.convertToMicroElement (null, "tag")); try { MicroTypeConverter.convertToMicroElement ("value", ""); fail (); } catch (final IllegalArgumentException ex) {} }
@Test public void testMicroTypeConversion () { assertNotNull (MicroTypeConverter.convertToMicroElement (PDTFactory.createGregorianCalendar (), ELEMENT_NAME)); assertNotNull (MicroTypeConverter.convertToMicroElement (new Date (), ELEMENT_NAME)); assertNotNull (MicroTypeConverter.convertToMicroElement (PDTFactory.getCurrentZonedDateTime (), ELEMENT_NAME)); assertNotNull (MicroTypeConverter.convertToMicroElement (PDTFactory.getCurrentOffsetDateTime (), ELEMENT_NAME)); assertNotNull (MicroTypeConverter.convertToMicroElement (PDTFactory.getCurrentLocalDateTime (), ELEMENT_NAME)); assertNotNull (MicroTypeConverter.convertToMicroElement (PDTFactory.getCurrentLocalDate (), ELEMENT_NAME)); assertNotNull (MicroTypeConverter.convertToMicroElement (PDTFactory.getCurrentLocalTime (), ELEMENT_NAME)); assertNotNull (MicroTypeConverter.convertToMicroElement (Duration.ofHours (3), ELEMENT_NAME)); assertNotNull (MicroTypeConverter.convertToMicroElement (Period.ofDays (8), ELEMENT_NAME)); new MicroElement ("blub").setAttributeWithConversion ("file", new File ("xyz.txt")); assertNotNull (MicroTypeConverter.convertToMicroElement (new File ("a.bc"), ELEMENT_NAME)); }