    @Test
    public void notification_deserialize_stopsDeserializingByteArrayIfAnExceptionIsThrown() {

        try {
            when(jsonObject.getJSONArray("actionData")).thenReturn(jsonArray);
            when(jsonArray.length()).thenReturn(2);
            when(jsonArray.getInt(0)).thenReturn(101);
            when(jsonArray.getInt(1)).thenThrow(mock(JSONException.class));

            getSubject().deserialize(jsonObject);
        } catch (Throwable e) { e.printStackTrace(); }

        assertArrayEquals(new byte[]{101, 0}, getSubject().actionData);
        getSubject().actionData = null;

        try {
            when(jsonObject.getJSONArray("actionData")).thenThrow(mock(JSONException.class));
        } catch (Throwable e) { e.printStackTrace(); }

        getSubject().deserialize(jsonObject);

        assertNull(getSubject().actionData);
    }