@Test void testConvertFromBooleanMetaDataValue() { MetaDataValue testMetaData = MetaDataValue.newBuilder() .setBooleanValue(true) .build(); Object resultObject = testSubject.convertFromMetaDataValue(testMetaData); assertTrue(resultObject instanceof Boolean); Boolean result = (Boolean) resultObject; assertTrue(result); }
public Object convertFromMetaDataValue(MetaDataValue value) { switch (value.getDataCase()) { case TEXT_VALUE: return value.getTextValue(); case BYTES_VALUE: return serializer.deserialize(new GrpcSerializedObject(value.getBytesValue())); case DOUBLE_VALUE: return value.getDoubleValue(); case NUMBER_VALUE: return value.getNumberValue(); case BOOLEAN_VALUE: return value.getBooleanValue(); case DATA_NOT_SET: default: return null; } }
GrpcMetaDataConverter { public Object convertFromMetaDataValue(MetaDataValue value) { switch (value.getDataCase()) { case TEXT_VALUE: return value.getTextValue(); case BYTES_VALUE: return serializer.deserialize(new GrpcSerializedObject(value.getBytesValue())); case DOUBLE_VALUE: return value.getDoubleValue(); case NUMBER_VALUE: return value.getNumberValue(); case BOOLEAN_VALUE: return value.getBooleanValue(); case DATA_NOT_SET: default: return null; } } }
GrpcMetaDataConverter { public Object convertFromMetaDataValue(MetaDataValue value) { switch (value.getDataCase()) { case TEXT_VALUE: return value.getTextValue(); case BYTES_VALUE: return serializer.deserialize(new GrpcSerializedObject(value.getBytesValue())); case DOUBLE_VALUE: return value.getDoubleValue(); case NUMBER_VALUE: return value.getNumberValue(); case BOOLEAN_VALUE: return value.getBooleanValue(); case DATA_NOT_SET: default: return null; } } GrpcMetaDataConverter(Serializer serializer); }
GrpcMetaDataConverter { public Object convertFromMetaDataValue(MetaDataValue value) { switch (value.getDataCase()) { case TEXT_VALUE: return value.getTextValue(); case BYTES_VALUE: return serializer.deserialize(new GrpcSerializedObject(value.getBytesValue())); case DOUBLE_VALUE: return value.getDoubleValue(); case NUMBER_VALUE: return value.getNumberValue(); case BOOLEAN_VALUE: return value.getBooleanValue(); case DATA_NOT_SET: default: return null; } } GrpcMetaDataConverter(Serializer serializer); MetaDataValue convertToMetaDataValue(Object value); MetaData convert(Map<String, MetaDataValue> metaDataMap); Object convertFromMetaDataValue(MetaDataValue value); }
GrpcMetaDataConverter { public Object convertFromMetaDataValue(MetaDataValue value) { switch (value.getDataCase()) { case TEXT_VALUE: return value.getTextValue(); case BYTES_VALUE: return serializer.deserialize(new GrpcSerializedObject(value.getBytesValue())); case DOUBLE_VALUE: return value.getDoubleValue(); case NUMBER_VALUE: return value.getNumberValue(); case BOOLEAN_VALUE: return value.getBooleanValue(); case DATA_NOT_SET: default: return null; } } GrpcMetaDataConverter(Serializer serializer); MetaDataValue convertToMetaDataValue(Object value); MetaData convert(Map<String, MetaDataValue> metaDataMap); Object convertFromMetaDataValue(MetaDataValue value);  }