@Test
	public void testPrivateModify() throws Exception {

		testVersionedFileCreateAndCopy();

		LocalManagedBufferFile pbf = null;
		LocalManagedBufferFile saveFile = null;
		try {

			// Open private file for version update
			pbf = new LocalManagedBufferFile(privateTestFileMgr, true, -1, PRIVATE);

			saveFile = (LocalManagedBufferFile) pbf.getSaveFile();
			assertNotNull(saveFile);

			long pfileID = pbf.getFileId();
			assertTrue(pfileID != 0);

			// Write application level change file
			writeAppChangeFile(pbf);

			// Modify save file
			byte[] data = new byte[BUFFER_SIZE];
			DataBuffer buf = new DataBuffer(data);

			Arrays.fill(data, (byte) 0xf3);
			buf.setId(13);
			saveFile.put(buf, 3);

			Arrays.fill(data, (byte) 0xf4);
			buf.setId(14);
			saveFile.put(buf, 4);

			// Set free ID list for output file
			int[] newFreeList = new int[] { 2, 3 };
			saveFile.setFreeIndexes(newFreeList);

			// Copy/Set file parameters
			saveFile.setParameter("TestParm1", 0x322);
			saveFile.setParameter("TestParm2", 0x544);

			pbf.saveCompleted(true);

			pbf.close();
			pbf = null;

			saveFile.close();
			saveFile = null;

			assertEquals(2, privateTestFileMgr.getCurrentVersion());
			assertTrue(privateTestFileMgr.getBufferFile(2).exists());
			assertTrue(privateTestFileMgr.getChangeDataFile(2).exists());

		}
		finally {
			if (saveFile != null) {
				try {
					pbf.saveCompleted(false);
					saveFile.close();
				}
				catch (IOException e) {
					// ignore
				}
			}
			if (pbf != null) {
				try {
					pbf.close();
				}
				catch (IOException e) {
					// ignore
				}
			}
		}
	}
Test checked-out file modify scenario: version-1 file is created and derived private file is modified.
Test results in the creation of private file and version-1.  Version-1 file contains:
		Parms: TestParm1=0x321, TestParm2=0x543
		Buffers: 0[10]=0xf0.., 1[11]=0xf1.., 2[-1]=empty
Private file is based upon version-1 and modified to contain:
		Parms: TestParm1=0x322, TestParm2=0x544
		Buffers: 0[10]=0xf0.., 1[11]=0xf1.., 2[-1]=empty, 3[-1]=empty, 4[14]=0xf4..
@throws Exception
Ghidra/Framework/DB/src/test/java/db/buffers/VersionedLocalBufferFileTest.java