void (String templateName) { try { EqualsHashCodeTemplatesManager.getInstance().setDefaultTemplate(templateName); doTest(Functions.id(), Functions.id(), Functions.id(), true); } catch (Throwable throwable) { try (InputStream is = GenerateMembersUtil.class.getResourceAsStream("equalsHelper.vm")) { throw new RuntimeException(new String(is.readAllBytes(), StandardCharsets.UTF_8), throwable); } catch (Throwable t) { throwable.addSuppressed(t); throw throwable; } } finally { EqualsHashCodeTemplatesManager.getInstance().setDefaultTemplate(EqualsHashCodeTemplatesManager.INTELLI_J_DEFAULT); } }