@@ -26,6 +26,7 @@ class MetadataSuite extends SparkFunSuite {
2626 assert(meta.## !== 0 )
2727 assert(meta.getString(" key" ) === " value" )
2828 assert(meta.contains(" key" ))
29+ assert(meta === Metadata .fromJson(meta.json))
2930 intercept[NoSuchElementException ](meta.getString(" no_such_key" ))
3031 intercept[ClassCastException ](meta.getBoolean(" key" ))
3132 }
@@ -36,6 +37,7 @@ class MetadataSuite extends SparkFunSuite {
3637 assert(meta.## !== 0 )
3738 assert(meta.getLong(" key" ) === 12 )
3839 assert(meta.contains(" key" ))
40+ assert(meta === Metadata .fromJson(meta.json))
3941 intercept[NoSuchElementException ](meta.getLong(" no_such_key" ))
4042 intercept[ClassCastException ](meta.getBoolean(" key" ))
4143 }
@@ -46,6 +48,7 @@ class MetadataSuite extends SparkFunSuite {
4648 assert(meta.## !== 0 )
4749 assert(meta.getDouble(" key" ) === 12 )
4850 assert(meta.contains(" key" ))
51+ assert(meta === Metadata .fromJson(meta.json))
4952 intercept[NoSuchElementException ](meta.getDouble(" no_such_key" ))
5053 intercept[ClassCastException ](meta.getBoolean(" key" ))
5154 }
@@ -56,6 +59,7 @@ class MetadataSuite extends SparkFunSuite {
5659 assert(meta.## !== 0 )
5760 assert(meta.getBoolean(" key" ) === true )
5861 assert(meta.contains(" key" ))
62+ assert(meta === Metadata .fromJson(meta.json))
5963 intercept[NoSuchElementException ](meta.getBoolean(" no_such_key" ))
6064 intercept[ClassCastException ](meta.getString(" key" ))
6165 }
@@ -69,6 +73,7 @@ class MetadataSuite extends SparkFunSuite {
6973 assert(meta.getLong(" key" ) === 0 )
7074 assert(meta.getBoolean(" key" ) === false )
7175 assert(meta.contains(" key" ))
76+ assert(meta === Metadata .fromJson(meta.json))
7277 intercept[NoSuchElementException ](meta.getLong(" no_such_key" ))
7378 }
7479}
0 commit comments