### Question:
SSZSerializer implements BytesSerializer, SSZVisitorHandler<SerializerResult> { public <C> C decode(byte[] data, Class<? extends C> clazz) { Object decodeResult = sszVisitorHost.handleAny( typeResolver.resolveSSZType(new SSZField(clazz)), Bytes.wrap(data), new SosDeserializer()); return (C) decodeResult; } SSZSerializer(SSZVisitorHost sszVisitorHost,
      TypeResolver typeResolver); @Override byte[] encode(@Nullable C inputObject, Class<? extends C> inputClazz); @Override SerializerResult visitAny(SSZType sszType, Object value); @Override SerializerResult visitList(SSZListType descriptor, Object listValue, int startIdx, int len); C decode(byte[] data, Class<? extends C> clazz);  }### Answer:
@Test public void testBytesValue() { SSZSerializer serializer = new SSZBuilder().buildSerializer(); BytesValueObject expected = new BytesValueObject( UInt64.valueOf(1), 0, BytesValue.fromHexString( "0x01010000000000000051807b754a5c823a5fff492efd0a0b4adde75f6c68d3e4c9cfda2a6a66a17c939ed00300000000001cee20cf2be0b6fbcbd6340bbb1f2426f781849160d9d96a085856f28260ac3a80420f0000000000"), Bytes32.fromHexString( "749af491e04d756bc694f6cb2fcc35d7077e8e97da2b17d380420f0000000000")); BytesValue serial = serializer.encode2(expected); BytesValueObject actual = serializer.decode(serial, BytesValueObject.class); assertEquals(expected, actual); }