Rollbar { public void sendJsonPayload(String json) { try { this.configReadLock.lock(); Config config = this.config; this.configReadLock.unlock(); sendPayload(config, new Payload(json)); } catch (Exception e) { LOGGER.error("Error while sending payload to Rollbar: {}", e); } } Rollbar(Config config);   Rollbar(Config config, BodyFactory bodyFactory); static Rollbar init(Config config); void handleUncaughtErrors(); void handleUncaughtErrors(Thread thread); void configure(ConfigProvider configProvider); void configure(Config config); Config config(); void critical(Throwable error); void critical(Throwable error, String description); void critical(Throwable error, Map<String, Object> custom); void critical(String message); void critical(String message, Map<String, Object> custom); void critical(Throwable error, Map<String, Object> custom, String description); void error(Throwable error); void error(Throwable error, String description); void error(Throwable error, Map<String, Object> custom); void error(String message); void error(String message, Map<String, Object> custom); void error(Throwable error, Map<String, Object> custom, String description); void warning(Throwable error); void warning(Throwable error, String description); void warning(Throwable error, Map<String, Object> custom); void warning(String message); void warning(String message, Map<String, Object> custom); void warning(Throwable error, Map<String, Object> custom, String description); void info(Throwable error); void info(Throwable error, String description); void info(Throwable error, Map<String, Object> custom); void info(String message); void info(String message, Map<String, Object> custom); void info(Throwable error, Map<String, Object> custom, String description); void debug(Throwable error); void debug(Throwable error, String description); void debug(Throwable error, Map<String, Object> custom); void debug(String message); void debug(String message, Map<String, Object> custom); void debug(Throwable error, Map<String, Object> custom, String description); void log(Throwable error); void log(Throwable error, String description); void log(Throwable error, Map<String, Object> custom); void log(Throwable error, Map<String, Object> custom, Level level); void log(Throwable error, Level level); void log(Throwable error, String description, Level level); void log(Throwable error, Map<String, Object> custom, String description); void log(String message); void log(String message, Map<String, Object> custom); void log(String message, Level level); void log(String message, Map<String, Object> custom, Level level); void log(Throwable error, Map<String, Object> custom, String description, Level level); void log(Throwable error, Map<String, Object> custom, String description, Level level,
      boolean isUncaught); void log(ThrowableWrapper error, Map<String, Object> custom, String description,
                  Level level, boolean isUncaught); Level level(Config config, Throwable error); void close(boolean wait); void sendJsonPayload(String json);  }
@Test public void shouldSendPayloadAsJson() { Config config = withAccessToken("access_token") .sender(sender) .build(); Rollbar sut = new Rollbar(config); String json = "{\"foo\":\"bar\"}"; Payload payload = new Payload(json); sut.sendJsonPayload(json); verify(sender).send(payload); }