### Question:
GameObjectInstanceAddedToSceneCondition implements Condition { public static GameObjectInstanceAddedToSceneCondition unmarshall(GameScene aGameScene, Map<String, Object> aSerializedData) { GameObjectInstanceAddedToSceneCondition theResult = new GameObjectInstanceAddedToSceneCondition(); String theObjectUUID = (String) aSerializedData.get("objectUUID"); if (theObjectUUID != null) { theResult.gameObject.setQuietly(aGameScene.findObjectByID(theObjectUUID)); } return theResult; } @UsedByReflection  GameObjectInstanceAddedToSceneCondition(); Property<GameObject> gameObjectProperty(); @Override ConditionResult appliesTo(GameScene aScene, GameEvent aEvent); @Override Map<String, Object> serialize(); static GameObjectInstanceAddedToSceneCondition unmarshall(GameScene aGameScene, Map<String, Object> aSerializedData); static final String GAME_OBJECT_PROPERTY; }### Answer:
@Test public void testUnmarshall() throws Exception { Map<String, Object> theData = new HashMap<>(); theData.put(GameObjectInstanceAddedToSceneCondition.TYPE_ATTRIBUTE, GameObjectInstanceAddedToSceneCondition.TYPE_VALUE); GameObjectInstanceAddedToSceneCondition theCondition1 = GameObjectInstanceAddedToSceneCondition.unmarshall(null, theData); assertTrue(theCondition1.gameObjectProperty().isNull()); theData.put("objectUUID", "UUID"); GameScene theScene = mock(GameScene.class); GameObject theObject = mock(GameObject.class); when(theScene.findObjectByID(eq("UUID"))).thenReturn(theObject); GameObjectInstanceAddedToSceneCondition theCondition2 = GameObjectInstanceAddedToSceneCondition.unmarshall(theScene, theData); assertSame(theObject, theCondition2.gameObjectProperty().get()); }