### Question:
Script { public boolean isPayToScriptHash() { byte[] program = getProgram(); return program.length == 23 && (program[0] & 0xff) == OP_HASH160 && (program[1] & 0xff) == 0x14 && (program[22] & 0xff) == OP_EQUAL; } private  Script();   Script(List<ScriptChunk> chunks);  Script(byte[] programBytes);  Script(byte[] programBytes, long creationTimeSeconds); long getCreationTimeSeconds(); void setCreationTimeSeconds(long creationTimeSeconds); String toString(); byte[] getProgram(); List<ScriptChunk> getChunks(); boolean isSentToRawPubKey(); boolean isSentToAddress(); @Deprecated boolean isSentToP2SH(); byte[] getPubKeyHash(); byte[] getPubKey(); @Deprecated Address getFromAddress(NetworkParameters params); Address getToAddress(NetworkParameters params); static void writeBytes(OutputStream os, byte[] buf); static byte[] createMultiSigOutputScript(int threshold, List<ECKey> pubkeys); static byte[] createInputScript(byte[] signature, byte[] pubkey); static byte[] createInputScript(byte[] signature); static int decodeFromOpN(byte opcode); static int getSigOpCount(byte[] program); static long getP2SHSigOpCount(byte[] scriptSig); boolean isPayToScriptHash(); boolean isSentToMultiSig(); static byte[] removeAllInstancesOf(byte[] inputScript, byte[] chunkToRemove); static byte[] removeAllInstancesOfOp(byte[] inputScript, int opCode); void correctlySpends(Transaction txContainingThis, long scriptSigIndex, Script scriptPubKey,
                                boolean enforceP2SH); @Override boolean equals(Object obj); @Override int hashCode(); static final long MAX_SCRIPT_ELEMENT_SIZE; }### Answer:
@Test public void testP2SHOutputScript() throws Exception { Address p2shAddress = new Address(MainNetParams.get(), "35b9vsyH1KoFT5a5KtrKusaCcPLkiSo1tU"); assertTrue(ScriptBuilder.createOutputScript(p2shAddress).isPayToScriptHash()); }