@Test
public void putCurrentInstanceData() throws Exception {

  ViewEntity entity1 = getViewEntityMock(VERSION_1);
  ViewEntity entity2 = getViewEntityMock(VERSION_2);
  replay(entity1, entity2);
  ViewInstanceEntity instanceEntity1 = getViewInstanceEntityMock(entity1);
  List<ViewInstanceDataEntity> data1 = new ArrayList<>();
  expect(instanceEntity1.getData()).andReturn(data1).anyTimes();
  ViewInstanceEntity instanceEntity2 = getViewInstanceEntityMock(entity2);
  List<ViewInstanceDataEntity> data2 = new ArrayList<>();
  expect(instanceEntity2.getData()).andReturn(data2).anyTimes();
  replay(instanceEntity1, instanceEntity2);
  ViewDataMigrationContextImpl context = new TestViewDataMigrationContextImpl(instanceEntity1, instanceEntity2);
  context.putOriginInstanceData("user1", "key1", "val1");
  context.putCurrentInstanceData("user2", "key2", "val2");
  Assert.assertEquals(1, data1.size());
  Assert.assertEquals("user1", data1.get(0).getUser());
  Assert.assertEquals("key1", data1.get(0).getName());
  Assert.assertEquals("val1", data1.get(0).getValue());
  Assert.assertEquals(1, data2.size());
  Assert.assertEquals("user2", data2.get(0).getUser());
  Assert.assertEquals("key2", data2.get(0).getName());
  Assert.assertEquals("val2", data2.get(0).getValue());
}