class PolicyId implements NamespacedEntityId {

    public static PolicyId of(final CharSequence policyId) {

        if (policyId instanceof PolicyId) {
            return (PolicyId) policyId;
        }

        return wrapInPolicyIdInvalidException(() -> new PolicyId(DefaultNamespacedEntityId.of(policyId)));
    }

    private  PolicyId(final NamespacedEntityId entityId);

}