@Override
    public <T> void write(T payload) {
        if (payload == null) {
            LOG.debug("Payload was null. Skipping.");
            return;
        }

        String canonicalClassName = AutoValueUtils.getCanonicalName(payload.getClass());
        write(canonicalClassName, payload);
    }
@Test
    public void writeIgnoresNull() throws Exception {
        @SuppressWarnings("deprecation")
        final DBCollection collection = mongoConnection.getDatabase().getCollection(COLLECTION_NAME);
        assertThat(collection.count()).isEqualTo(0L);

        clusterConfigService.write(null);

        assertThat(collection.count()).isEqualTo(0L);
    }