UnsupportedOverrideFactory implements PTransformOverrideFactory<InputT, OutputT, TransformT> { @Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, OutputT newOutput) { throw new UnsupportedOperationException(message); } private  UnsupportedOverrideFactory(String message); @SuppressWarnings("rawtypes") static UnsupportedOverrideFactory<InputT, OutputT, TransformT> withMessage(String message); @Override PTransformReplacement<InputT, OutputT> getReplacementTransform(
      AppliedPTransform<InputT, OutputT, TransformT> transform); @Override Map<PValue, ReplacementOutput> mapOutputs(
      Map<TupleTag<?>, PValue> outputs, OutputT newOutput);  }
@Test public void mapOutputThrows() { thrown.expect(UnsupportedOperationException.class); thrown.expectMessage(message); factory.mapOutputs(Collections.emptyMap(), PDone.in(pipeline)); }