@Test public void testReadingValuesAsBytesNonExistingKeyShouldReturnNull() { assertThat(value(new RecordHeaders(), "123")).isNull(); }
@SuppressWarnings("ConstantConditions") public static byte[] value(Headers headers, String key) { isTrue(headers != null, () -> "Headers may not be null"); Header header = headers.lastHeader(key); return header != null ? header.value() : null; }
HeaderUtils { @SuppressWarnings("ConstantConditions") public static byte[] value(Headers headers, String key) { isTrue(headers != null, () -> "Headers may not be null"); Header header = headers.lastHeader(key); return header != null ? header.value() : null; } }
HeaderUtils { @SuppressWarnings("ConstantConditions") public static byte[] value(Headers headers, String key) { isTrue(headers != null, () -> "Headers may not be null"); Header header = headers.lastHeader(key); return header != null ? header.value() : null; } private  HeaderUtils(); }
HeaderUtils { @SuppressWarnings("ConstantConditions") public static byte[] value(Headers headers, String key) { isTrue(headers != null, () -> "Headers may not be null"); Header header = headers.lastHeader(key); return header != null ? header.value() : null; } private  HeaderUtils(); static Long asLong(byte[] value); static Long valueAsLong(Headers headers, String key); static String asString(byte[] value); static String valueAsString(Headers headers, String key); static String valueAsString(Headers headers, String key, String defaultValue); @SuppressWarnings("ConstantConditions") // Null check performed by `Assert.isTrue` static byte[] value(Headers headers, String key); static byte[] toBytes(Number value); static void addHeader(Headers headers, String key, Object value); static Set<String> keys(Headers headers); static String generateMetadataKey(String key); @SuppressWarnings("ConstantConditions") // Null check performed by `Assert.isTrue` call static String extractKey(String metaDataKey); static Map<String, Object> extractAxonMetadata(Headers headers); static Headers toHeaders(EventMessage<?> eventMessage,
                                    SerializedObject<byte[]> serializedObject,
                                    BiFunction<String, Object, RecordHeader> headerValueMapper); static BiFunction<String, Object, RecordHeader> byteMapper(); }
HeaderUtils { @SuppressWarnings("ConstantConditions") public static byte[] value(Headers headers, String key) { isTrue(headers != null, () -> "Headers may not be null"); Header header = headers.lastHeader(key); return header != null ? header.value() : null; } private  HeaderUtils(); static Long asLong(byte[] value); static Long valueAsLong(Headers headers, String key); static String asString(byte[] value); static String valueAsString(Headers headers, String key); static String valueAsString(Headers headers, String key, String defaultValue); @SuppressWarnings("ConstantConditions") // Null check performed by `Assert.isTrue` static byte[] value(Headers headers, String key); static byte[] toBytes(Number value); static void addHeader(Headers headers, String key, Object value); static Set<String> keys(Headers headers); static String generateMetadataKey(String key); @SuppressWarnings("ConstantConditions") // Null check performed by `Assert.isTrue` call static String extractKey(String metaDataKey); static Map<String, Object> extractAxonMetadata(Headers headers); static Headers toHeaders(EventMessage<?> eventMessage,
                                    SerializedObject<byte[]> serializedObject,
                                    BiFunction<String, Object, RecordHeader> headerValueMapper); static BiFunction<String, Object, RecordHeader> byteMapper();  }