lib/plugins/aws/invokeLocal/index.js/AwsInvokeLocal/callJavaBridge
class AwsInvokeLocal:  callJavaBridge(artifactPath, className, handlerName, input) {
    return new BbPromise((resolve) => fs.statAsync(artifactPath).then(() => {
      const java = spawn('java', [
        `-DartifactPath=${artifactPath}`,
        `-DclassName=${className}`,
        `-DhandlerName=${handlerName}`,
        '-jar',
        path.join(__dirname, 'java', 'target', 'invoke-bridge-1.0.1.jar'),
      ], { shell: true });

      this.serverless.cli.log([
        'In order to get human-readable output,',
        ' please implement "toString()" method of your "ApiGatewayResponse" object.',
      ].join(''));

      java.stdout.on('data', (buf) => this.serverless.cli.consoleLog(buf.toString()));
      java.stderr.on('data', (buf) => this.serverless.cli.consoleLog(buf.toString()));
      java.stdin.write(input);
      java.stdin.end();
      java.on('close', () => resolve());
    }).catch(() => {
      throw new Error(`Artifact ${artifactPath} doesn't exists, please compile it first.`);
    }));
  }