@Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "duration is not a valid.*")
public void testValueOfRejectsInvalidNumber()
{

    Duration.valueOf("1.2x4 s");
}