### Question:
ParseACL implements Parcelable { public void setRoleWriteAccess(String roleName, boolean allowed) { setWriteAccess(KEY_ROLE_PREFIX + roleName, allowed); } ParseACL();  ParseACL(ParseACL acl);  ParseACL(ParseUser owner);   ParseACL(Parcel source, ParseParcelDecoder decoder); static void setDefaultACL(ParseACL acl, boolean withAccessForCurrentUser); void setPublicReadAccess(boolean allowed); boolean getPublicReadAccess(); void setPublicWriteAccess(boolean allowed); boolean getPublicWriteAccess(); void setReadAccess(String userId, boolean allowed); boolean getReadAccess(String userId); void setWriteAccess(String userId, boolean allowed); boolean getWriteAccess(String userId); void setReadAccess(ParseUser user, boolean allowed); boolean getReadAccess(ParseUser user); void setWriteAccess(ParseUser user, boolean allowed); boolean getWriteAccess(ParseUser user); boolean getRoleReadAccess(String roleName); void setRoleReadAccess(String roleName, boolean allowed); boolean getRoleWriteAccess(String roleName); void setRoleWriteAccess(String roleName, boolean allowed); boolean getRoleReadAccess(ParseRole role); void setRoleReadAccess(ParseRole role, boolean allowed); boolean getRoleWriteAccess(ParseRole role); void setRoleWriteAccess(ParseRole role, boolean allowed); @Override int describeContents(); @Override void writeToParcel(Parcel dest, int flags); final static Creator<ParseACL> CREATOR; }### Answer:
@Test(expected = IllegalArgumentException.class) public void testSetRoleWriteAccessWithInvalidRole() throws Exception { ParseRole role = new ParseRole(); role.setName("Player"); ParseACL acl = new ParseACL(); acl.setRoleWriteAccess(role, true); }
@Test public void testSetRoleWriteAccess() throws Exception { ParseRole role = new ParseRole(); role.setName("Player"); role.setObjectId("test"); ParseACL acl = new ParseACL(); acl.setRoleWriteAccess(role, true); assertTrue(acl.getRoleWriteAccess(role)); assertEquals(1, acl.getPermissionsById().size()); }