### Question:
PhysicalLogCommandReaderV2_2_4 extends BaseCommandReader { @Override protected Command read( byte commandType, ReadableChannel channel ) throws IOException { switch ( commandType ) { case NeoCommandType.NODE_COMMAND: return visitNodeCommand( channel ); case NeoCommandType.PROP_COMMAND: return visitPropertyCommand( channel ); case NeoCommandType.PROP_INDEX_COMMAND: return visitPropertyKeyTokenCommand( channel ); case NeoCommandType.REL_COMMAND: return visitRelationshipCommand( channel ); case NeoCommandType.REL_TYPE_COMMAND: return visitRelationshipTypeTokenCommand( channel ); case NeoCommandType.LABEL_KEY_COMMAND: return visitLabelTokenCommand( channel ); case NeoCommandType.NEOSTORE_COMMAND: return visitNeoStoreCommand( channel ); case NeoCommandType.SCHEMA_RULE_COMMAND: return visitSchemaRuleCommand( channel ); case NeoCommandType.REL_GROUP_COMMAND: return visitRelationshipGroupCommand( channel ); case NeoCommandType.INDEX_DEFINE_COMMAND: return visitIndexDefineCommand( channel ); case NeoCommandType.INDEX_ADD_COMMAND: return visitIndexAddNodeCommand( channel ); case NeoCommandType.INDEX_ADD_RELATIONSHIP_COMMAND: return visitIndexAddRelationshipCommand( channel ); case NeoCommandType.INDEX_REMOVE_COMMAND: return visitIndexRemoveCommand( channel ); case NeoCommandType.INDEX_DELETE_COMMAND: return visitIndexDeleteCommand( channel ); case NeoCommandType.INDEX_CREATE_COMMAND: return visitIndexCreateCommand( channel ); case NeoCommandType.UPDATE_RELATIONSHIP_COUNTS_COMMAND: return visitRelationshipCountsCommand( channel ); case NeoCommandType.UPDATE_NODE_COUNTS_COMMAND: return visitNodeCountsCommand( channel ); default: throw unknownCommandType( commandType, channel ); } }    }### Answer:
@Test public void shouldReadNoKeyIdAsMinusOne() throws Exception { InMemoryClosableChannel channel = new InMemoryClosableChannel(); IndexDefineCommand definitions = new IndexDefineCommand(); int indexNameId = 10; definitions.init( ObjectIntHashMap.newWithKeysValues( "myindex", indexNameId ), new ObjectIntHashMap<>() ); definitions.serialize( channel ); RemoveCommand removeCommand = new IndexCommand.RemoveCommand(); removeCommand.init( indexNameId, IndexEntityType.Node.id(), 1234, -1, null ); removeCommand.serialize( channel ); PhysicalLogCommandReaderV2_2_4 reader = new PhysicalLogCommandReaderV2_2_4(); assertTrue( reader.read( channel ) instanceof IndexDefineCommand ); RemoveCommand readRemoveCommand = (RemoveCommand) reader.read( channel ); assertEquals( removeCommand.getIndexNameId(), readRemoveCommand.getIndexNameId() ); assertEquals( removeCommand.getEntityType(), readRemoveCommand.getEntityType() ); assertEquals( removeCommand.getEntityId(), readRemoveCommand.getEntityId() ); assertEquals( removeCommand.getKeyId(), readRemoveCommand.getKeyId() ); assertNull( removeCommand.getValue() ); }