public function updateResourceGroup($groupName, array $resources)
{
try {
$this->getGroupsCollection()->updateOne(['name' => $groupName], ['$set' => ['resources' => $resources]]);
// Remove from local cache
unset($this->groups[$groupName]);
} catch (MongoException $e) {
throw new DatabaseException('Could not update resource group in database', 500, $e);
}
}