public class AssertionTest {

  public static void main(String[] args) {
    double value = thirdPartyFunction();
    assert (value >= 0 && value < 1) : 
       " thirdPartyFunction value " + value + " out of range";
    System.out.println("Value is " + value);
  }

  public static double thirdPartyFunction() {
    return 5.0;
  }
}