The petitioner shall pay the costs when there is no contest, and in case of contest, the cost shall be adjudged by the court.