### Question:
ScriptPattern { public static boolean isP2PK(Script script) { List<ScriptChunk> chunks = script.chunks; if (chunks.size() != 2) return false; ScriptChunk chunk0 = chunks.get(0); if (chunk0.isOpCode()) return false; byte[] chunk0data = chunk0.data; if (chunk0data == null) return false; if (chunk0data.length <= 1) return false; if (!chunks.get(1).equalsOpCode(OP_CHECKSIG)) return false; return true; }  static boolean isP2PKH(Script script); static byte[] extractHashFromP2PKH(Script script); static boolean isP2SH(Script script); static byte[] extractHashFromP2SH(Script script); static boolean isP2PK(Script script); static byte[] extractKeyFromP2PK(Script script); static boolean isP2WH(Script script); static boolean isP2WPKH(Script script); static boolean isP2WSH(Script script); static byte[] extractHashFromP2WH(Script script); static boolean isSentToMultisig(Script script); static boolean isOpReturn(Script script); static boolean isWitnessCommitment(Script script); static Sha256Hash extractWitnessCommitmentHash(Script script); static boolean isOpCreate(Script script); static boolean isOpCall(Script script); static boolean isContract(Script script); static long extractGasLimit(Script script); static long extractGasPrice(Script script);  }### Answer:
@Test public void testCreateP2PKOutputScript() { assertTrue(ScriptPattern.isP2PK( ScriptBuilder.createP2PKOutputScript(keys.get(0)) )); }