Question: Write a unit test case for this method. protected static String formatIntervalPredicate(ResourceBundle bundle, Interval interval, String units) {String lower = bundle.getString(interval.isLowerBoundIsInclusive() ? formats.atLeast: formats.above); lower
Write a unit test case for this method. 
protected static String formatIntervalPredicate(ResourceBundle bundle, Interval interval, String units) {String lower = bundle.getString(interval.isLowerBoundIsInclusive() ? "formats.atLeast": "formats.above"); lower = lower.replaceAll("\\{value\\}", String.valueOf(interval.getLowerBound())); lower = lower.replaceAll("\\{units\\}", units);String upper = bundle.getString(interval.isLowerBoundIsInclusive() ? "formats.atMost": "formats.below"); upper = upper. replaceAll("\\{value\\}", String. valueOf (interval. getllpperBoundO)); upper = upper.replaceAll("\\{units\\}", units); if (interval.getUpperBound() == Double.POSITIVE_INFINITY) {return lower;} if (interval.getLowerBound() == Double.NEGATIVE_INFINITY) {return upper;} return bundle.getString("formats.double_bounded").replaceAll("\\{lower\\}", lower).replaceAll|("\\{upper\\}", upper])];}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
