@Test
public void nonShortestPossiblePushData() {

    ScriptChunk nonStandardChunk = new ScriptChunk(OP_PUSHDATA1, new byte[75]);
    byte[] nonStandardScript = new ScriptBuilder().addChunk(nonStandardChunk).build().getProgram();
    // Test non-standard script as an input.
    Transaction tx = new Transaction(PARAMS);
    assertEquals(DefaultRiskAnalysis.RuleViolation.NONE, DefaultRiskAnalysis.isStandard(tx));
    tx.addInput(new TransactionInput(PARAMS, null, nonStandardScript));
    assertEquals(DefaultRiskAnalysis.RuleViolation.SHORTEST_POSSIBLE_PUSHDATA, DefaultRiskAnalysis.isStandard(tx));
    // Test non-standard script as an output.
    tx.clearInputs();
    assertEquals(DefaultRiskAnalysis.RuleViolation.NONE, DefaultRiskAnalysis.isStandard(tx));
    tx.addOutput(new TransactionOutput(PARAMS, null, COIN, nonStandardScript));
    assertEquals(DefaultRiskAnalysis.RuleViolation.SHORTEST_POSSIBLE_PUSHDATA, DefaultRiskAnalysis.isStandard(tx));
}