@Test
public void testCreateWithUnit() {

  final Object[][] testParameters = new Object[][] {
      {"0", Unit.AER, valueOf(0L)},
      {"1", Unit.AER, valueOf(1L)},
      {"10", Unit.AER, valueOf(10L)},
      {"0.000000001", Unit.GAER, valueOf(1L)},
      {"0.01", Unit.GAER, valueOf(10000000L)},
      {"0", Unit.GAER, valueOf(0L)},
      {"1", Unit.GAER, valueOf(1000000000L)},
      {"10", Unit.GAER, valueOf(10000000000L)},
      {"10.1", Unit.GAER, valueOf(10100000000L)},
      {"0.000000000000000001", Unit.AERGO, valueOf(1L)},
      {"0.01", Unit.AERGO, new BigInteger("10000000000000000")},
      {"0", Unit.AERGO, new BigInteger("0")},
      {"1", Unit.AERGO, new BigInteger("1000000000000000000")},
      {"10", Unit.AERGO, new BigInteger("10000000000000000000")},
      {"10.1", Unit.AERGO, new BigInteger("10100000000000000000")}
  };
  for (final Object[] testParameter : testParameters) {
    final String amount = (String) testParameter[0];
    final Aer.Unit unit = (Aer.Unit) testParameter[1];
    final BigInteger expected = (BigInteger) testParameter[2];
    logger.debug("Amount: {}, Unit: {}, expected: {}", amount, unit, expected);
    final BigInteger aer = Aer.of(amount, unit).getValue();
    assertEquals(expected, aer);
  }
}