b39223e295
Motivation: NPE doesn't cause the tests to fail but should get fixed. Modifications: Modified the StreamBufferingEncoderTest to mock the ctx to return a promise. Result: Fixes #3905