LengthPrefixUnknownCoders { @VisibleForTesting static InstructionOutput forInstructionOutput( InstructionOutput input, boolean replaceWithByteArrayCoder) throws Exception { InstructionOutput cloudOutput = clone(input, InstructionOutput.class); cloudOutput.setCodec(forCodec(cloudOutput.getCodec(), replaceWithByteArrayCoder)); return cloudOutput; }  static MutableNetwork<Node, Edge> andReplaceForRunnerNetwork(
      MutableNetwork<Node, Edge> network); static MutableNetwork<Node, Edge> forSdkNetwork(MutableNetwork<Node, Edge> network); static List<SideInputInfo> forSideInputInfos(
      List<SideInputInfo> sideInputInfos, boolean replaceWithByteArrayCoder);  }
@Test public void testLengthPrefixInstructionOutputCoder() throws Exception { InstructionOutput output = new InstructionOutput(); output.setCodec(CloudObjects.asCloudObject(windowedValueCoder, null)); output.setFactory(new JacksonFactory()); InstructionOutput prefixedOutput = forInstructionOutput(output, false); assertEqualsAsJson( CloudObjects.asCloudObject(prefixedWindowedValueCoder, null), prefixedOutput.getCodec()); assertEqualsAsJson( output.getCodec(), CloudObjects.asCloudObject(windowedValueCoder, null)); }