### Question:
ViewDataMigrationContextImpl implements ViewDataMigrationContext { @Override @Transactional public void putCurrentInstanceData(String user, String key, String value) { putInstanceData(currentInstanceDefinition, user, key, value); } ViewDataMigrationContextImpl(ViewInstanceEntity originInstanceDefinition,
                                      ViewInstanceEntity currentInstanceDefinition); @Override int getCurrentDataVersion(); @Override int getOriginDataVersion(); @Override DataStore getOriginDataStore(); @Override DataStore getCurrentDataStore(); @Override @Transactional void putCurrentInstanceData(String user, String key, String value); @Override void copyAllObjects(Class originEntityClass, Class currentEntityClass); @Override @Transactional void copyAllObjects(Class originEntityClass, Class currentEntityClass, EntityConverter entityConverter); @Override void copyAllInstanceData(); @Override ViewInstanceEntity getOriginInstanceDefinition(); @Override Map<String, Class> getOriginEntityClasses(); @Override Map<String, Class> getCurrentEntityClasses(); @Override ViewInstanceEntity getCurrentInstanceDefinition(); @Override Map<String, Map<String, String>> getOriginInstanceDataByUser(); @Override @Transactional void putOriginInstanceData(String user, String key, String value); @Override Map<String, Map<String, String>> getCurrentInstanceDataByUser(); void closeMigration();  }### Answer:
@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()); }