### Question:
GameDataManager extends AbstractMongoManager { public double[] getGameDataAsDoubleArray(GameDataKey key) { Object obj = getValueFromDatabase(key); if ( obj == NULL ) { return new double[0]; } else if ( obj instanceof double[] ) { return (double[])obj; } else { BasicDBList list = (BasicDBList)obj; double[] array = new double[list.size()]; for ( int i=0; i<array.length; i++ ) { array[i] = (Double)list.get(i); } return array; } } 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 testGetGameDataAsDoubleArray() { double[] array = new double[]{1.0, 2.0, 3.0}; manager.setValueToDatabase(GameDataKey.STRENGTH_STONE_RATIO, array, array); double[] actual = manager.getGameDataAsDoubleArray(GameDataKey.STRENGTH_STONE_RATIO); assertArrayEquals(array, actual, 0.01); }