def testPolicyWithoutItems(self):
    # Test an example policy without items.
    policy = {
        'name': '_policy_name',
        'caption': '_policy_caption',
        'desc': 'This is a long policy caption. More than one sentence '
                'in a single line because it is very important.\n'
                'Second line, also important'
    }
    writer = android_policy_writer.GetWriter({})
    writer.Init()
    writer.BeginTemplate()
    writer.WritePolicy(policy)
    self.assertEquals(
        writer._resources.toxml(), '<resources>'
        '<string name="_policy_nameTitle">_policy_caption</string>'
        '<string name="_policy_nameDesc">This is a long policy caption. More '
        'than one sentence in a single line because it is very '
        'important.\nSecond line, also important'
        '</string>'
        '</resources>')