@Test public void testBadBigDecimalScale() { RadixAddress from = mock(RadixAddress.class); RadixAddress to = mock(RadixAddress.class); RRI rri = mock(RRI.class); BigDecimal tooSmall = BigDecimal.valueOf(1L, TokenUnitConversions.getTokenScale() + 1); assertThatThrownBy(() -> TransferTokensAction.create(rri, from, to, tooSmall)) .isInstanceOf(IllegalArgumentException.class); }
public static TransferTokensAction create( RRI rri, RadixAddress from, RadixAddress to, BigDecimal amount ) { return new TransferTokensAction(rri, from, to, amount, null, Collections.emptyMap()); }
TransferTokensAction implements Action { public static TransferTokensAction create( RRI rri, RadixAddress from, RadixAddress to, BigDecimal amount ) { return new TransferTokensAction(rri, from, to, amount, null, Collections.emptyMap()); } }
TransferTokensAction implements Action { public static TransferTokensAction create( RRI rri, RadixAddress from, RadixAddress to, BigDecimal amount ) { return new TransferTokensAction(rri, from, to, amount, null, Collections.emptyMap()); } private  TransferTokensAction(
		RRI rri,
		RadixAddress from,
		RadixAddress to,
		BigDecimal amount,
		byte[] attachment,
		Map<String, Object> metaData
	); }
TransferTokensAction implements Action { public static TransferTokensAction create( RRI rri, RadixAddress from, RadixAddress to, BigDecimal amount ) { return new TransferTokensAction(rri, from, to, amount, null, Collections.emptyMap()); } private  TransferTokensAction(
		RRI rri,
		RadixAddress from,
		RadixAddress to,
		BigDecimal amount,
		byte[] attachment,
		Map<String, Object> metaData
	); static TransferTokensAction create(
		RRI rri,
		RadixAddress from,
		RadixAddress to,
		BigDecimal amount
	); static TransferTokensAction create(
		RRI rri,
		RadixAddress from,
		RadixAddress to,
		BigDecimal amount,
		byte[] attachment
	); static TransferTokensAction create(
		RRI rri,
		RadixAddress from,
		RadixAddress to,
		BigDecimal amount,
		Long timestamp
	); static TransferTokensAction create(
		RRI rri,
		RadixAddress from,
		RadixAddress to,
		BigDecimal amount,
		byte[] attachment,
		Long timestamp
	); byte[] getAttachment(); RadixAddress getFrom(); RadixAddress getTo(); RRI getRRI(); BigDecimal getAmount(); Map<String, Object> getMetaData(); @Override String toString(); }
TransferTokensAction implements Action { public static TransferTokensAction create( RRI rri, RadixAddress from, RadixAddress to, BigDecimal amount ) { return new TransferTokensAction(rri, from, to, amount, null, Collections.emptyMap()); } private  TransferTokensAction(
		RRI rri,
		RadixAddress from,
		RadixAddress to,
		BigDecimal amount,
		byte[] attachment,
		Map<String, Object> metaData
	); static TransferTokensAction create(
		RRI rri,
		RadixAddress from,
		RadixAddress to,
		BigDecimal amount
	); static TransferTokensAction create(
		RRI rri,
		RadixAddress from,
		RadixAddress to,
		BigDecimal amount,
		byte[] attachment
	); static TransferTokensAction create(
		RRI rri,
		RadixAddress from,
		RadixAddress to,
		BigDecimal amount,
		Long timestamp
	); static TransferTokensAction create(
		RRI rri,
		RadixAddress from,
		RadixAddress to,
		BigDecimal amount,
		byte[] attachment,
		Long timestamp
	); byte[] getAttachment(); RadixAddress getFrom(); RadixAddress getTo(); RRI getRRI(); BigDecimal getAmount(); Map<String, Object> getMetaData(); @Override String toString();  }