@Test
public void testTokenWithMint() {

	final UInt256 hundred = UInt256.TEN.pow(2);
	MutableSupplyTokenDefinitionParticle tokenDefinitionParticle = mock(MutableSupplyTokenDefinitionParticle.class);
	RRI tokenRef = mock(RRI.class);
	when(tokenDefinitionParticle.getRRI()).thenReturn(tokenRef);
	when(tokenDefinitionParticle.getName()).thenReturn("Name");
	when(tokenDefinitionParticle.getSymbol()).thenReturn("ISO");
	when(tokenDefinitionParticle.getDescription()).thenReturn("Desc");
	when(tokenDefinitionParticle.getGranularity()).thenReturn(UInt256.ONE);
	when(tokenDefinitionParticle.getTokenPermissions()).thenReturn(Collections.singletonMap(TokenTransition.MINT,
		TokenPermission.TOKEN_OWNER_ONLY));
	TransferrableTokensParticle minted = mock(TransferrableTokensParticle.class);
	when(minted.getAmount()).thenReturn(hundred);
	when(minted.getTokenDefinitionReference()).thenReturn(tokenRef);
	UnallocatedTokensParticle unallocatedTokensParticle = mock(UnallocatedTokensParticle.class);
	when(unallocatedTokensParticle.getAmount()).thenReturn(UInt256.MAX_VALUE.subtract(hundred));
	when(unallocatedTokensParticle.getTokDefRef()).thenReturn(tokenRef);
	when(unallocatedTokensParticle.euid()).thenReturn(EUID.ONE);
	TokenDefinitionsReducer tokenDefinitionsReducer = new TokenDefinitionsReducer();
	TokenDefinitionsState state1 = tokenDefinitionsReducer.reduce(TokenDefinitionsState.init(), tokenDefinitionParticle);
	TokenDefinitionsState state2 = tokenDefinitionsReducer.reduce(state1, unallocatedTokensParticle);
	TokenDefinitionsState state3 = tokenDefinitionsReducer.reduce(state2, minted);
	assertThat(state3.getState().get(tokenRef).getTotalSupply()).isEqualTo(TokenUnitConversions.subunitsToUnits(hundred));
	assertThat(state3.getState().get(tokenRef).getName()).isEqualTo("Name");
	assertThat(state3.getState().get(tokenRef).getIso()).isEqualTo("ISO");
	assertThat(state3.getState().get(tokenRef).getTokenSupplyType()).isEqualTo(TokenSupplyType.MUTABLE);
}