@Test
	public void testVersionedFileCreateAndCopy() throws Exception {
		LocalManagedBufferFile vbf = null;
		LocalManagedBufferFile pbf = null;
		try {

			// Create Version-1
			vbf = new LocalManagedBufferFile(BUFFER_SIZE, versionedTestFileMgr, VERSIONED);
			assertEquals(BUFFER_SIZE, vbf.getBufferSize());

			assertEquals("Free list should be empty", 0, vbf.getFreeIndexes().length);
			assertEquals(0, vbf.getIndexCount());

			int[] freeList = doWriteReadTest(vbf);

			int indexCnt = vbf.getIndexCount();// causes corresponding buffer ID's to become -1
			vbf.setFreeIndexes(freeList);
			long vfileID = vbf.getFileId();
			assertTrue(vfileID != 0);
			vbf.setParameter("TestParm1", 0x321);
			vbf.setParameter("TestParm2", 0x543);

			vbf.close();
			vbf = null;

			assertEquals(1, versionedTestFileMgr.getCurrentVersion());
			assertTrue(versionedTestFileMgr.getBufferFile(1).exists());
			assertTrue(!versionedTestFileMgr.getVersionFile(1).exists());
			assertTrue(!versionedTestFileMgr.getChangeDataFile(1).exists());

			// Reopen versioned buffer file for reading
			vbf = new LocalManagedBufferFile(versionedTestFileMgr, false, -1, VERSIONED);
			assertEquals(indexCnt, vbf.getIndexCount());
			assertTrue(Arrays.equals(freeList, vbf.getFreeIndexes()));
			assertEquals(vfileID, vbf.getFileId());
			assertEquals(0x321, vbf.getParameter("TestParm1"));
			assertEquals(0x543, vbf.getParameter("TestParm2"));

			doReadTest2(vbf);

			// Simulate private checkout
			pbf = new LocalManagedBufferFile(vbf.getBufferSize(), privateTestFileMgr, PRIVATE);
			LocalBufferFile.copyFile(vbf, pbf, null, TaskMonitor.DUMMY);

			assertEquals(indexCnt, pbf.getIndexCount());
			assertTrue(Arrays.equals(freeList, pbf.getFreeIndexes()));
			long pfileID = pbf.getFileId();
			assertTrue(pfileID != 0);
			assertTrue(pfileID != vfileID);
			assertEquals(0x321, pbf.getParameter("TestParm1"));
			assertEquals(0x543, pbf.getParameter("TestParm2"));

			doReadTest2(pbf);

			pbf.close();
			pbf = null;

			vbf.close();
			vbf = null;

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

		}
		finally {
			if (vbf != null) {
				try {
					vbf.close();
				}
				catch (IOException e) {
					// ignore
				}
			}
			if (pbf != null) {
				try {
					pbf.close();
				}
				catch (IOException e) {
					// ignore
				}
			}
		}
	}
Test add-to-version control scenario: versioned file is created using private file.
Test results in the creation of private file and version-1 containing:
		Parms: TestParm1=0x321, TestParm2=0x543
		Buffers: 0[10]=0xf0.., 1[11]=0xf1.., 2[-1]=empty
@throws Exception
Ghidra/Framework/DB/src/test/java/db/buffers/VersionedLocalBufferFileTest.java