public void testInputOfInvalidFrame_causesErrorAndRefusesFurtherInput()
{
sendAmqpSaslHeader(_frameParserWithMockDecoder);
String exceptionMessage = "dummy decode exception";
when(_mockDecoder.readObject()).thenThrow(new DecodeException(exceptionMessage));
// We send a valid frame but the mock decoder has been configured to reject it
try {
_frameParserWithMockDecoder.input(_saslFrameBytes);
fail("expected exception");