### Question:
BLSPublicKey implements SimpleOffsetSerializable { public static BLSPublicKey fromBytesCompressedValidate(Bytes48 bytes) throws IllegalArgumentException { BLSPublicKey ret = new BLSPublicKey(bytes); ret.getPublicKey().forceValidation(); return ret; } BLSPublicKey(BLSSecretKey secretKey);   BLSPublicKey(PublicKey publicKey);   BLSPublicKey(Bytes48 bytesCompressed); private  BLSPublicKey(Supplier<PublicKey> publicKey, Supplier<Bytes48> bytesCompressed); static BLSPublicKey random(int seed); static BLSPublicKey empty(); static BLSPublicKey aggregate(List<BLSPublicKey> publicKeys); @Override int getSSZFieldCount(); @Override List<Bytes> get_fixed_parts(); static BLSPublicKey fromSSZBytes(Bytes bytes); static BLSPublicKey fromBytesCompressed(Bytes48 bytes); static BLSPublicKey fromBytesCompressedValidate(Bytes48 bytes); Bytes toSSZBytes(); Bytes48 toBytesCompressed(); String toAbbreviatedString(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); static final int SSZ_FIELD_COUNT; static final int SSZ_BLS_PUBKEY_SIZE; }### Answer:
@Test void fromBytesCompressedValidate_throwsOnInvalidPubKey() { Bytes48 invalidPublicKeyBytes = Bytes48.fromHexString( "0x9378a6e3984e96d2cd50450c76ca14732f1300efa04aecdb805b22e6d6926a85ef409e8f3acf494a1481090bf32ce3bd"); assertThatThrownBy(() -> BLSPublicKey.fromBytesCompressedValidate(invalidPublicKeyBytes)) .isInstanceOf(IllegalArgumentException.class); }