### Question:
GameDataManager extends AbstractMongoManager { public int getGameDataAsInt(GameDataKey key, int defaultValue) { Object obj = getValueFromDatabase(key); if ( obj == NULL ) { return defaultValue; } return (Integer)obj; } GameDataManager();   GameDataManager(String databaseName, String namespace, boolean isSafeWrite); void reload(); void reload(GameDataKey key); static GameDataManager getInstance(); double getGameDataAsDouble(GameDataKey key, double defaultValue); double[] getGameDataAsDoubleArray(GameDataKey key); double[][] getGameDataAsDoubleArrayArray(GameDataKey key); int[] getGameDataAsIntArray(GameDataKey key); int getGameDataAsInt(GameDataKey key, int defaultValue); int[][] getGameDataAsIntArrayArray(GameDataKey key); boolean getGameDataAsBoolean(GameDataKey key, boolean defaultValue); String getGameDataAsString(GameDataKey key); String getGameDataAsString(GameDataKey key, String defaultStr); String[] getGameDataAsStringArray(GameDataKey key); void overrideRuntimeValue(GameDataKey key, int value); void overrideRuntimeValue(GameDataKey key, double value); void overrideRuntimeValue(GameDataKey key, int[] values); void overrideRuntimeValue(GameDataKey key, double[] values); void setValueToDatabase(GameDataKey key, Object value); void setValueToDatabase(GameDataKey key, Object value, Object defaultValue); Map<GameDataKey, Object> getDataMap(); BseGameDataKey toBseGameDataKey(int userLevel); static void saveDefaultValue(); static void main(String ...args);  }### Answer:
@Test public void testGetGameDataAsInt() { manager.setValueToDatabase(GameDataKey.BATTLE_ATTACK_K, 15, 20); int k = manager.getGameDataAsInt(GameDataKey.BATTLE_ATTACK_K, 10); assertEquals(15, k); }