### Question:
DocumentSendThread extends Thread { private List<Patch> generatePatches(String key, String text) throws BadLocationException { String previous = ""; synchronized (documentCache) { if (documentCache.containsKey(key)) { previous = documentCache.get(key); } documentCache.put(key, text); } return PATCH_GENERATOR.patch_make(previous, text); } DocumentSendThread(EventReceiver receiver, DocumentInfo info, Project project, Map<String, String> cache,
            diff_match_patch PATCH_GENERATOR); @Override void run();  }### Answer:
@Test public void generatePatchesTest() { thread.run(); assertEquals(cache.size(), 1); }