public static ByteBuffer serializeSubscription(final Subscription subscription) {
        return serializeSubscription(subscription, ConsumerProtocolSubscription.HIGHEST_SUPPORTED_VERSION);
    }
@Test
    public void serializeSubscriptionShouldOrderOwnedPartitions() {
        assertEquals(
            ConsumerProtocol.serializeSubscription(
                new Subscription(Arrays.asList("foo", "bar"), null, Arrays.asList(tp1, tp2))
            ),
            ConsumerProtocol.serializeSubscription(
                new Subscription(Arrays.asList("foo", "bar"), null, Arrays.asList(tp2, tp1))
            )
        );
    }