RefDataProcessingInfoSerde implements
        Serde<RefDataProcessingInfo>,
        Serializer<RefDataProcessingInfo>,
        Deserializer<RefDataProcessingInfo> { public void updateLastAccessedTime(final ByteBuffer byteBuffer, final long newLastAccessedTimeEpochMs) { byteBuffer.putLong(LAST_ACCESSED_TIME_OFFSET, newLastAccessedTimeEpochMs); }  @Override RefDataProcessingInfo deserialize(final ByteBuffer byteBuffer); @Override void serialize(final ByteBuffer byteBuffer, final RefDataProcessingInfo refDataProcessingInfo); void updateState(final ByteBuffer byteBuffer,
                                   final ProcessingState newProcessingState); void updateLastAccessedTime(final ByteBuffer byteBuffer, final long newLastAccessedTimeEpochMs); void updateLastAccessedTime(final ByteBuffer byteBuffer); static ProcessingState extractProcessingState(final ByteBuffer byteBuffer); static long extractLastAccessedTimeMs(final ByteBuffer byteBuffer); static boolean wasAccessedAfter(final ByteBuffer processingInfoBuffer, final ByteBuffer timeMsBuffer); @Override int getBufferCapacity(); static final int CREATE_TIME_OFFSET; static final int LAST_ACCESSED_TIME_OFFSET; static final int EFFECTIVE_TIME_OFFSET; static final int PROCESSING_STATE_OFFSET; }
@Test void testUpdateLastAccessedTime() { final RefDataProcessingInfo input = new RefDataProcessingInfo( 1, 1, 1, ProcessingState.LOAD_IN_PROGRESS); final RefDataProcessingInfo expectedOutput = new RefDataProcessingInfo( 1, 123, 1, ProcessingState.LOAD_IN_PROGRESS); doByteBufferModificationTest( input, expectedOutput, (serde, byteBuffer) -> serde.updateLastAccessedTime(byteBuffer, 123)); }