### Question:
Randoms { public static BigDecimal randomPositiveBigDecimal(final int maxValue, final int precision) { final BigInteger maxiumValue = BigInteger.valueOf(maxValue).multiply(BigInteger.TEN.pow(precision)) .subtract(BigInteger.ONE); return BigDecimal.valueOf(Randoms.randomInt(maxiumValue.intValue()), precision) .add(BigDecimal.valueOf(BigInteger.ONE.intValue(), precision)); }  static String randomString(final int length); static char randomChar(); static String randomString(); static String randomEmailAddress(); static String randomPhoneNumber(); static DateTime randomDateTime(); static LocalDateTime randomLocalDateTime(); static LocalDate randomLocalDate(); static LocalTime randomLocalTime(); static E randomEnum(final Class<E> enumClass); static Set<E> randomEnumSet(final Class<E> enumClass); static E randomEnumInSet(final Set<E> enumSet); static Set<T> randomSubset(final Set<T> set); static int randomInt(final int max); static float randomFloat(); static double randomDouble(); static long randomLong(); static boolean randomBoolean(); static BigDecimal randomBigDecimal(final int maxValue, final int precision); static BigDecimal randomPositiveBigDecimal(final int maxValue, final int precision); static int randomIntInRange(final int from, final int to); static String randomCreditCardNumber(final String prefix); static String randomId(); static T randomItem(final T[] array); static T randomItem(final Collection<T> collection); static Set<String> randomIdSet();  }### Answer:
@Test public void shouldReturnPositiveBigDecimal_withMaxValueOfTwoAndPrecisionOfZero() { final Set<BigDecimal> randomBigDecimals = new HashSet<>(); for (int n = 0; n < SAMPLE_SIZE; n++) { final BigDecimal randomBigDecimal = Randoms.randomPositiveBigDecimal(2, 0); randomBigDecimals.add(randomBigDecimal); } assertEquals("Random sample BigDecimals should only contain 1's", 1, randomBigDecimals.size()); assertTrue("Should not contain a non-positive value", !randomBigDecimals.contains(BigDecimal.ZERO)); }