Code review comment: "But was not thrown or Exception did not match" ???  The failure cause makes it look like the wrong outcome was being met and not the one that was added specifically for this case.

Code under review:
public void testInstructionEmbeddedElementsWithMalformedData() throws Exception {
    ProcessBundleHandler handler = setupProcessBundleHanlderForSimpleRecordingDoFn();

    ByteString.Output encodedData = ByteString.newOutput();
    KvCoder.of(StringUtf8Coder.of(), StringUtf8Coder.of()).encode(KV.of("", "data"), encodedData);

    assertThrows(
        "Expect java.lang.IllegalStateException: Unable to find inbound data receiver for"
            + " instruction 998L and transform 3L. But was not thrown or Exception did not match.",
        IllegalStateException.class,
        () ->
            handler.processBundle(
                InstructionRequest.newBuilder()
                    .setInstructionId("998L")
                    .setProcessBundle(
                        ProcessBundleRequest.newBuilder()
                            .setProcessBundleDescriptorId("1L")
                            .setElements(
                                Elements.newBuilder()
                                    .addData(
                                        Data.newBuilder()
                                            .setInstructionId("998L")
                                            .setTransformId("3L")
                                            .setData(encodedData.toByteString())
                                            .build())
                                    .build()))
                    .build()));
    assertThrows(
        "Expect java.lang.RuntimeException: Elements embedded in ProcessBundleRequest are "
            + "incomplete. But was not thrown or Exception did not match.",
        RuntimeException.class,
        () ->
            handler.processBundle(
                InstructionRequest.newBuilder()
                    .setInstructionId("998L")
                    .setProcessBundle(
                        ProcessBundleRequest.newBuilder()
                            .setProcessBundleDescriptorId("1L")
                            .setElements(
                                Elements.newBuilder()
                                    .addData(
                                        Data.newBuilder()
                                            .setInstructionId("998L")
                                            .setTransformId("2L")
                                            .setData(encodedData.toByteString())
                                            .build())
                                    .build()))
                    .build()));
    handler.shutdown();
  }

Line commented on: + " instruction 998L and transform 3L. But was not thrown or Exception did not match.",

Revised code:
public void testInstructionEmbeddedElementsWithMalformedData() throws Exception {
    List<String> dataOutput = new ArrayList<>();
    List<String> timerOutput = new ArrayList<>();
    ProcessBundleHandler handler =
        setupProcessBundleHanlderForSimpleRecordingDoFn(dataOutput, timerOutput);

    ByteString.Output encodedData = ByteString.newOutput();
    KvCoder.of(StringUtf8Coder.of(), StringUtf8Coder.of()).encode(KV.of("", "data"), encodedData);

    assertThrows(
        "Expect java.lang.IllegalStateException: Unable to find inbound data receiver for"
            + " instruction 998L and transform 3L.",
        IllegalStateException.class,
        () ->
            handler.processBundle(
                InstructionRequest.newBuilder()
                    .setInstructionId("998L")
                    .setProcessBundle(
                        ProcessBundleRequest.newBuilder()
                            .setProcessBundleDescriptorId("1L")
                            .setElements(
                                Elements.newBuilder()
                                    .addData(
                                        Data.newBuilder()
                                            .setInstructionId("998L")
                                            .setTransformId("3L")
                                            .setData(encodedData.toByteString())
                                            .build())
                                    .build()))
                    .build()));
    assertThrows(
        "Elements embedded in ProcessBundleRequest do not contain stream terminators for "
            + "all data and timer inputs. Unterminated endpoints: [2L:data,"
            + " 3L:timers:tfs-timer_family]",
        RuntimeException.class,
        () ->
            handler.processBundle(
                InstructionRequest.newBuilder()
                    .setInstructionId("998L")
                    .setProcessBundle(
                        ProcessBundleRequest.newBuilder()
                            .setProcessBundleDescriptorId("1L")
                            .setElements(
                                Elements.newBuilder()
                                    .addData(
                                        Data.newBuilder()
                                            .setInstructionId("998L")
                                            .setTransformId("2L")
                                            .setData(encodedData.toByteString())
                                            .build())
                                    .build()))
                    .build()));
    handler.shutdown();
  }