public void testGetRandomAccentColor(){
  List<Integer> accentColorList=new ArrayList<>();
  try {
    for (    String name : MaterialPalettes.COLORS_WITH_ACCENT_NAMES) {
      accentColorList.addAll(MaterialPalettes.getAccentColorsByName(name));
    }
    Integer randomColor=MaterialPalettes.getRandomAccentColor();
    assertTrue(accentColorList.contains(randomColor));
  }
 catch (  IllegalAccessException iae) {
    fail();
  }
}

public void testGetRandomAccentColor ( ) { List < Integer > accentColorList = new ArrayList < > ( ) ; try { for ( String name : MaterialPalettes . COLORS_WITH_ACCENT_NAMES ) { accentColorList . addAll ( MaterialPalettes . getAccentColorsByName ( name ) ) ; } Integer randomColor = MaterialPalettes . getRandomAccentColor ( ) ; assertTrue ( accentColorList . contains ( randomColor ) ) ; } catch ( IllegalAccessException iae ) { fail ( ) ; } }
tests that the color returned by getrandomaccentcolor exists in the accent color groups .
