public static void validatePolymorhpicInfo(PolymorphicInfo info) {
        if (info.getPcaVersion() != 1) {
            logger.error("Unsupported PCA version {}", info.getPcaVersion());
            throw new ClientException("Polymorphic info is not correct");
        }
        int polymorphicFlags = info.getFlags().intValue();
        boolean randomizedPip = (polymorphicFlags & 32) != 0;
        boolean compressedEncoding = (polymorphicFlags & 4) != 0;
        if (!randomizedPip || !compressedEncoding) {
            logger.error("Polymorphic flags incorrect randomizedPip: {} compressedEncoding: {}",
                randomizedPip, compressedEncoding);
            throw new ClientException("Polymorphic info is not correct");
        }
    }
@Test
    public void validPolymorhpicInfo() {
        final PolymorphicInfo info = mapper.read(
            Hex.decode("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS"),
            PolymorphicInfo.class);
        CardValidations.validatePolymorhpicInfo(info);
    }