	@Test
	public void oneTransaction() {

		
		UUID id = UUID.randomUUID();
		Command command = new IncreaseInventory(UUID.randomUUID(), id, 1, 0L);
		Event event1 = new InventoryIncreased(id, 1);
		List<Event> events = Arrays.asList(event1);
		UnitOfWork t = UnitOfWork.create(UUID.randomUUID(), command, events);
		AggregateRootHistory toStore = new AggregateRootHistory();
		toStore.add(t);
		
		// first get on map will returns null, second will returns toStore 
		when(mapWithUuidKey.get(id)).thenReturn(null, toStore);
		
		HzUnitOfWorkJournal<UUID> store = new HzUnitOfWorkJournal<>(mapWithUuidKey);
		store.append(id, t);

		ArgumentCaptor<UUID> argumentKey = ArgumentCaptor.forClass(UUID.class);
		ArgumentCaptor<AggregateRootHistory> argumentValue = ArgumentCaptor.forClass(AggregateRootHistory.class);

		verify(mapWithUuidKey, times(1)).set(argumentKey.capture(), argumentValue.capture());
		
		// checks for key
		assertThat(argumentKey.getValue(), sameInstance(id));

		// checks for all transactions fields except the timestamp
		AggregateRootHistory asObj = argumentValue.getValue();
		UnitOfWork copy = asObj.getUnitsOfWork().get(0);
		assertThat(copy.getCommand(), is(command));
		assertThat(copy.getVersion(), is(1l));
		assertThat("contains events", copy.getEvents().containsAll(events));

	}