@Test
public void testFromSec() {

	Duration d = Duration.fromSec(10.2);
	assertEquals(10, d.secs);
	assertEquals(200000000, d.nsecs);
	assertEquals(10, d.getSecs());
	assertEquals(200000000, d.getNsecs());
	assertFalse(d.isZero());
	assertEquals(10.2, d.toSec(), 0);
	assertEquals(10200000000l, d.toNSec());
	assertEquals("{\"secs\":10,\"nsecs\":200000000}", d.toString());
	assertEquals(2, d.toJsonObject().size());
	assertEquals(10, d.toJsonObject().getInt(TimeBase.FIELD_SECS));
	assertEquals(200000000, d.toJsonObject().getInt(TimeBase.FIELD_NSECS));
	assertEquals(Duration.TYPE, d.getPrimitiveType());
}