NCMBRole extends NCMBBase { public void createRole() throws NCMBException { NCMBRoleService roleService = (NCMBRoleService) NCMB.factory(NCMB.ServiceType.ROLE); JSONObject res = roleService.createRole(getRoleName()); if (res != null) { mFields = res; } } NCMBRole();  NCMBRole(String name);   NCMBRole(JSONObject params); static NCMBQuery<NCMBRole> getQuery(); String getRoleName(); void setRoleName(String name); void addUser(List<NCMBUser> users); void addUserInBackground(List<NCMBUser> users, final DoneCallback callback); void removeUser(List<NCMBUser> users); void removeUserInBackground(List<NCMBUser> users, final DoneCallback callback); void addRole(List<NCMBRole> roles); void addRoleInBackground(List<NCMBRole> roles, final DoneCallback callback); void removeRole(List<NCMBRole> roles); void removeRoleInBackground(List<NCMBRole> roles, final DoneCallback callback); void createRole(); void createRoleInBackground(final DoneCallback callback); void fetchObject(); void fetchObjectInBackground(final FetchCallback callback); void deleteObject(); void deleteObjectInBackground(final DoneCallback callback);  }
@Test public void createRole() throws Exception { NCMBRole role = new NCMBRole("dummyRoleName"); try { role.createRole(); Assert.assertEquals("dummyObjectId", role.getObjectId()); } catch (NCMBException e) { Assert.fail(e.getMessage()); } }