Add additional checks in junit tests