### Question:
Crn { public static boolean isCrn(@Nullable String input) { try { safeFromString(input); return true; } catch (NullPointerException | CrnParseException e) { return false; } } Crn(Partition partition,
            Service service,
            Region region,
            String accountId,
            ResourceType resourceType,
            String resource); Partition getPartition(); Service getService(); Region getRegion(); String getAccountId(); ResourceType getResourceType(); String getResource(); String getUserId(); @Override String toString(); @Nullable static Crn fromString(String input); static Crn safeFromString(String input); static boolean isCrn(@Nullable String input); @Override int hashCode(); @Override boolean equals(Object object); static Builder builder();  }### Answer:
@Test public void testIsCrnInvalid() { assertFalse(Crn.isCrn(invalidCrnPattern)); assertFalse(Crn.isCrn(invalidCrnEmptyParts)); }
@Test public void testIsCrnValid() { assertTrue(Crn.isCrn(exampleCrn)); assertTrue(Crn.isCrn(exampleCrn2)); assertTrue(Crn.isCrn(exampleCrn3)); }