Making governance more testable and fix cache reset issue