public void testCompareLessScale1(){
  String a="12380964839238475457356735674573563567890295784902768787678287";
  int aScale=18;
  String b="4573563567890295784902768787678287";
  int bScale=28;
  BigDecimal aNumber=new BigDecimal(new BigInteger(a),aScale);
  BigDecimal bNumber=new BigDecimal(new BigInteger(b),bScale);
  int result=1;
  assertEquals("incorrect result",result,aNumber.compareTo(bNumber));
}

public void testCompareLessScale1 ( ) { String a = "12380964839238475457356735674573563567890295784902768787678287" ; int aScale = 18 ; String b = "4573563567890295784902768787678287" ; int bScale = 28 ; BigDecimal aNumber = new BigDecimal ( new BigInteger ( a ) , aScale ) ; BigDecimal bNumber = new BigDecimal ( new BigInteger ( b ) , bScale ) ; int result = 1 ; assertEquals ( "incorrect result" , result , aNumber . compareTo ( bNumber ) ) ; }
compare to a number of an less scale
