@Test
	void testFile_textDiff() throws PatchGenerationException {
		TextFileInfo textFile = new StubFileInfo("foo.txt").withText("""
				one
				two
				three
				""");
		TextFileInfo textFileAlt = new StubFileInfo(textFile.getName()).withText("""
				one
				five
				three
				""");
		FileBundle fileInfos = TestClassUtils.fromFiles(textFile);
		Workspace workspace = TestClassUtils.fromBundle(fileInfos);

		// Modify the file
		fileInfos.put(textFileAlt);

		// Build the patch.
		WorkspacePatch patch = patchProvider.createPatch(workspace);

		// Assert serialization/deserialization doesn't result in breakage.
		String serialized = patchProvider.serializePatch(patch);
		WorkspacePatch deserializePatch = patchProvider.deserializePatch(workspace, serialized);
		assertEquals(patch, deserializePatch);

		// Undo the change.
		String fileKey = textFile.getName();
		fileInfos.decrementHistory(fileKey);
		TextFileInfo revertedTextFile = fileInfos.get(fileKey).asTextFile();
		assertEquals(textFile.getText(), revertedTextFile.getText(), "Revert failed");

		// Apply the patch
		assertTrue(patchApplier.apply(patch, failOnErrors()));

		// Validate the patch was applied
		TextFileInfo patchedTextFile = fileInfos.get(fileKey).asTextFile();
		assertNotEquals(textFile, patchedTextFile, "File bundle post-patch yielded initial file state");
		assertEquals(textFileAlt, patchedTextFile, "File bundle post-patch yielded unexpected state");
	}
Tests for {@link PatchProvider} and {@link PatchApplier}
recaf-core/src/test/java/software/coley/recaf/services/workspace/patch/PatchingTest.java