@Test
public void testGenerateRequestString(){

	RequestGenerator sut=spy(requestGenerator);
	when(sut.getDate()).thenReturn("2013-12-23T14:48:07-0500");
	assertEquals("<Request xmlns=\"urn:oasis:names:tc:xacml:2.0:context:schema:os\"     xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">     <Subject>      <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject\"       DataType=\"http://www.w3.org/2001/XMLSchema#string\">       <AttributeValue>123</AttributeValue>      </Attribute>      <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:subject-category:intermediary-subject\"       DataType=\"http://www.w3.org/2001/XMLSchema#string\">       <AttributeValue>456</AttributeValue>      </Attribute>\t  <Attribute AttributeId=\"gov.samhsa.consent2share.purpose-of-use-code\"       DataType=\"http://www.w3.org/2001/XMLSchema#string\">       <AttributeValue>TREAT</AttributeValue>      </Attribute>     </Subject>     <Resource>      <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:resource:resource-id\"       DataType=\"http://www.w3.org/2001/XMLSchema#string\">       <AttributeValue>789</AttributeValue>      </Attribute>     </Resource>     <Action>      <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\"       DataType=\"http://www.w3.org/2001/XMLSchema#string\">       <AttributeValue>write</AttributeValue>      </Attribute>     </Action>     <Environment>\t\t<Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:environment:current-dateTime\"       DataType=\"http://www.w3.org/2001/XMLSchema#dateTime\">       <AttributeValue>2013-12-23T14:48:07-0500</AttributeValue>      </Attribute>\t </Environment>    </Request>",sut.generateRequestString("123", "456", "TREAT", "789"));
}