// Path: src/main/java/org/simplify4u/plugins/pgp/KeyFingerprint.java
// @Value
// @RequiredArgsConstructor
// public class KeyFingerprint {
// 
//     byte[] fingerprint;
// 
//     /**
//      * Construct a key fingerprint from string representation.
//      * @param strFingerprint a key fingerprint as string
//      */
//     public KeyFingerprint(String strFingerprint) {
//         fingerprint = HexUtils.stringToFingerprint(strFingerprint);
//     }
// 
//     @JsonValue
//     public String toString() {
//         return HexUtils.fingerprintToString(fingerprint);
//     }
// }
// 
// Path: src/main/java/org/simplify4u/plugins/pgp/KeyInfo.java
// @Builder
// @Value
// public class KeyInfo {
// 
//     @NonNull
//     KeyFingerprint fingerprint;
// 
//     KeyFingerprint master;
// 
//     Collection<String> uids;
// 
//     int version;
//     int algorithm;
// 
//     int bits;
// 
//     Date date;
// }


import java.io.IOException;
import java.util.Collections;
import static java.util.Arrays.asList;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import org.bouncycastle.openpgp.PGPException;
import org.simplify4u.plugins.pgp.KeyFingerprint;
import org.simplify4u.plugins.pgp.KeyInfo;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
        KeyItems keyItems = new KeyItems();

        // then
        assertThatThrownBy(() -> keyItems.addKeys((String) null, keysMapContext))
                .isExactlyInstanceOf(IllegalArgumentException.class)
                .hasMessage("null key not allowed in keysMap: test.map lineNumber: 0");
    }

    @Test
    public void invalidKeyShouldThrowsException() {
        // given
        KeyItems keyItems = new KeyItems();

        // then
        assertThatThrownBy(() -> keyItems.addKeys("xxxx", null))
                .isExactlyInstanceOf(IllegalArgumentException.class)
                .hasMessage("Invalid keyID xxxx must start with 0x or be any of *,any,badSig,noKey,noSig");
    }


    @Test
    public void testIsNoSignature() {

        KeyItems keyItems = new KeyItems().addKeys("", null);
        assertThat(keyItems.isNoSignature()).isTrue();
    }

    @Test
    public void testIsNoSignatureIncorrect() {

// Path: src/main/java/org/simplify4u/plugins/pgp/KeyFingerprint.java
// @Value
// @RequiredArgsConstructor
// public class KeyFingerprint {
// 
//     byte[] fingerprint;
// 
//     /**
//      * Construct a key fingerprint from string representation.
//      * @param strFingerprint a key fingerprint as string
//      */
//     public KeyFingerprint(String strFingerprint) {
//         fingerprint = HexUtils.stringToFingerprint(strFingerprint);
//     }
// 
//     @JsonValue
//     public String toString() {
//         return HexUtils.fingerprintToString(fingerprint);
//     }
// }
// 
// Path: src/main/java/org/simplify4u/plugins/pgp/KeyInfo.java
// @Builder
// @Value
// public class KeyInfo {
// 
//     @NonNull
//     KeyFingerprint fingerprint;
// 
//     KeyFingerprint master;
// 
//     Collection<String> uids;
// 
//     int version;
//     int algorithm;
// 
//     int bits;
// 
//     Date date;
// }


// Path: src/test/java/org/simplify4u/plugins/keysmap/KeyItemsTest.java
import java.io.IOException;
import java.util.Collections;
import static java.util.Arrays.asList;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import org.bouncycastle.openpgp.PGPException;
import org.simplify4u.plugins.pgp.KeyFingerprint;
import org.simplify4u.plugins.pgp.KeyInfo;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

        KeyItems keyItems = new KeyItems();

        // then
        assertThatThrownBy(() -> keyItems.addKeys((String) null, keysMapContext))
                .isExactlyInstanceOf(IllegalArgumentException.class)
                .hasMessage("null key not allowed in keysMap: test.map lineNumber: 0");
    }

    @Test
    public void invalidKeyShouldThrowsException() {
        // given
        KeyItems keyItems = new KeyItems();

        // then
        assertThatThrownBy(() -> keyItems.addKeys("xxxx", null))
                .isExactlyInstanceOf(IllegalArgumentException.class)
                .hasMessage("Invalid keyID xxxx must start with 0x or be any of *,any,badSig,noKey,noSig");
    }


    @Test
    public void testIsNoSignature() {

        KeyItems keyItems = new KeyItems().addKeys("", null);
        assertThat(keyItems.isNoSignature()).isTrue();
    }

    @Test
    public void testIsNoSignatureIncorrect() {

        KeyItems keyItems = new KeyItems().addKeys("0x123456789abcdef0", null);