}
protected T rebind(boolean checkSerializable) throws Exception {
return rebind(checkSerializable, false);
}
@SuppressWarnings("unchecked")
<BUG>protected T rebind(boolean checkSerializable, boolean terminateOrigManagementContext) throws Exception {
RebindTestUtils.waitForPersisted(origApp);</BUG>
if (checkSerializable) {
RebindTestUtils.checkCurrentMementoSerializable(origApp);
}

}
protected T rebind() throws Exception {
return rebind(true);
}
protected T rebind(boolean checkSerializable) throws Exception {
return rebind(checkSerializable, false);
}
@SuppressWarnings("unchecked")
protected T rebind(boolean checkSerializable, boolean terminateOrigManagementContext) throws Exception {
if (newApp!=null || newManagementContext!=null) throw new IllegalStateException("already rebinded");
RebindTestUtils.waitForPersisted(origApp);
if (checkSerializable) {
RebindTestUtils.checkCurrentMementoSerializable(origApp);
}
