created CategoryEncoder and added CategoryEncoderTest