unit test for compute_publish_state.