added assertions and shutdowns in multijvm tests