File tree Expand file tree Collapse file tree
lib/src/test/java/io/ably/lib/types Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ public void rawViaMessagePack() throws IOException {
5858 assertEquals (messageExtras , unpacked );
5959 }
6060
61+ @ Test (expected = NullPointerException .class )
62+ public void rawNullArgument () {
63+ new MessageExtras ((JsonObject )null );
64+ }
65+
6166 /**
6267 * Construct an instance with DeltaExtras and validate that the
6368 * serialised JSON is as expected. Also validate that the DeltaExtras
@@ -108,6 +113,11 @@ public void deltaViaMessagePack() throws IOException {
108113 assertEquals (expectedMessageExtrasJsonObject , unpacked .asJsonObject ());
109114 }
110115
116+ @ Test (expected = NullPointerException .class )
117+ public void deltaNullArgument () {
118+ new MessageExtras ((DeltaExtras )null );
119+ }
120+
111121 private static JsonObject deltaExtrasJsonObject (final String format , final String from ) {
112122 final JsonObject deltaExtrasJsonElement = new JsonObject ();
113123 deltaExtrasJsonElement .addProperty ("format" , format );
You can’t perform that action at this time.
0 commit comments