EscSpiUtils { public static JsonbSerializer<?>[] joinJsonbSerializerArrays(final JsonbSerializer<?>[]... serializerArrays) { final List<JsonbSerializer<?>> all = joinArrays(serializerArrays); return all.toArray(new JsonbSerializer<?>[all.size()]); } private  EscSpiUtils(); @Nullable static SerializedData serialize(@NotNull final SerializerRegistry registry, @NotNull final SerializedDataType type,
            @Nullable final Object data); @NotNull static T deserialize(@NotNull final DeserializerRegistry registry, @NotNull final SerializedData data); static EnhancedMimeType mimeType(@NotNull final SerializerRegistry registry, @NotNull final List<CommonEvent> commonEvents); static List<T> asList(final T[] array); static boolean eventsEqual(@Nullable final List<CommonEvent> eventsA, @Nullable final List<CommonEvent> eventsB); static EscMeta createEscMeta(@NotNull final SerializerRegistry registry, @NotNull final EnhancedMimeType targetContentType,
            @Nullable final CommonEvent commonEvent); static String nodeToString(final Node node); static JsonbSerializer<?>[] createEscJsonbSerializers(); static JsonbSerializer<?>[] joinJsonbSerializers(final JsonbSerializer<?>[] serializersA,
            final JsonbSerializer<?>... serializersB); static JsonbSerializer<?>[] joinJsonbSerializerArrays(final JsonbSerializer<?>[]... serializerArrays); static JsonbDeserializer<?>[] createEscJsonbDeserializers(); static JsonbDeserializer<?>[] joinJsonbDeserializers(final JsonbDeserializer<?>[] deserializersA,
            final JsonbDeserializer<?>... deserializersB); static JsonbDeserializer<?>[] joinJsonbDeserializerArrays(final JsonbDeserializer<?>[]... deserializerArrays);  }
@Test public void testJoinJsonbSerializerArrays() { final JsonbSerializer<Object> a = new JsonbSerializer<Object>() { @Override public void serialize(Object obj, JsonGenerator generator, SerializationContext ctx) { } }; final JsonbSerializer<Object> b = new JsonbSerializer<Object>() { @Override public void serialize(Object obj, JsonGenerator generator, SerializationContext ctx) { } }; final JsonbSerializer<Object> c = new JsonbSerializer<Object>() { @Override public void serialize(Object obj, JsonGenerator generator, SerializationContext ctx) { } }; final JsonbSerializer<Object> d = new JsonbSerializer<Object>() { @Override public void serialize(Object obj, JsonGenerator generator, SerializationContext ctx) { } }; assertThat(EscSpiUtils.joinJsonbSerializerArrays(new JsonbSerializer<?>[] {})).isEmpty();; assertThat(EscSpiUtils.joinJsonbSerializerArrays(new JsonbSerializer<?>[] {}, new JsonbSerializer<?>[] {a})).containsExactly(a); assertThat(EscSpiUtils.joinJsonbSerializerArrays(new JsonbSerializer<?>[] {a}, new JsonbSerializer<?>[] {b})).contains(a, b); assertThat(EscSpiUtils.joinJsonbSerializerArrays(new JsonbSerializer<?>[] {a, b}, new JsonbSerializer<?>[] {c})).contains(a, b, c); assertThat(EscSpiUtils.joinJsonbSerializerArrays(new JsonbSerializer<?>[] {a, b}, new JsonbSerializer<?>[] {c, d})).contains(a, b, c, d); assertThat(EscSpiUtils.joinJsonbSerializerArrays(new JsonbSerializer<?>[] {a}, new JsonbSerializer<?>[] {b}, new JsonbSerializer<?>[] {c})).contains(a, b, c); }