Renames Message.addAttribute method to putAttribute.

This commit is contained in:
paweldomas 2014-05-27 08:48:13 +00:00
parent fa9ccc92ef
commit ec427382e9
8 changed files with 85 additions and 85 deletions

View File

@ -196,12 +196,12 @@ class ConnectivityCheckClient
localCandidate.computePriorityForType(
CandidateType.PEER_REFLEXIVE_CANDIDATE));
request.addAttribute(priority);
request.putAttribute(priority);
//controlling controlled
if (parentAgent.isControlling())
{
request.addAttribute(
request.putAttribute(
AttributeFactory.createIceControllingAttribute(
parentAgent.getTieBreaker()));
@ -212,13 +212,13 @@ class ConnectivityCheckClient
logger.fine(
"Add USE-CANDIDATE in check for: "
+ candidatePair.toShortString());
request.addAttribute(
request.putAttribute(
AttributeFactory.createUseCandidateAttribute());
}
}
else
{
request.addAttribute(
request.putAttribute(
AttributeFactory.createIceControlledAttribute(
parentAgent.getTieBreaker()));
}
@ -235,7 +235,7 @@ class ConnectivityCheckClient
UsernameAttribute unameAttr
= AttributeFactory.createUsernameAttribute(localUserName);
request.addAttribute(unameAttr);
request.putAttribute(unameAttr);
// TODO Also implement SASL prepare
MessageIntegrityAttribute msgIntegrity
@ -247,7 +247,7 @@ class ConnectivityCheckClient
// remote key of the current stream, that why we pass the media
// name.
msgIntegrity.setMedia(media);
request.addAttribute(msgIntegrity);
request.putAttribute(msgIntegrity);
TransactionID tran = TransactionID.createNewTransactionID();

View File

@ -134,12 +134,12 @@ class ConnectivityCheckServer
*/
Attribute usernameAttribute =
AttributeFactory.createUsernameAttribute(uname.getUsername());
response.addAttribute(usernameAttribute);
response.putAttribute(usernameAttribute);
Attribute messageIntegrityAttribute =
AttributeFactory.createMessageIntegrityAttribute(
new String(uname.getUsername()));
response.addAttribute(messageIntegrityAttribute);
response.putAttribute(messageIntegrityAttribute);
try
{

View File

@ -199,10 +199,10 @@ public class StunCandidateHarvest
if (shortTermCredentialUsername != null)
{
request.addAttribute(
request.putAttribute(
AttributeFactory.createUsernameAttribute(
shortTermCredentialUsername));
request.addAttribute(
request.putAttribute(
AttributeFactory.createMessageIntegrityAttribute(
shortTermCredentialUsername));
return true;

View File

@ -538,15 +538,15 @@ public abstract class Message
}
/**
* Adds the specified attribute to this message. If an attribute with that
* Puts the specified attribute into this message. If an attribute with that
* name was already added, it would be replaced.
*
* @param attribute the attribute to add to this message.
* @param attribute the attribute to put into this message.
*
* @throws IllegalArgumentException if the message cannot contain
* such an attribute.
*/
public void addAttribute(Attribute attribute)
public void putAttribute(Attribute attribute)
throws IllegalArgumentException
{
if (getAttributePresentity(attribute.getAttributeType()) == N_A)
@ -1004,14 +1004,14 @@ public abstract class Message
if (getAttribute(Attribute.SOFTWARE) == null
&& software != null && software.length() > 0)
{
addAttribute(AttributeFactory
putAttribute(AttributeFactory
.createSoftwareAttribute(software.getBytes()));
}
//re-add MESSAGE-INTEGRITY if there was one.
if (msgIntAttr != null)
{
addAttribute(msgIntAttr);
putAttribute(msgIntAttr);
}
//add FINGERPRINT if there was one or if user told us to add it
@ -1024,7 +1024,7 @@ public abstract class Message
if (fingerprint != null)
{
addAttribute(fingerprint);
putAttribute(fingerprint);
}
}
@ -1128,7 +1128,7 @@ public abstract class Message
performAttributeSpecificActions(att, binMessage,
originalOffset, offset);
message.addAttribute(att);
message.putAttribute(att);
offset += att.getDataLength() + Attribute.HEADER_LENGTH;
//now also skip any potential padding that might have come with

View File

@ -54,7 +54,7 @@ public class MessageFactory
* //add a change request attribute ChangeRequestAttribute attribute =
* AttributeFactory.createChangeRequestAttribute();
*
* try { bindingRequest.addAttribute(attribute); } catch (StunException
* try { bindingRequest.putAttribute(attribute); } catch (StunException
* ex) { //shouldn't happen throw new
* RuntimeException("Failed to add a change request "
* +"attribute to a binding request!"); }
@ -78,7 +78,7 @@ public class MessageFactory
PriorityAttribute attribute = AttributeFactory
.createPriorityAttribute(priority);
bindingRequest.addAttribute(attribute);
bindingRequest.putAttribute(attribute);
return bindingRequest;
}
@ -104,18 +104,18 @@ public class MessageFactory
PriorityAttribute attribute = AttributeFactory
.createPriorityAttribute(priority);
bindingRequest.addAttribute(attribute);
bindingRequest.putAttribute(attribute);
if (controlling)
{
IceControllingAttribute iceControllingAttribute = AttributeFactory
.createIceControllingAttribute(tieBreaker);
bindingRequest.addAttribute(iceControllingAttribute);
bindingRequest.putAttribute(iceControllingAttribute);
} else
{
IceControlledAttribute iceControlledAttribute = AttributeFactory
.createIceControlledAttribute(tieBreaker);
bindingRequest.addAttribute(iceControlledAttribute);
bindingRequest.putAttribute(iceControlledAttribute);
}
return bindingRequest;
@ -163,16 +163,16 @@ public class MessageFactory
changedAddressAttribute = AttributeFactory
.createChangedAddressAttribute(changedAddress);
bindingResponse.addAttribute(mappedAddressAttribute);
bindingResponse.putAttribute(mappedAddressAttribute);
// the changed address and source address attribute were removed in
// RFC 5389 so we should be prepared to go without them.
if (sourceAddressAttribute != null)
bindingResponse.addAttribute(sourceAddressAttribute);
bindingResponse.putAttribute(sourceAddressAttribute);
if (changedAddressAttribute != null)
bindingResponse.addAttribute(changedAddressAttribute);
bindingResponse.putAttribute(changedAddressAttribute);
return bindingResponse;
}
@ -201,7 +201,7 @@ public class MessageFactory
.createXorMappedAddressAttribute(mappedAddress,
request.getTransactionID());
bindingResponse.addAttribute(xorMappedAddressAttribute);
bindingResponse.putAttribute(xorMappedAddressAttribute);
return bindingResponse;
}
@ -233,7 +233,7 @@ public class MessageFactory
.createErrorCodeAttribute(errorCode,
reasonPhrase);
bindingErrorResponse.addAttribute(errorCodeAttribute);
bindingErrorResponse.putAttribute(errorCodeAttribute);
if (unknownAttributes != null)
{
@ -245,7 +245,7 @@ public class MessageFactory
.addAttributeID(unknownAttributes[i]);
}
bindingErrorResponse
.addAttribute(unknownAttributesAttribute);
.putAttribute(unknownAttributesAttribute);
}
return bindingErrorResponse;
@ -375,14 +375,14 @@ public class MessageFactory
throw new StunException("Protocol not valid!");
// REQUESTED-TRANSPORT
allocateRequest.addAttribute(
allocateRequest.putAttribute(
AttributeFactory.createRequestedTransportAttribute(
protocol));
// EVEN-PORT
if (rFlag)
{
allocateRequest.addAttribute(
allocateRequest.putAttribute(
AttributeFactory.createEvenPortAttribute(rFlag));
}
}
@ -457,7 +457,7 @@ public class MessageFactory
.createXorMappedAddressAttribute(
mappedAddress, request.getTransactionID());
allocationSuccessResponse.addAttribute(xorMappedAddressAttribute);
allocationSuccessResponse.putAttribute(xorMappedAddressAttribute);
//xor relayed address
XorRelayedAddressAttribute xorRelayedAddressAttribute
@ -465,13 +465,13 @@ public class MessageFactory
.createXorRelayedAddressAttribute(relayedAddress,
request.getTransactionID());
allocationSuccessResponse.addAttribute(xorRelayedAddressAttribute);
allocationSuccessResponse.putAttribute(xorRelayedAddressAttribute);
//lifetime
LifetimeAttribute lifetimeAttribute
= AttributeFactory.createLifetimeAttribute(lifetime);
allocationSuccessResponse.addAttribute(lifetimeAttribute);
allocationSuccessResponse.putAttribute(lifetimeAttribute);
if(token != null)
{
@ -480,7 +480,7 @@ public class MessageFactory
= AttributeFactory
.createReservationTokenAttribute(token);
allocationSuccessResponse.addAttribute(reservationTokenAttribute);
allocationSuccessResponse.putAttribute(reservationTokenAttribute);
}
return allocationSuccessResponse;
@ -525,7 +525,7 @@ public class MessageFactory
.createErrorCodeAttribute(errorCode,
reasonPhrase);
allocationErrorResponse.addAttribute(errorCodeAttribute);
allocationErrorResponse.putAttribute(errorCodeAttribute);
return allocationErrorResponse;
}
@ -547,8 +547,8 @@ public class MessageFactory
allocateRequest.setMessageType(Message.ALLOCATE_REQUEST);
// first attribute is MAGIC-COOKIE
allocateRequest.addAttribute(magicCookieAttr);
allocateRequest.addAttribute(usernameAttr);
allocateRequest.putAttribute(magicCookieAttr);
allocateRequest.putAttribute(usernameAttr);
return allocateRequest;
}
@ -589,9 +589,9 @@ public class MessageFactory
NonceAttribute nonceAttribute
= AttributeFactory.createNonceAttribute(nonce);
request.addAttribute(usernameAttribute);
request.addAttribute(realmAttribute);
request.addAttribute(nonceAttribute);
request.putAttribute(usernameAttribute);
request.putAttribute(realmAttribute);
request.putAttribute(nonceAttribute);
// MESSAGE-INTEGRITY
MessageIntegrityAttribute messageIntegrityAttribute;
@ -611,7 +611,7 @@ public class MessageFactory
{
throw new StunException("username", ueex);
}
request.addAttribute(messageIntegrityAttribute);
request.putAttribute(messageIntegrityAttribute);
}
/**
@ -657,7 +657,7 @@ public class MessageFactory
/* add a LIFETIME attribute */
LifetimeAttribute lifetimeReq = AttributeFactory
.createLifetimeAttribute(lifetime);
refreshRequest.addAttribute(lifetimeReq);
refreshRequest.putAttribute(lifetimeReq);
} catch (IllegalArgumentException ex)
{
logger.log(Level.FINE, "Failed to set message type.", ex);
@ -685,7 +685,7 @@ public class MessageFactory
= AttributeFactory
.createLifetimeAttribute(lifetime);
refreshSuccessResponse.addAttribute(lifetimeAttribute);
refreshSuccessResponse.putAttribute(lifetimeAttribute);
}
catch(IllegalArgumentException ex)
{
@ -726,7 +726,7 @@ public class MessageFactory
.createErrorCodeAttribute(
errorCode, reasonPhrase);
refreshErrorResponse.addAttribute(errorCodeAttribute);
refreshErrorResponse.putAttribute(errorCodeAttribute);
}
catch(IllegalArgumentException ex)
{
@ -757,14 +757,14 @@ public class MessageFactory
// add a CHANNEL-NUMBER attribute
ChannelNumberAttribute channelNumberAttribute = AttributeFactory
.createChannelNumberAttribute(channelNumber);
channelBindRequest.addAttribute(channelNumberAttribute);
channelBindRequest.putAttribute(channelNumberAttribute);
// add a XOR-PEER-ADDRESS
XorPeerAddressAttribute peerAddressAttribute = AttributeFactory
.createXorPeerAddressAttribute(peerAddress,
tranID);
channelBindRequest.addAttribute(peerAddressAttribute);
channelBindRequest.putAttribute(peerAddressAttribute);
} catch (IllegalArgumentException ex)
{
logger.log(Level.FINE, "Failed to set message type.", ex);
@ -817,7 +817,7 @@ public class MessageFactory
= AttributeFactory
.createErrorCodeAttribute(errorCode,reasonPhrase);
channelBindErrorResponse.addAttribute(errorCodeAttribute);
channelBindErrorResponse.putAttribute(errorCodeAttribute);
return channelBindErrorResponse;
}
@ -849,7 +849,7 @@ public class MessageFactory
// Expected to not happen because we are the creators.
logger.log(Level.FINE, "Failed to set message type.", iaex);
}
createPermissionRequest.addAttribute(
createPermissionRequest.putAttribute(
AttributeFactory.createXorPeerAddressAttribute(
peerAddress,
transactionID));
@ -903,7 +903,7 @@ public class MessageFactory
.createErrorCodeAttribute(
errorCode,reasonPhrase);
createPermissionErrorResponse.addAttribute(errorCodeAttribute);
createPermissionErrorResponse.putAttribute(errorCodeAttribute);
return createPermissionErrorResponse;
}
@ -929,14 +929,14 @@ public class MessageFactory
/* add XOR-PEER-ADDRESS attribute */
XorPeerAddressAttribute peerAddressAttribute = AttributeFactory
.createXorPeerAddressAttribute(peerAddress, tranID);
sendIndication.addAttribute(peerAddressAttribute);
sendIndication.putAttribute(peerAddressAttribute);
/* add DATA if data */
if (data != null && data.length > 0)
{
DataAttribute dataAttribute = AttributeFactory
.createDataAttribute(data);
sendIndication.addAttribute(dataAttribute);
sendIndication.putAttribute(dataAttribute);
}
} catch (IllegalArgumentException ex)
{
@ -963,24 +963,24 @@ public class MessageFactory
sendRequest.setMessageType(Message.SEND_REQUEST);
/* add MAGIC-COOKIE attribute */
sendRequest.addAttribute(
sendRequest.putAttribute(
AttributeFactory.createMagicCookieAttribute());
/* add USERNAME attribute */
sendRequest.addAttribute(
sendRequest.putAttribute(
AttributeFactory.createUsernameAttribute(username));
/* add DESTINATION-ADDRESS attribute */
DestinationAddressAttribute peerAddressAttribute = AttributeFactory
.createDestinationAddressAttribute(peerAddress);
sendRequest.addAttribute(peerAddressAttribute);
sendRequest.putAttribute(peerAddressAttribute);
/* add DATA if data */
if (data != null && data.length > 0)
{
DataAttribute dataAttribute = AttributeFactory
.createDataAttributeWithoutPadding(data);
sendRequest.addAttribute(dataAttribute);
sendRequest.putAttribute(dataAttribute);
}
}
catch (IllegalArgumentException ex)
@ -1054,7 +1054,7 @@ public class MessageFactory
.createXorPeerAddressAttribute(
peerAddress, request.getTransactionID());
connectRequest.addAttribute(xorPeerAddressAttribute);
connectRequest.putAttribute(xorPeerAddressAttribute);
return connectRequest;
}
@ -1082,7 +1082,7 @@ public class MessageFactory
= AttributeFactory
.createConnectionIdAttribute(connectionIdValue);
connectSuccessResponse.addAttribute(connectionIdAttribute);
connectSuccessResponse.putAttribute(connectionIdAttribute);
return connectSuccessResponse;
}
@ -1124,7 +1124,7 @@ public class MessageFactory
= AttributeFactory
.createErrorCodeAttribute(errorCode, reasonPhrase);
connectionErrorResponse.addAttribute(errorCodeAttribute);
connectionErrorResponse.putAttribute(errorCodeAttribute);
return connectionErrorResponse;
}
@ -1152,7 +1152,7 @@ public class MessageFactory
= AttributeFactory
.createConnectionIdAttribute(connectionIdValue);
connectionBindRequest.addAttribute(connectionIdAttribute);
connectionBindRequest.putAttribute(connectionIdAttribute);
return connectionBindRequest;
}
@ -1216,7 +1216,7 @@ public class MessageFactory
= AttributeFactory
.createErrorCodeAttribute(errorCode, reasonPhrase);
connectionBindErrorResponse.addAttribute(errorCodeAttribute);
connectionBindErrorResponse.putAttribute(errorCodeAttribute);
return connectionBindErrorResponse;
}
@ -1247,7 +1247,7 @@ public class MessageFactory
= AttributeFactory
.createConnectionIdAttribute(connectionIdValue);
connectionAttemptIndication.addAttribute(connectionIdAttribute);
connectionAttemptIndication.putAttribute(connectionIdAttribute);
//xor peer address attribute
XorPeerAddressAttribute xorPeerAddressAttribute
@ -1255,7 +1255,7 @@ public class MessageFactory
.createXorPeerAddressAttribute(peerAddress,
connectionAttemptIndication.getTransactionID());
connectionAttemptIndication.addAttribute(xorPeerAddressAttribute);
connectionAttemptIndication.putAttribute(xorPeerAddressAttribute);
return connectionAttemptIndication;
}

