Replacing long array to set of Long in the API