@Test public void testCompactSimpleJsonRecord() { expectedPayload = "{\"name\":\"foo\",\"age\":30,\"married\":false}"; payload = "{" + LINE_SEPARATOR + " \"name\": \"foo\"," + LINE_SEPARATOR + " \"age\": 30," + LINE_SEPARATOR + " \"married\": false" + LINE_SEPARATOR + "}"; String compactRecord = jsonRecordCompactor.compact(payload); assertThat(compactRecord).isNotNull().isEqualTo(expectedPayload); }
@Override protected String compact(final String payload) { if (payload == null) { return null; } if (payload.trim().isEmpty()) { return EMPTY_STRING; } String dataSource = "[" + payload + "]"; return doCompactPayload(dataSource); }
JsonRecordCompactor extends RecordCompactor { @Override protected String compact(final String payload) { if (payload == null) { return null; } if (payload.trim().isEmpty()) { return EMPTY_STRING; } String dataSource = "[" + payload + "]"; return doCompactPayload(dataSource); } }
JsonRecordCompactor extends RecordCompactor { @Override protected String compact(final String payload) { if (payload == null) { return null; } if (payload.trim().isEmpty()) { return EMPTY_STRING; } String dataSource = "[" + payload + "]"; return doCompactPayload(dataSource); }  }
JsonRecordCompactor extends RecordCompactor { @Override protected String compact(final String payload) { if (payload == null) { return null; } if (payload.trim().isEmpty()) { return EMPTY_STRING; } String dataSource = "[" + payload + "]"; return doCompactPayload(dataSource); }   }
JsonRecordCompactor extends RecordCompactor { @Override protected String compact(final String payload) { if (payload == null) { return null; } if (payload.trim().isEmpty()) { return EMPTY_STRING; } String dataSource = "[" + payload + "]"; return doCompactPayload(dataSource); }    }