Index: modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicProgressBarUITest.java =================================================================== --- modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicProgressBarUITest.java (revision 490707) +++ modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicProgressBarUITest.java (working copy) @@ -133,4 +133,26 @@ progressBar.setIndeterminate(true); assertEquals(0, ui.getAnimationIndex()); } + + /** + * Regression test for HARMONY-2701 + * */ + public void testGetBoxLength() { + testBasicProgressBarUI pb = new testBasicProgressBarUI(); + assertEquals(0, pb.getBoxLength(0, 1)); + } + + /** + * Regression test for HARMONY-2701 + * */ + public void testGetBoxLength2() { + testBasicProgressBarUI pb = new testBasicProgressBarUI(); + assertEquals(8, pb.getBoxLength(50, 1)); + } + + class testBasicProgressBarUI extends BasicProgressBarUI { + public int getBoxLength(int a, int b) { + return super.getBoxLength(a, b); + } + } }