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