@Test public void testUnmarshall() throws Exception { GameObjectInstanceRemovedFromSceneConditionUnmarshaller theUnmarshaller = new GameObjectInstanceRemovedFromSceneConditionUnmarshaller(); 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 = theUnmarshaller.unmarshall(theScene, theData); assertTrue(theCondition.gameObjectProperty().isNull()); theData.put("objectUUID", "UUID"); GameObjectInstanceRemovedFromSceneCondition theCondition2 = theUnmarshaller.unmarshall(theScene, theData); assertSame(theObject, theCondition2.gameObjectProperty().get()); verify(theScene, times(1)).findObjectByID(eq("UUID")); }
@Override public GameObjectInstanceRemovedFromSceneCondition unmarshall(GameScene aGameScene, Map<String, Object> aSerializedData) { return GameObjectInstanceRemovedFromSceneCondition.unmarshall(aGameScene, aSerializedData); }
GameObjectInstanceRemovedFromSceneConditionUnmarshaller implements ConditionUnmarshaller { @Override public GameObjectInstanceRemovedFromSceneCondition unmarshall(GameScene aGameScene, Map<String, Object> aSerializedData) { return GameObjectInstanceRemovedFromSceneCondition.unmarshall(aGameScene, aSerializedData); } }
GameObjectInstanceRemovedFromSceneConditionUnmarshaller implements ConditionUnmarshaller { @Override public GameObjectInstanceRemovedFromSceneCondition unmarshall(GameScene aGameScene, Map<String, Object> aSerializedData) { return GameObjectInstanceRemovedFromSceneCondition.unmarshall(aGameScene, aSerializedData); }  }
GameObjectInstanceRemovedFromSceneConditionUnmarshaller implements ConditionUnmarshaller { @Override public GameObjectInstanceRemovedFromSceneCondition unmarshall(GameScene aGameScene, Map<String, Object> aSerializedData) { return GameObjectInstanceRemovedFromSceneCondition.unmarshall(aGameScene, aSerializedData); }  @Override String getTypeKey(); @Override GameObjectInstanceRemovedFromSceneCondition unmarshall(GameScene aGameScene, Map<String, Object> aSerializedData); }
GameObjectInstanceRemovedFromSceneConditionUnmarshaller implements ConditionUnmarshaller { @Override public GameObjectInstanceRemovedFromSceneCondition unmarshall(GameScene aGameScene, Map<String, Object> aSerializedData) { return GameObjectInstanceRemovedFromSceneCondition.unmarshall(aGameScene, aSerializedData); }  @Override String getTypeKey(); @Override GameObjectInstanceRemovedFromSceneCondition unmarshall(GameScene aGameScene, Map<String, Object> aSerializedData);  }