public void test_fill$BIIB(){
  byte val=Byte.MAX_VALUE;
  byte d[]=new byte[1000];
  Arrays.fill(d,400,d.length,val);
  for (int i=0; i < 400; i++)   assertTrue("Filled elements not in range",!(d[i] == val));
  for (int i=400; i < d.length; i++)   assertTrue("Failed to fill byte array correctly",d[i] == val);
  int result;
  try {
    Arrays.fill(new byte[2],2,1,(byte)27);
    result=0;
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    result=1;
  }
catch (  IllegalArgumentException e) {
    result=2;
  }
  assertEquals("Wrong exception1",2,result);
  try {
    Arrays.fill(new byte[2],-1,1,(byte)27);
    result=0;
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    result=1;
  }
catch (  IllegalArgumentException e) {
    result=2;
  }
  assertEquals("Wrong exception2",1,result);
  try {
    Arrays.fill(new byte[2],1,4,(byte)27);
    result=0;
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    result=1;
  }
catch (  IllegalArgumentException e) {
    result=2;
  }
  assertEquals("Wrong exception",1,result);
}

public void test_fill$BIIB ( ) { byte val = Byte . MAX_VALUE ; byte d [ ] = new byte [ 1000 ] ; Arrays . fill ( d , 400 , d . length , val ) ; for ( int i = 0 ; i < 400 ; i ++ ) assertTrue ( "Filled elements not in range" , ! ( d [ i ] == val ) ) ; for ( int i = 400 ; i < d . length ; i ++ ) assertTrue ( "Failed to fill byte array correctly" , d [ i ] == val ) ; int result ; try { Arrays . fill ( new byte [ 2 ] , 2 , 1 , ( byte ) 27 ) ; result = 0 ; } catch ( ArrayIndexOutOfBoundsException e ) { result = 1 ; } catch ( IllegalArgumentException e ) { result = 2 ; } assertEquals ( "Wrong exception1" , 2 , result ) ; try { Arrays . fill ( new byte [ 2 ] , - 1 , 1 , ( byte ) 27 ) ; result = 0 ; } catch ( ArrayIndexOutOfBoundsException e ) { result = 1 ; } catch ( IllegalArgumentException e ) { result = 2 ; } assertEquals ( "Wrong exception2" , 1 , result ) ; try { Arrays . fill ( new byte [ 2 ] , 1 , 4 , ( byte ) 27 ) ; result = 0 ; } catch ( ArrayIndexOutOfBoundsException e ) { result = 1 ; } catch ( IllegalArgumentException e ) { result = 2 ; } assertEquals ( "Wrong exception" , 1 , result ) ; }
java . util . arrays # fill ( byte [ ] , int , int , byte )
