'`Application` instances returned by
``Configuration.applications`` are hashable
and a `frozenset` of `Application` instances can be created.'

def test_applications_hashable(self):

    config = dict(version=1, applications={u'mysql-hybridcluster': {u'image': u'clusterhq/mysql:v1.0.0', u'ports': [dict(internal=3306, external=3306)], u'volume': {u'mountpoint': u'/var/lib/mysql'}}, u'site-hybridcluster': {u'image': u'clusterhq/wordpress:v1.0.0', u'ports': [dict(internal=80, external=8080)], u'links': [{u'alias': u'mysql', u'local_port': 3306, u'remote_port': 3306}], u'volume': {u'mountpoint': u'/var/www/data'}, u'environment': {u'MYSQL_PORT_3306_TCP': u'tcp://172.16.255.250:3306'}}})
    parser = FlockerConfiguration(config)
    applications = parser.applications()
    expected_applications = {u'mysql-hybridcluster': Application(name=u'mysql-hybridcluster', image=DockerImage(repository=u'clusterhq/mysql', tag=u'v1.0.0'), ports=frozenset([Port(internal_port=3306, external_port=3306)]), links=frozenset(), volume=AttachedVolume(manifestation=Manifestation(dataset=Dataset(dataset_id=dataset_id_from_name(u'mysql-hybridcluster'), metadata=pmap({u'name': u'mysql-hybridcluster'})), primary=True), mountpoint=FilePath('/var/lib/mysql'))), u'site-hybridcluster': Application(name=u'site-hybridcluster', image=DockerImage(repository=u'clusterhq/wordpress', tag=u'v1.0.0'), ports=frozenset([Port(internal_port=80, external_port=8080)]), links=frozenset([Link(local_port=3306, remote_port=3306, alias=u'mysql')]), volume=AttachedVolume(manifestation=Manifestation(dataset=Dataset(dataset_id=dataset_id_from_name(u'site-hybridcluster'), metadata=pmap({u'name': u'site-hybridcluster'})), primary=True), mountpoint=FilePath('/var/www/data')), environment=frozenset({u'MYSQL_PORT_3306_TCP': u'tcp://172.16.255.250:3306'}.items()))}
    applications_set = frozenset(applications.values())
    expected_applications_set = frozenset(expected_applications.values())
    self.assertEqual(applications_set, expected_applications_set)