View File

@ -321,7 +321,7 @@ public class NetworkConfigurationDiscoveryProcess
= AttributeFactory.createChangeRequestAttribute();
changeRequest.setChangeIpFlag(false);
changeRequest.setChangePortFlag(false);
request.addAttribute(changeRequest);
request.putAttribute(changeRequest);
StunMessageEvent evt = null;
try
@ -369,7 +369,7 @@ public class NetworkConfigurationDiscoveryProcess
ChangeRequestAttribute changeRequest = AttributeFactory.createChangeRequestAttribute();
changeRequest.setChangeIpFlag(true);
changeRequest.setChangePortFlag(true);
request.addAttribute(changeRequest);
request.putAttribute(changeRequest);
StunMessageEvent evt
= requestSender.sendRequestAndWaitForResponse(request,
@ -403,7 +403,7 @@ public class NetworkConfigurationDiscoveryProcess
ChangeRequestAttribute changeRequest = AttributeFactory.createChangeRequestAttribute();
changeRequest.setChangeIpFlag(false);
changeRequest.setChangePortFlag(true);
request.addAttribute(changeRequest);
request.putAttribute(changeRequest);
StunMessageEvent evt = requestSender.sendRequestAndWaitForResponse(
request, serverAddress);

View File

@ -45,7 +45,7 @@ public class MessageFactoryTest extends TestCase
Attribute errorCodeAtt
= AttributeFactory.createErrorCodeAttribute(errorCode);
expectedReturn.addAttribute(errorCodeAtt);
expectedReturn.putAttribute(errorCodeAtt);
Message actualReturn
= MessageFactory.createBindingErrorResponse(errorCode);
@ -62,7 +62,7 @@ public class MessageFactoryTest extends TestCase
Attribute errorCodeAtt = AttributeFactory
.createErrorCodeAttribute(errorCode, reasonPhrase);
expectedReturn.addAttribute(errorCodeAtt);
expectedReturn.putAttribute(errorCodeAtt);
Message actualReturn = MessageFactory
.createBindingErrorResponse(errorCode, reasonPhrase);
@ -84,7 +84,7 @@ public class MessageFactoryTest extends TestCase
.createErrorCodeAttribute(errorCode);
((ErrorCodeAttribute)errorCodeAtt).setReasonPhrase(
ErrorCodeAttribute.getDefaultReasonPhrase(errorCode));
expectedReturn.addAttribute(errorCodeAtt);
expectedReturn.putAttribute(errorCodeAtt);
UnknownAttributesAttribute unknownAtts =
AttributeFactory.createUnknownAttributesAttribute();
@ -92,7 +92,7 @@ public class MessageFactoryTest extends TestCase
for (int i = 0; i < unknownAttributes.length; i++) {
unknownAtts.addAttributeID(unknownAttributes[i]);
}
expectedReturn.addAttribute(unknownAtts);
expectedReturn.putAttribute(unknownAtts);
//create the same message using the factory
Message actualReturn = MessageFactory
@ -113,7 +113,7 @@ public class MessageFactoryTest extends TestCase
Attribute errorCodeAtt = AttributeFactory.createErrorCodeAttribute(
errorCode, reasonPhrase);
expectedReturn.addAttribute(errorCodeAtt);
expectedReturn.putAttribute(errorCodeAtt);
UnknownAttributesAttribute unknownAtts =
AttributeFactory.createUnknownAttributesAttribute();
@ -122,7 +122,7 @@ public class MessageFactoryTest extends TestCase
{
unknownAtts.addAttributeID(unknownAttributes[i]);
}
expectedReturn.addAttribute(unknownAtts);
expectedReturn.putAttribute(unknownAtts);
Message actualReturn = MessageFactory
.createBindingErrorResponseUnknownAttributes(
@ -138,7 +138,7 @@ public class MessageFactoryTest extends TestCase
/*
Attribute changeRequest = AttributeFactory.createChangeRequestAttribute(
msgFixture.CHANGE_IP_FLAG_1, msgFixture.CHANGE_PORT_FLAG_1);
bindingRequest.addAttribute(changeRequest);
bindingRequest.putAttribute(changeRequest);
*/
Request actualReturn = MessageFactory.createBindingRequest();
assertEquals("return value", expectedReturn, actualReturn);
@ -155,14 +155,14 @@ public class MessageFactoryTest extends TestCase
MsgFixture.ADDRESS_ATTRIBUTE_PORT,
Transport.UDP));
bindingResponse.addAttribute(mappedAddress);
bindingResponse.putAttribute(mappedAddress);
Attribute sourceAddress = AttributeFactory.createSourceAddressAttribute(
new TransportAddress( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_2,
MsgFixture.ADDRESS_ATTRIBUTE_PORT_2,
Transport.UDP));
bindingResponse.addAttribute(sourceAddress);
bindingResponse.putAttribute(sourceAddress);
Attribute changedAddress = AttributeFactory.
createChangedAddressAttribute(
@ -170,7 +170,7 @@ public class MessageFactoryTest extends TestCase
MsgFixture.ADDRESS_ATTRIBUTE_PORT_3,
Transport.UDP));
bindingResponse.addAttribute(changedAddress);
bindingResponse.putAttribute(changedAddress);
Message expectedReturn = bindingResponse;
Message actualReturn = MessageFactory.create3489BindingResponse(

View File

@ -47,7 +47,7 @@ public class MessageTest extends TestCase
changeRequest = AttributeFactory.createChangeRequestAttribute(
MsgFixture.CHANGE_IP_FLAG_1, MsgFixture.CHANGE_PORT_FLAG_1);
bindingRequest.addAttribute(changeRequest);
bindingRequest.putAttribute(changeRequest);
bindingRequest.setTransactionID(MsgFixture.TRANSACTION_ID);
//binding response
@ -60,7 +60,7 @@ public class MessageTest extends TestCase
MsgFixture.ADDRESS_ATTRIBUTE_PORT,
Transport.UDP));
bindingResponse.addAttribute(mappedAddress);
bindingResponse.putAttribute(mappedAddress);
sourceAddress = AttributeFactory.createSourceAddressAttribute(
new TransportAddress(
@ -68,13 +68,13 @@ public class MessageTest extends TestCase
MsgFixture.ADDRESS_ATTRIBUTE_PORT_2,
Transport.UDP));
bindingResponse.addAttribute(sourceAddress);
bindingResponse.putAttribute(sourceAddress);
changedAddress = AttributeFactory.createChangedAddressAttribute(
new TransportAddress( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_3,
MsgFixture.ADDRESS_ATTRIBUTE_PORT_3, Transport.UDP));
bindingResponse.addAttribute(changedAddress);
bindingResponse.putAttribute(changedAddress);
bindingResponse.setTransactionID(MsgFixture.TRANSACTION_ID);
}
@ -108,7 +108,7 @@ public class MessageTest extends TestCase
Response message = new Response();
message.setMessageType(Message.BINDING_SUCCESS_RESPONSE);
message.addAttribute(mappedAddress);
message.putAttribute(mappedAddress);
Attribute getResult = null;
@ -120,7 +120,7 @@ public class MessageTest extends TestCase
getResult);
//do it again
message.addAttribute(sourceAddress);
message.putAttribute(sourceAddress);
getResult = message.getAttribute(sourceAddress.getAttributeType());
@ -220,7 +220,7 @@ public class MessageTest extends TestCase
//this.bindingRequest
Request binReqTarget = new Request();
binReqTarget.setMessageType(Message.BINDING_REQUEST);
binReqTarget.addAttribute(changeRequest);
binReqTarget.putAttribute(changeRequest);
actualReturn = bindingRequest.equals(binReqTarget);
assertEquals("Equals failed against an equal target",
expectedReturn, actualReturn);
@ -229,9 +229,9 @@ public class MessageTest extends TestCase
//this.bindingRequest
Response binResTarget = new Response();
binResTarget.setMessageType(Message.BINDING_SUCCESS_RESPONSE);
binResTarget.addAttribute(mappedAddress);
binResTarget.addAttribute(sourceAddress);
binResTarget.addAttribute(changedAddress);
binResTarget.putAttribute(mappedAddress);
binResTarget.putAttribute(sourceAddress);
binResTarget.putAttribute(changedAddress);
actualReturn = bindingResponse.equals(binResTarget);
assertEquals("Equals failed against a different target",
expectedReturn, actualReturn);