run command from Java driver for MongoDB

run command from Java driver
for example:

eval command:
{
  eval: <function>,
  args: [ <arg1>, <arg2> ... ],
  nolock: <boolean>
}

map to java ==>

Document command = new Document();
command.put("eval", "function () { var result = db.test.findOne( { test_name : \"test_name0\" }); return Object.bsonsize(result); }");
command.put("args", "");
database.runCommand(command);

command list
https://docs.mongodb.com/manual/reference/command/