Add unit tests for readOnly sub adapter