public static void maybeAddGuiceBerryTearDown(
ThreadLocal<TearDown> scaffoldingThreadLocal, final TestDescription testDescription,
final TearDown toTearDown) {
Object testToTearDown = testDescription.getTestCase();
if (testToTearDown instanceof TearDownAccepter) {
TearDownAccepter tdtc = (TearDownAccepter) testToTearDown;
tdtc.addTearDown(toTearDown);
} else {
scaffoldingThreadLocal.set(toTearDown);
}
}