@Test
public void testEncodePeriod() {

  DublinCoreValue a = encodePeriod(new DCMIPeriod(createDate(2007, 2, 10, 12, 0, 0), createDate(2009, 12, 24, 10, 0,
          0), "long time"), Precision.Day);
  assertEquals("start=2007-02-10; end=2009-12-24; name=long time; scheme=W3C-DTF;", a.getValue());
  assertEquals(Opt.some(DublinCore.ENC_SCHEME_PERIOD), a.getEncodingScheme());
  DublinCoreValue b = encodePeriod(new DCMIPeriod(createDate(2007, 2, 10, 12, 0, 0), null), Precision.Day);
  assertEquals("start=2007-02-10; scheme=W3C-DTF;", b.getValue());
}