UNDERTOW-166 Make web socket encoders also encode sub classes
Fix NPE when using mock requests