Search for this in Eclipse:
(?s)\t@Test\(expected = (\w+\.class)\)\r?\n\tpublic void (test\w+\(\)) (?:throws \w*Exception )?\{(\r?\n\t\t.*?\r?\n\t)\}\r?\n
Replace with the following:
\t@Test public void $2 {assertThrows($1, () -> {$3});}\n\n
Search for this in Eclipse:
(?s)\t@Test\(expected = (\w+\.class)\)\r?\n\tpublic void (test\w+\(\)) (?:throws \w*Exception )?\{(\r?\n\t\t.*?\r?\n\t)\}\r?\n
Replace with the following:
\t@Test public void $2 {assertThrows($1, () -> {$3});}\n\n