fix API version check in Junit