### Question:
License extends DefaultEntityBase { public static boolean isActive(LicenseDto license) { SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT); try { Date expiration = format.parse(license.getExpiration()); return expiration.getTime() >= System.currentTimeMillis(); } catch (ParseException e) { throw new RuntimeException("The license expiration date cannot be parsed"); } } protected  License();  License(String data); Integer getId(); @Required(value = DATA_REQUIRED) @Length(min = DATA_LENGTH_MIN, max = DATA_LENGTH_MAX) @LeadingOrTrailingWhitespace(allowed = DATA_LEADING_OR_TRAILING_WHITESPACES_ALLOWED) String getData(); void setData(String data); static boolean isActive(LicenseDto license); static final String DATE_FORMAT; static final String CUSTOMER_ID_KEY; static final String ENABLED_IP_KEY; static final String NUMBER_OF_CORES_KEY; static final String EXPIRATION_DATE_KEY; static final String TABLE_NAME; final static String DATA_PROPERTY; }### Answer:
@Test public void test_isActive() { assertFalse(isActive("2000-01-01 00:00:00")); assertFalse(isActive("2010-01-01 00:00:00")); assertTrue(isActive("2060-01-01 00:00:00")); }
@Test(expectedExceptions = RuntimeException.class) public void test_isActiveInvalid() { isActive("2000-01-01"); }