Converted test_encded_weight_matrix test.

Converted test_encded_weight_matrix test.