- Add a missing test about foundation to change \"frozen\" candidate pair state to \"waiting\";

- Nominee for a component are now obtained by looking in \"ValidList\" rather than \"CheckList\";
- Checks that are received before we start ours are triggered immediately when ICE state change to RUNNING;
- Always use \"BASE\" transport address as source for sending and checking STUN request (peer reflexive cases);
- Fix infinite recursivity in DelegatingDatagramSocket;
- Various formatting, typos, 80-line cut and missing javadocs fix.
This commit is contained in:
seb 2010-11-25 16:03:44 +00:00
parent 7de929986c
commit ed5856810a
24 changed files with 285 additions and 186 deletions

View File

@ -13,7 +13,7 @@ import org.ice4j.*;
* TURN address of certain transport protocol.
*
* In the original TURN specification, only UDP is supported.
* Support of TCP is detailed in draft-ietf-behave-turn-tcp-05.
* Support of TCP is detailed in draft-ietf-behave-turn-tcp-07.
*
* @author Sebastien Vincent
*/

View File

@ -375,6 +375,21 @@ public class Agent
//change state before we actually send checks so that we don't
//miss responses and hence the possibility to nominate a pair.
setState(IceProcessingState.RUNNING);
//if we have received connectivity checks before RUNNING state,
//trigger a check for those candidate pairs.
if(this.preDiscoveredPairsQueue.size() > 0)
{
Iterator<CandidatePair> it = preDiscoveredPairsQueue.iterator();
while(it.hasNext())
{
triggerCheck(it.next());
}
this.preDiscoveredPairsQueue.clear();
}
connCheckClient.startChecks();
}
}
@ -1029,7 +1044,9 @@ public class Agent
= new CandidatePair(localCandidate, remoteCandidate);
if(useCandidate)
{
triggeredPair.setUseCandidateReceived();
}
synchronized(startLock)
{
@ -1133,7 +1150,7 @@ public class Agent
// Emil: This actually applies for all cases.
/*
* Lyubomir: The connectivity checks for a CheckList are started
* elsewhere as soon as and only if the CheckList changes from fronzen
* elsewhere as soon as and only if the CheckList changes from frozen
* to unfrozen. Since CheckList#scheduleTriggeredCheck will change
* triggerPair to Waiting and will thus unfreeze its CheckList, make
* sure that the connectivity checks for the CheckList are started.
@ -1176,7 +1193,7 @@ public class Agent
*
* @see Agent#setNominationStrategy(NominationStrategy)
*/
public void nominate(CandidatePair pair)
public synchronized void nominate(CandidatePair pair)
throws IllegalStateException
{
if(! isControlling() )
@ -1185,12 +1202,14 @@ public class Agent
Component parentComponent = pair.getParentComponent();
IceMediaStream parentStream = parentComponent.getParentStream();
CheckList checkList = parentStream.getCheckList();
//CheckList checkList = parentStream.getCheckList();
//If the pair is not already nominated and if its parent component
//does not already contain a nominated pair - nominate it.
if(!pair.isNominated()
&& !checkList.containsNomineeForComponent(parentComponent))
&& !parentStream.validListContainsNomineeForComponent(
parentComponent))
/* && !checkList.containsNomineeForComponent(parentComponent)) */
{
pair.nominate();
pair.getParentComponent().getParentStream()
@ -1267,6 +1286,7 @@ public class Agent
atLeastOneListSucceeded = true;
}
}
//Once the state of each check list is Completed:
//The agent sets the state of ICE processing overall to Completed.
if(allListsEnded)

View File

@ -337,7 +337,7 @@ public abstract class Candidate
*/
public long computePriorityForType(CandidateType candidateType)
{
//According to the ICE speck we compute priority this way:
//According to the ICE spec we compute priority this way:
//priority = (2^24)*(type preference) +
// (2^8)*(local preference) +
// (2^0)*(256 - component ID)
@ -422,7 +422,6 @@ public abstract class Candidate
if(isVirtual())
return MIN_LOCAL_PREFERENCE;
InetAddress addr = getTransportAddress().getAddress();
//the following tries to reusse precedence from RFC 3484 but that's a

View File

@ -449,11 +449,11 @@ public class CandidatePair
* Indicates whether some other object is &quot;equal to&quot; to this
* Comparator. This method must obey the general contract of
* <tt>Object.equals(Object)</tt>. Additionally, this method can return
* <tt>true</tt> <i>only</i> if the specified Object is also a comparator
* and it imposes the same ordering as this comparator. Thus,
* <code>comp1.equals(comp2)</code> implies that <tt>sgn(comp1.compare(o1,
* o2))==sgn(comp2.compare(o1, o2))</tt> for every object reference
* <tt>o1</tt> and <tt>o2</tt>.<p>
* <tt>true</tt> <i>only</i> if the specified Object is also a
* comparator and it imposes the same ordering as this comparator. Thus,
* <code>comp1.equals(comp2)</code> implies that
* <tt>sgn(comp1.compare(o1,o2))==sgn(comp2.compare(o1, o2))</tt> for
* every object reference <tt>o1</tt> and <tt>o2</tt>.<p>
*
* Note that it is <i>always</i> safe <i>not</i> to override
* <tt>Object.equals(Object)</tt>. However, overriding this method may,

View File

@ -170,6 +170,7 @@ public class CheckList
|| pair.getPriority() > highestPriorityPair.getPriority())
{
highestPriorityPair = pair;
pair.setStateWaiting();
}
}
}
@ -401,19 +402,23 @@ public class CheckList
* nominated {@link CandidatePair} for the specified <tt>component</tt>
* and <tt>false</tt> otherwise.
*
* @param componennt the {@link Component} that we'd whose nominees we are
* @param component the {@link Component} that we'd whose nominees we are
* interested in.
*
* @return <tt>true</tt> if this <tt>CheckList</tt> already contains a
* nominated {@link CandidatePair} for the specified <tt>component</tt>
* and <tt>false</tt> otherwise.
* @deprecated This method takes into account only candidates in the
* checklist. In case of peer reflexives candidates nominated, they do not
* appears in checklist but in valid list.
*/
@Deprecated
public synchronized boolean containsNomineeForComponent(
Component componennt)
Component component)
{
for (CandidatePair pair : this)
{
if (pair.isNominated() && pair.getParentComponent() == componennt)
if (pair.isNominated() && pair.getParentComponent() == component)
return true;
}

View File

@ -413,11 +413,11 @@ public class Component
* Indicates whether some other object is &quot;equal to&quot; this
* Comparator. This method must obey the general contract of
* <tt>Object.equals(Object)</tt>. Additionally, this method can return
* <tt>true</tt> <i>only</i> if the specified Object is also a comparator
* and it imposes the same ordering as this comparator. Thus,
* <code>comp1.equals(comp2)</code> implies that <tt>sgn(comp1.compare(o1,
* o2))==sgn(comp2.compare(o1, o2))</tt> for every object reference
* <tt>o1</tt> and <tt>o2</tt>.<p>
* <tt>true</tt> <i>only</i> if the specified Object is also a
* comparator and it imposes the same ordering as this comparator. Thus,
* <code>comp1.equals(comp2)</code> implies that
* <tt>sgn(comp1.compare(o1, o2))==sgn(comp2.compare(o1, o2))</tt> for
* every object reference <tt>o1</tt> and <tt>o2</tt>.<p>
*
* Note that it is <i>always</i> safe <i>not</i> to override
* <tt>Object.equals(Object)</tt>. However, overriding this method may,

View File

@ -164,12 +164,15 @@ class ConnectivityCheckClient
try
{
TransportAddress localAddr = localCandidate.getBase().
getTransportAddress();
tran
= stunStack.sendRequest(
request,
candidatePair
.getRemoteCandidate().getTransportAddress(),
localCandidate.getTransportAddress(),
localAddr,
this,
tran);
if(logger.isLoggable(Level.FINEST))
@ -402,7 +405,8 @@ class ConnectivityCheckClient
CheckList parentCheckList = parentStream.getCheckList();
for(CandidatePair pair : parentCheckList)
if (pair.getState() == CandidatePairState.FROZEN)
if ((pair.getState() == CandidatePairState.FROZEN) &&
(checkedPair.getFoundation().equals(pair.getFoundation())))
pair.setStateWaiting();
// The agent examines the check list for all other streams in turn
@ -484,9 +488,10 @@ class ConnectivityCheckClient
{
CandidatePair pair = ((CandidatePair)evt.getTransactionID()
.getApplicationData());
TransportAddress localAddr = pair.getLocalCandidate().getBase().
getTransportAddress();
boolean sym = pair.getLocalCandidate().getTransportAddress()
.equals(evt.getLocalAddress())
boolean sym = localAddr.equals(evt.getLocalAddress())
&& pair.getRemoteCandidate().getTransportAddress()
.equals(evt.getRemoteAddress());
@ -640,7 +645,8 @@ class ConnectivityCheckClient
}
catch (InterruptedException e)
{
logger.log(Level.FINER, "PaceMake got interrupted", e);
logger.log(Level.FINER, "PaceMaker got interrupted",
e);
}
if (!running)

View File

@ -176,7 +176,7 @@ class ConnectivityCheckServer
}
/**
* Resolves a role conflicts by either sendinf a <tt>487 Role Conflict</tt>
* Resolves a role conflicts by either sending a <tt>487 Role Conflict</tt>
* response or by changing this server's parent agent role. The method
* returns <tt>true</tt> if the role conflict is silently resolved and
* processing can continue. It returns <tt>false</tt> if we had to reply

View File

@ -493,7 +493,6 @@ public class IceMediaStream
return null;
}
/**
* Returns the {@link CandidatePair} with the specified remote and local
* addresses or <tt>null</tt> if neither of the {@link CheckList}s in this
@ -602,6 +601,34 @@ public class IceMediaStream
return false;
}
/**
* Returns <tt>true</tt> if this stream's <tt>validList</tt> contains a
* pair that is nominated for the specified <tt>Component</tt> and
* <tt>false</tt> otherwise.
*
* @param component the <tt>Component</tt> we'd like to search our
* validList for.
*
* @return <tt>true</tt> if this stream's <tt>validList</tt> contains a
* pair that is nominated for the specified <tt>Component</tt> and
* <tt>false</tt> otherwise.
*/
protected boolean validListContainsNomineeForComponent(Component component)
{
synchronized(validList)
{
for(CandidatePair pair : validList)
{
if (pair.isNominated() && pair.getParentComponent() ==
component)
{
return true;
}
}
}
return false;
}
/**
* Returns <tt>true</tt> if this stream's valid list contains at least
* one {@link CandidatePair} for each {@link Component} of the stream and
@ -744,7 +771,7 @@ public class IceMediaStream
}
PropertyChangeEvent evt = new PropertyChangeEvent(
source, PROPERTY_PAIR_VALIDATED, oldValue, newValue);
source, propertyName, oldValue, newValue);
for(PropertyChangeListener l : listenersCopy)
{

View File

@ -485,7 +485,7 @@ public class DelegatingDatagramSocket
@Override
public boolean isClosed()
{
return (delegate == null) ? super.isClosed() : this.isClosed();
return (delegate == null) ? super.isClosed() : delegate.isClosed();
}
/**
@ -498,7 +498,8 @@ public class DelegatingDatagramSocket
@Override
public boolean isConnected()
{
return (delegate == null) ? super.isConnected() : this.isConnected();
return (delegate == null) ? super.isConnected() :
delegate.isConnected();
}
/**

View File

@ -15,11 +15,11 @@ import org.ice4j.message.*;
/**
* Implements a <tt>DatagramPacketFilter</tt> which accepts
* <tt>DatagramPacket</tt>s which represent TURN messages defined in
* draft-ietf-behave-turn-16 "Traversal Using Relays around NAT (TURN): Relay
* Extensions to Session Traversal Utilities for NAT (STUN)" and which are part
* of the communication with a specific TURN server.
* <tt>TurnDatagramPacketFilter</tt> does not accept TURN ChannelData messages
* because they require knowledge of the value of the "Channel Number" field.
* RFC 5766 "Traversal Using Relays around NAT (TURN): Relay Extensions to
* Session Traversal Utilities for NAT (STUN)" and which are part of the
* communication with a specific TURN server. <tt>TurnDatagramPacketFilter</tt>
* does not accept TURN ChannelData messages because they require knowledge of
* the value of the "Channel Number" field.
*
* @author Lubomir Marinov
*/

View File

@ -320,10 +320,10 @@ public class AddressAttributeTest extends TestCase {
assertEquals(
"AddressAttribute.decode() did not properly decode the port field.",
msgFixture.ADDRESS_ATTRIBUTE_PORT, addressAttribute.getPort());
MsgFixture.ADDRESS_ATTRIBUTE_PORT, addressAttribute.getPort());
assertTrue(
"AddressAttribute.decode() did not properly decode the address field.",
Arrays.equals( msgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
Arrays.equals( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
addressAttribute.getAddressBytes()));
@ -342,10 +342,10 @@ public class AddressAttributeTest extends TestCase {
assertEquals("decode() failed for an IPv6 Addr's port.",
msgFixture.ADDRESS_ATTRIBUTE_PORT,
MsgFixture.ADDRESS_ATTRIBUTE_PORT,
addressAttribute.getPort());
assertTrue("AddressAttribute.decode() failed for an IPv6 address.",
Arrays.equals( msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
Arrays.equals( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
addressAttribute.getAddressBytes()));
@ -354,7 +354,7 @@ public class AddressAttributeTest extends TestCase {
/**
* Test whether attributes are properly encoded.
*
* @throws StunException java.lang.Exception if we fail
* @throws Exception java.lang.Exception if we fail
*/
public void testEncode()
throws Exception
@ -362,8 +362,8 @@ public class AddressAttributeTest extends TestCase {
byte[] expectedReturn = msgFixture.mappedAddress;
addressAttribute.setAddress(
new TransportAddress(msgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
msgFixture.ADDRESS_ATTRIBUTE_PORT,
new TransportAddress(MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
MsgFixture.ADDRESS_ATTRIBUTE_PORT,
Transport.UDP));
byte[] actualReturn = addressAttribute.encode();
@ -375,7 +375,7 @@ public class AddressAttributeTest extends TestCase {
/**
* Test whether attributes are properly encoded.
*
* @throws StunException java.lang.Exception if we fail
* @throws Exception java.lang.Exception if we fail
*/
public void testEncodev6()
throws Exception
@ -383,8 +383,8 @@ public class AddressAttributeTest extends TestCase {
byte[] expectedReturn = msgFixture.mappedAddressv6;
addressAttribute.setAddress(
new TransportAddress(msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
msgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP));
new TransportAddress(MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
MsgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP));
byte[] actualReturn = addressAttribute.encode();
assertTrue("An AddressAttribute did not properly encode an IPv6 addr.",
@ -396,7 +396,7 @@ public class AddressAttributeTest extends TestCase {
* Tests the equals method against a null, a different and an identical
* object.
*
* @throws StunException java.lang.Exception if we fail
* @throws Exception java.lang.Exception if we fail
*/
public void testEquals()
throws Exception
@ -412,13 +412,13 @@ public class AddressAttributeTest extends TestCase {
//difference test
target = new MappedAddressAttribute();
char port = (char)(msgFixture.ADDRESS_ATTRIBUTE_PORT + 1 );
char port = (char)(MsgFixture.ADDRESS_ATTRIBUTE_PORT + 1 );
target.setAddress( new TransportAddress(
msgFixture.ADDRESS_ATTRIBUTE_ADDRESS, port, Transport.UDP));
MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS, port, Transport.UDP));
addressAttribute.setAddress( new TransportAddress(
msgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
msgFixture.ADDRESS_ATTRIBUTE_PORT,
MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
MsgFixture.ADDRESS_ATTRIBUTE_PORT,
Transport.UDP));
expectedReturn = false;
@ -429,8 +429,8 @@ public class AddressAttributeTest extends TestCase {
//equality test
target.setAddress( new TransportAddress(
msgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
msgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP ));
MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
MsgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP ));
expectedReturn = true;
actualReturn = addressAttribute.equals(target);
@ -440,12 +440,12 @@ public class AddressAttributeTest extends TestCase {
//ipv6 equality test
target.setAddress( new TransportAddress(
msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
msgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP));
MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
MsgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP));
addressAttribute.setAddress(new TransportAddress(
msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
msgFixture.ADDRESS_ATTRIBUTE_PORT,
MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
MsgFixture.ADDRESS_ATTRIBUTE_PORT,
Transport.UDP));
expectedReturn = true;
@ -457,7 +457,7 @@ public class AddressAttributeTest extends TestCase {
/**
* Tests whether data length is properly calculated.
*
* @throws StunException java.lang.Exception if we fail
* @throws Exception java.lang.Exception if we fail
*/
public void testGetDataLength()
throws Exception
@ -465,8 +465,8 @@ public class AddressAttributeTest extends TestCase {
char expectedReturn = 8;//1-padding + 1-family + 2-port + 4-address
addressAttribute.setAddress( new TransportAddress(
msgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
msgFixture.ADDRESS_ATTRIBUTE_PORT,
MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
MsgFixture.ADDRESS_ATTRIBUTE_PORT,
Transport.UDP));
char actualReturn = addressAttribute.getDataLength();
@ -476,8 +476,8 @@ public class AddressAttributeTest extends TestCase {
expectedReturn = 20;//1-padding + 1-family + 2-port + 16-address
addressAttribute.setAddress( new TransportAddress(
msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
msgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP));
MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
MsgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP));
actualReturn = addressAttribute.getDataLength();
@ -487,14 +487,16 @@ public class AddressAttributeTest extends TestCase {
/**
* Tests that the address family is always 1.
*
* @throws Exception java.lang.Exception if we fail
*/
public void testGetFamily()
throws Exception
{
byte expectedReturn = 1;
addressAttribute.setAddress(new TransportAddress(
msgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
msgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP));
MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
MsgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP));
byte actualReturn = addressAttribute.getFamily();
assertEquals("Address family was not 1 for an IPv4",
expectedReturn, actualReturn);
@ -502,8 +504,8 @@ public class AddressAttributeTest extends TestCase {
//ipv6
expectedReturn = 2;
addressAttribute.setAddress(new TransportAddress(
msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
msgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP));
MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_V6,
MsgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP));
actualReturn = addressAttribute.getFamily();
assertEquals("Address family was not 2 for an IPv6 address",
expectedReturn, actualReturn);

View File

@ -14,15 +14,18 @@ import junit.framework.*;
* We have already tested individual decode methods, so our job here
* is to verify that that AttributeDecoder.decode distributes the right way.
*/
public class AttributeDecoderTest extends TestCase {
public class AttributeDecoderTest extends TestCase
{
private MsgFixture msgFixture;
private byte[] expectedAttributeValue = null;
public AttributeDecoderTest(String name) {
public AttributeDecoderTest(String name)
{
super(name);
}
protected void setUp() throws Exception {
protected void setUp() throws Exception
{
super.setUp();
msgFixture = new MsgFixture();
@ -38,7 +41,8 @@ public class AttributeDecoderTest extends TestCase {
msgFixture.setUp();
}
protected void tearDown() throws Exception {
protected void tearDown() throws Exception
{
msgFixture.tearDown();
msgFixture = null;

View File

@ -12,15 +12,23 @@ import java.util.Arrays;
import org.ice4j.*;
public class ChangeRequestAttributeTest extends TestCase {
/**
* Tests the CHANGE-REQUEST attribute class.
*
* @author Emil Ivov
*/
public class ChangeRequestAttributeTest extends TestCase
{
private ChangeRequestAttribute changeRequestAttribute = null;
private MsgFixture binMessagesFixture;
public ChangeRequestAttributeTest(String name) {
public ChangeRequestAttributeTest(String name)
{
super(name);
}
protected void setUp() throws Exception {
protected void setUp() throws Exception
{
super.setUp();
changeRequestAttribute = new ChangeRequestAttribute();
binMessagesFixture = new MsgFixture();
@ -28,7 +36,8 @@ public class ChangeRequestAttributeTest extends TestCase {
binMessagesFixture.setUp();
}
protected void tearDown() throws Exception {
protected void tearDown() throws Exception
{
changeRequestAttribute = null;
binMessagesFixture.tearDown();
@ -39,7 +48,8 @@ public class ChangeRequestAttributeTest extends TestCase {
/**
* Test whether the constructed object has the proper type.
*/
public void testChangeRequestAttribute() {
public void testChangeRequestAttribute()
{
changeRequestAttribute = new ChangeRequestAttribute();
assertEquals(
@ -64,11 +74,11 @@ public class ChangeRequestAttributeTest extends TestCase {
changeRequestAttribute.decodeAttributeBody(attributeValue, offset, length);
assertEquals("decodeAttributeBody() did not properly decode the changeIpFlag",
binMessagesFixture.CHANGE_IP_FLAG_1,
MsgFixture.CHANGE_IP_FLAG_1,
changeRequestAttribute.getChangeIpFlag()
);
assertEquals("decodeAttributeBody() did not properly decode the changePortFlag",
binMessagesFixture.CHANGE_PORT_FLAG_1,
MsgFixture.CHANGE_PORT_FLAG_1,
changeRequestAttribute.getChangePortFlag()
);
@ -76,11 +86,11 @@ public class ChangeRequestAttributeTest extends TestCase {
attributeValue = binMessagesFixture.chngReqTestValue2;
changeRequestAttribute.decodeAttributeBody(attributeValue, offset, length);
assertEquals("decodeAttributeBody() did not properly decode the changeIpFlag",
binMessagesFixture.CHANGE_IP_FLAG_2,
MsgFixture.CHANGE_IP_FLAG_2,
changeRequestAttribute.getChangeIpFlag()
);
assertEquals("decodeAttributeBody() did not properly decode the changePortFlag",
binMessagesFixture.CHANGE_PORT_FLAG_2,
MsgFixture.CHANGE_PORT_FLAG_2,
changeRequestAttribute.getChangePortFlag()
);
@ -91,13 +101,14 @@ public class ChangeRequestAttributeTest extends TestCase {
/**
* Create sample objects and test whether they encode properly.
*/
public void testEncode() {
public void testEncode()
{
byte[] expectedReturn = binMessagesFixture.chngReqTestValue1;
changeRequestAttribute = new ChangeRequestAttribute();
changeRequestAttribute.setChangeIpFlag(binMessagesFixture.CHANGE_IP_FLAG_1);
changeRequestAttribute.setChangePortFlag(binMessagesFixture.CHANGE_PORT_FLAG_1);
changeRequestAttribute.setChangeIpFlag(MsgFixture.CHANGE_IP_FLAG_1);
changeRequestAttribute.setChangePortFlag(MsgFixture.CHANGE_PORT_FLAG_1);
byte[] actualReturn = changeRequestAttribute.encode();
assertTrue("Object did not encode properly.",
@ -107,8 +118,8 @@ public class ChangeRequestAttributeTest extends TestCase {
expectedReturn = binMessagesFixture.chngReqTestValue2;
changeRequestAttribute = new ChangeRequestAttribute();
changeRequestAttribute.setChangeIpFlag(binMessagesFixture.CHANGE_IP_FLAG_2);
changeRequestAttribute.setChangePortFlag(binMessagesFixture.CHANGE_PORT_FLAG_2);
changeRequestAttribute.setChangeIpFlag(MsgFixture.CHANGE_IP_FLAG_2);
changeRequestAttribute.setChangePortFlag(MsgFixture.CHANGE_PORT_FLAG_2);
actualReturn = changeRequestAttribute.encode();
assertTrue("Object did not encode properly.",
@ -121,7 +132,8 @@ public class ChangeRequestAttributeTest extends TestCase {
* Tests the equals method against a null, a different and an identical
* object.
*/
public void testEquals() {
public void testEquals()
{
ChangeRequestAttribute target = null;
boolean expectedReturn = false;
@ -161,7 +173,8 @@ public class ChangeRequestAttributeTest extends TestCase {
/**
* Test whether the returned value is always 4.
*/
public void testGetDataLength() {
public void testGetDataLength()
{
char expectedReturn = 4; // constant 4 bytes of data
char actualReturn = changeRequestAttribute.getDataLength();
assertEquals("data length returned an invalid value",
@ -171,7 +184,8 @@ public class ChangeRequestAttributeTest extends TestCase {
/**
* Test whether we get a relevant name.
*/
public void testGetName() {
public void testGetName()
{
String expectedReturn = "CHANGE-REQUEST";
String actualReturn = changeRequestAttribute.getName();
assertEquals("Invalid name", expectedReturn, actualReturn);

View File

@ -66,15 +66,15 @@ public class ErrorCodeAttributeTest extends TestCase {
errorCodeAttribute.decodeAttributeBody(attributeValue, offset, length);
assertEquals("Error Class was not correctly decoded",
msgFixture.ERROR_CLASS,
MsgFixture.ERROR_CLASS,
errorCodeAttribute.getErrorClass());
assertEquals("Error Number was not correctly decoded",
msgFixture.ERROR_NUMBER,
MsgFixture.ERROR_NUMBER,
errorCodeAttribute.getErrorNumber());
assertEquals("Reason phrase was not correctly decoded",
msgFixture.REASON_PHRASE.trim(),
MsgFixture.REASON_PHRASE.trim(),
errorCodeAttribute.getReasonPhrase().trim());
}
@ -90,10 +90,10 @@ public class ErrorCodeAttributeTest extends TestCase {
{
byte[] expectedReturn = msgFixture.errCodeTestValue;
errorCodeAttribute.setErrorClass(msgFixture.ERROR_CLASS);
errorCodeAttribute.setErrorNumber(msgFixture.ERROR_NUMBER);
errorCodeAttribute.setErrorClass(MsgFixture.ERROR_CLASS);
errorCodeAttribute.setErrorNumber(MsgFixture.ERROR_NUMBER);
errorCodeAttribute.setReasonPhrase(msgFixture.REASON_PHRASE);
errorCodeAttribute.setReasonPhrase(MsgFixture.REASON_PHRASE);
byte[] actualReturn = errorCodeAttribute.encode();
@ -122,11 +122,11 @@ public class ErrorCodeAttributeTest extends TestCase {
target = new ErrorCodeAttribute();
expectedReturn = false;
target.setErrorClass(msgFixture.ERROR_CLASS);
target.setErrorNumber(msgFixture.ERROR_NUMBER);
target.setErrorClass(MsgFixture.ERROR_CLASS);
target.setErrorNumber(MsgFixture.ERROR_NUMBER);
errorCodeAttribute.setErrorClass((byte)(msgFixture.ERROR_CLASS+1));
errorCodeAttribute.setErrorNumber((byte)(msgFixture.ERROR_NUMBER+1));
errorCodeAttribute.setErrorClass((byte)(MsgFixture.ERROR_CLASS+1));
errorCodeAttribute.setErrorNumber((byte)(MsgFixture.ERROR_NUMBER+1));
actualReturn = errorCodeAttribute.equals(target);
assertEquals("equals() failed against a not equal target.",
@ -137,11 +137,11 @@ public class ErrorCodeAttributeTest extends TestCase {
errorCodeAttribute = new ErrorCodeAttribute();
expectedReturn = true;
target.setErrorClass(msgFixture.ERROR_CLASS);
target.setErrorNumber(msgFixture.ERROR_NUMBER);
target.setErrorClass(MsgFixture.ERROR_CLASS);
target.setErrorNumber(MsgFixture.ERROR_NUMBER);
errorCodeAttribute.setErrorClass(msgFixture.ERROR_CLASS);
errorCodeAttribute.setErrorNumber(msgFixture.ERROR_NUMBER);
errorCodeAttribute.setErrorClass(MsgFixture.ERROR_CLASS);
errorCodeAttribute.setErrorNumber(MsgFixture.ERROR_NUMBER);
actualReturn = errorCodeAttribute.equals(target);
assertEquals("equals() failed against a not equal target.",
@ -158,12 +158,12 @@ public class ErrorCodeAttributeTest extends TestCase {
public void testGetDataLength()
throws StunException
{
int expectedReturn = msgFixture.REASON_PHRASE.getBytes().length
int expectedReturn = MsgFixture.REASON_PHRASE.getBytes().length
+ 4; //error code specific header
errorCodeAttribute.setErrorClass(msgFixture.ERROR_CLASS);
errorCodeAttribute.setErrorNumber(msgFixture.ERROR_NUMBER);
errorCodeAttribute.setReasonPhrase(msgFixture.REASON_PHRASE);
errorCodeAttribute.setErrorClass(MsgFixture.ERROR_CLASS);
errorCodeAttribute.setErrorNumber(MsgFixture.ERROR_NUMBER);
errorCodeAttribute.setReasonPhrase(MsgFixture.REASON_PHRASE);
char actualReturn = errorCodeAttribute.getDataLength();
assertEquals("data length1", expectedReturn, actualReturn);
@ -177,11 +177,11 @@ public class ErrorCodeAttributeTest extends TestCase {
public void testGetErrorCode()
throws StunException
{
char expectedReturn = (char)(100*msgFixture.ERROR_CLASS
+ msgFixture.ERROR_NUMBER);
char expectedReturn = (char)(100*MsgFixture.ERROR_CLASS
+ MsgFixture.ERROR_NUMBER);
errorCodeAttribute.setErrorClass(msgFixture.ERROR_CLASS);
errorCodeAttribute.setErrorNumber(msgFixture.ERROR_NUMBER);
errorCodeAttribute.setErrorClass(MsgFixture.ERROR_CLASS);
errorCodeAttribute.setErrorNumber(MsgFixture.ERROR_NUMBER);
char actualReturn = errorCodeAttribute.getErrorCode();
assertEquals("return value", expectedReturn, actualReturn);
@ -203,14 +203,14 @@ public class ErrorCodeAttributeTest extends TestCase {
* @throws StunException java.lang.Exception if we fail
*/
public void testSetErrorCode() throws StunException {
char errorCode = (char)(msgFixture.ERROR_CLASS*100 + msgFixture.ERROR_NUMBER);
char errorCode = (char)(MsgFixture.ERROR_CLASS*100 + MsgFixture.ERROR_NUMBER);
errorCodeAttribute.setErrorCode(errorCode);
assertEquals("An error class was not properly set after decoding an error code.",
(int)msgFixture.ERROR_CLASS,
(int)MsgFixture.ERROR_CLASS,
(int)errorCodeAttribute.getErrorClass());
assertEquals("An error number was not properly set after decoding an error code.",
(int)msgFixture.ERROR_NUMBER,
(int)MsgFixture.ERROR_NUMBER,
(int)errorCodeAttribute.getErrorNumber());
}

View File

@ -47,8 +47,6 @@ public class OptionalAttributeAttributeTest extends TestCase
super.tearDown();
}
/**
* Test whether sample binary arrays are correctly decoded.
* @throws StunException if anything goes wrong.

View File

@ -26,7 +26,8 @@ public class SoftwareAttributeTest extends TestCase
(byte)(SoftwareAttribute.SOFTWARE>>8),
(byte)(SoftwareAttribute.SOFTWARE & 0x00FF),
0, (byte)softwareValue.length(),
't', 'u', 'r', 'n', 's', 'e', 'r','v', 'e', 'r', '.', 'o', 'r', 'g', 0x00, 0x00};
't', 'u', 'r', 'n', 's', 'e', 'r','v', 'e', 'r', '.', 'o', 'r', 'g',
0x00, 0x00};
protected void setUp() throws Exception
{

View File

@ -12,15 +12,23 @@ import java.util.*;
import org.ice4j.*;
public class UnknownAttributesAttributeTest extends TestCase {
/**
* Tests the UNKNOWN attribute class.
*
* @author Emil Ivov
*/
public class UnknownAttributesAttributeTest extends TestCase
{
private UnknownAttributesAttribute unknownAttributesAttribute = null;
private MsgFixture binMessagesFixture;
public UnknownAttributesAttributeTest(String name) {
public UnknownAttributesAttributeTest(String name)
{
super(name);
}
protected void setUp() throws Exception {
protected void setUp() throws Exception
{
super.setUp();
unknownAttributesAttribute = new UnknownAttributesAttribute();
binMessagesFixture = new MsgFixture();
@ -28,7 +36,8 @@ public class UnknownAttributesAttributeTest extends TestCase {
binMessagesFixture.setUp();
}
protected void tearDown() throws Exception {
protected void tearDown() throws Exception
{
unknownAttributesAttribute = null;
binMessagesFixture.tearDown();
@ -40,7 +49,8 @@ public class UnknownAttributesAttributeTest extends TestCase {
* Verify the the constructed object has the correct (UNKNOWN-ATTRIBUTES)
* type.
*/
public void testUnknownAttributesAttribute() {
public void testUnknownAttributesAttribute()
{
unknownAttributesAttribute = new UnknownAttributesAttribute();
assertEquals("UnknownAttributesAttribute() did not properly set the "
@ -55,7 +65,8 @@ public class UnknownAttributesAttributeTest extends TestCase {
* and that a second addition of the same id would not augment the attribute
* count.
*/
public void testAddAttributeID() {
public void testAddAttributeID()
{
char attributeID = 0x22; // unknown attribute id
unknownAttributesAttribute.addAttributeID(attributeID);
@ -85,7 +96,8 @@ public class UnknownAttributesAttributeTest extends TestCase {
* Tests whether a sample binary array is properly decoded.
* @throws StunException if anything goes wrong.
*/
public void testDecodeAttributeBody() throws StunException {
public void testDecodeAttributeBody() throws StunException
{
//a copy of the array in the fixture:
byte[] attributeValue = binMessagesFixture.unknownAttsDecodeTestValue;
@ -126,7 +138,8 @@ public class UnknownAttributesAttributeTest extends TestCase {
* Creates a new UnknownAttributesAttribute encodes it and assert equality
* with binMessagesFixture.unknownAttsEncodeExpectedResult.
*/
public void testEncode() {
public void testEncode()
{
byte[] expectedReturn = binMessagesFixture.unknownAttsEncodeExpectedResult;
unknownAttributesAttribute.addAttributeID(
@ -145,7 +158,8 @@ public class UnknownAttributesAttributeTest extends TestCase {
* Tests the equals method against a null, a different and an identical
* object.
*/
public void testEquals() {
public void testEquals()
{
UnknownAttributesAttribute target = new UnknownAttributesAttribute();
boolean expectedReturn = false;
@ -173,7 +187,8 @@ public class UnknownAttributesAttributeTest extends TestCase {
* Tests that getAttribute() return the correct attribute id, preserving
* entry order.
*/
public void testGetAttribute() {
public void testGetAttribute()
{
char expectedId1 = 20;
char expectedId2 = 21;
@ -194,7 +209,8 @@ public class UnknownAttributesAttributeTest extends TestCase {
* Add some attributes and test whether their number is properly calculated.
* Tests duplicate id handling as well.
*/
public void testGetAttributeCount() {
public void testGetAttributeCount()
{
int expectedReturn = 5;
unknownAttributesAttribute.addAttributeID((char)21);
@ -213,7 +229,8 @@ public class UnknownAttributesAttributeTest extends TestCase {
* Same as testGetAttributeID, only attribute attributes are extracted
* through the getAttributes()'s iterator.
*/
public void testGetAttributes() {
public void testGetAttributes()
{
char expectedId1 = 20;
char expectedId2 = 21;
@ -239,7 +256,8 @@ public class UnknownAttributesAttributeTest extends TestCase {
* Test is first performed for an odd number of attributes and then again
* (after adding another attribute id). Both results should be the same.
*/
public void testGetDataLength() {
public void testGetDataLength()
{
char expectedReturn = 8;
unknownAttributesAttribute.addAttributeID((char)20);
@ -261,7 +279,8 @@ public class UnknownAttributesAttributeTest extends TestCase {
/**
* Tests whether getName returns a relevant name.
*/
public void testGetName() {
public void testGetName()
{
String expectedReturn = "UNKNOWN-ATTRIBUTES";
String actualReturn = unknownAttributesAttribute.getName();
assertEquals("getName() return", expectedReturn, actualReturn);

View File

@ -11,31 +11,33 @@ import junit.framework.*;
import org.ice4j.*;
import org.ice4j.attribute.*;
public class MessageFactoryTest extends TestCase {
private MessageFactory messageFactory = null;
public class MessageFactoryTest extends TestCase
{
private MsgFixture msgFixture;
public MessageFactoryTest(String name) {
public MessageFactoryTest(String name)
{
super(name);
}
protected void setUp() throws Exception {
protected void setUp() throws Exception
{
super.setUp();
messageFactory = new MessageFactory();
msgFixture = new MsgFixture();
msgFixture.setUp();
}
protected void tearDown() throws Exception {
messageFactory = null;
protected void tearDown() throws Exception
{
msgFixture.tearDown();
msgFixture = null;
super.tearDown();
}
public void testCreateBindingErrorResponse() throws StunException {
public void testCreateBindingErrorResponse() throws StunException
{
char errorCode = 400;
Response expectedReturn = new Response();
@ -46,11 +48,12 @@ public class MessageFactoryTest extends TestCase {
expectedReturn.addAttribute(errorCodeAtt);
Message actualReturn
= messageFactory.createBindingErrorResponse(errorCode);
= MessageFactory.createBindingErrorResponse(errorCode);
assertEquals("return value", expectedReturn, actualReturn);
}
public void testCreateBindingErrorResponse1() throws StunException {
public void testCreateBindingErrorResponse1() throws StunException
{
char errorCode = 400;
String reasonPhrase = "Bad Request";
@ -61,7 +64,7 @@ public class MessageFactoryTest extends TestCase {
.createErrorCodeAttribute(errorCode, reasonPhrase);
expectedReturn.addAttribute(errorCodeAtt);
Message actualReturn = messageFactory
Message actualReturn = MessageFactory
.createBindingErrorResponse(errorCode, reasonPhrase);
assertEquals("Failed to create an error code attribute.",
expectedReturn, actualReturn);
@ -92,7 +95,7 @@ public class MessageFactoryTest extends TestCase {
expectedReturn.addAttribute(unknownAtts);
//create the same message using the factory
Message actualReturn = messageFactory
Message actualReturn = MessageFactory
.createBindingErrorResponseUnknownAttributes(unknownAttributes);
//compare
assertEquals("return value", expectedReturn, actualReturn);
@ -121,7 +124,7 @@ public class MessageFactoryTest extends TestCase {
}
expectedReturn.addAttribute(unknownAtts);
Message actualReturn = messageFactory
Message actualReturn = MessageFactory
.createBindingErrorResponseUnknownAttributes(
reasonPhrase, unknownAttributes);
assertEquals("return value", expectedReturn, actualReturn);
@ -137,7 +140,7 @@ public class MessageFactoryTest extends TestCase {
msgFixture.CHANGE_IP_FLAG_1, msgFixture.CHANGE_PORT_FLAG_1);
bindingRequest.addAttribute(changeRequest);
*/
Request actualReturn = messageFactory.createBindingRequest();
Request actualReturn = MessageFactory.createBindingRequest();
assertEquals("return value", expectedReturn, actualReturn);
}
@ -148,37 +151,37 @@ public class MessageFactoryTest extends TestCase {
bindingResponse.setMessageType(Message.BINDING_SUCCESS_RESPONSE);
Attribute mappedAddress = AttributeFactory.createMappedAddressAttribute(
new TransportAddress( msgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
msgFixture.ADDRESS_ATTRIBUTE_PORT,
new TransportAddress( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
MsgFixture.ADDRESS_ATTRIBUTE_PORT,
Transport.UDP));
bindingResponse.addAttribute(mappedAddress);
Attribute sourceAddress = AttributeFactory.createSourceAddressAttribute(
new TransportAddress( msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_2,
msgFixture.ADDRESS_ATTRIBUTE_PORT_2,
new TransportAddress( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_2,
MsgFixture.ADDRESS_ATTRIBUTE_PORT_2,
Transport.UDP));
bindingResponse.addAttribute(sourceAddress);
Attribute changedAddress = AttributeFactory.
createChangedAddressAttribute(
new TransportAddress( msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_3,
msgFixture.ADDRESS_ATTRIBUTE_PORT_3,
new TransportAddress( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_3,
MsgFixture.ADDRESS_ATTRIBUTE_PORT_3,
Transport.UDP));
bindingResponse.addAttribute(changedAddress);
Message expectedReturn = bindingResponse;
Message actualReturn = messageFactory.create3482BindingResponse(
new TransportAddress( msgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
msgFixture.ADDRESS_ATTRIBUTE_PORT,
Message actualReturn = MessageFactory.create3482BindingResponse(
new TransportAddress( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
MsgFixture.ADDRESS_ATTRIBUTE_PORT,
Transport.UDP),
new TransportAddress( msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_2,
msgFixture.ADDRESS_ATTRIBUTE_PORT_2,
new TransportAddress( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_2,
MsgFixture.ADDRESS_ATTRIBUTE_PORT_2,
Transport.UDP),
new TransportAddress( msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_3,
msgFixture.ADDRESS_ATTRIBUTE_PORT_3,
new TransportAddress( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_3,
MsgFixture.ADDRESS_ATTRIBUTE_PORT_3,
Transport.UDP));
assertEquals("return value", expectedReturn, actualReturn);
}

View File

@ -14,7 +14,8 @@ import org.ice4j.*;
import org.ice4j.attribute.*;
import org.ice4j.stack.*;
public class MessageTest extends TestCase {
public class MessageTest extends TestCase
{
private Message bindingRequest = null;
private Message bindingResponse = null;
@ -31,7 +32,8 @@ public class MessageTest extends TestCase {
*/
private StunStack stunStack;
protected void setUp() throws Exception {
protected void setUp() throws Exception
{
super.setUp();
msgFixture = new MsgFixture();
@ -44,9 +46,9 @@ public class MessageTest extends TestCase {
bindingRequest.setMessageType(Message.BINDING_REQUEST);
changeRequest = AttributeFactory.createChangeRequestAttribute(
msgFixture.CHANGE_IP_FLAG_1, msgFixture.CHANGE_PORT_FLAG_1);
MsgFixture.CHANGE_IP_FLAG_1, MsgFixture.CHANGE_PORT_FLAG_1);
bindingRequest.addAttribute(changeRequest);
bindingRequest.setTransactionID(msgFixture.TRANSACTION_ID);
bindingRequest.setTransactionID(MsgFixture.TRANSACTION_ID);
//binding response
bindingResponse = new Response();
@ -54,26 +56,26 @@ public class MessageTest extends TestCase {
mappedAddress = AttributeFactory.createMappedAddressAttribute(
new TransportAddress(
msgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
msgFixture.ADDRESS_ATTRIBUTE_PORT,
MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS,
MsgFixture.ADDRESS_ATTRIBUTE_PORT,
Transport.UDP));
bindingResponse.addAttribute(mappedAddress);
sourceAddress = AttributeFactory.createSourceAddressAttribute(
new TransportAddress(
msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_2,
msgFixture.ADDRESS_ATTRIBUTE_PORT_2,
MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_2,
MsgFixture.ADDRESS_ATTRIBUTE_PORT_2,
Transport.UDP));
bindingResponse.addAttribute(sourceAddress);
changedAddress = AttributeFactory.createChangedAddressAttribute(
new TransportAddress( msgFixture.ADDRESS_ATTRIBUTE_ADDRESS_3,
msgFixture.ADDRESS_ATTRIBUTE_PORT_3, Transport.UDP));
new TransportAddress( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_3,
MsgFixture.ADDRESS_ATTRIBUTE_PORT_3, Transport.UDP));
bindingResponse.addAttribute(changedAddress);
bindingResponse.setTransactionID(msgFixture.TRANSACTION_ID);
bindingResponse.setTransactionID(MsgFixture.TRANSACTION_ID);
}
protected void tearDown() throws Exception
@ -101,8 +103,8 @@ public class MessageTest extends TestCase {
*
* @throws StunException java.lang.Exception if we fail
*/
public void testAddAndGetAttribute() throws StunException {
public void testAddAndGetAttribute() throws StunException
{
Response message = new Response();
message.setMessageType(Message.BINDING_SUCCESS_RESPONSE);
@ -157,7 +159,7 @@ public class MessageTest extends TestCase {
* Encodes a bindingRequest and then a binding response and checks whether
* they match the corresponding binary arrays.
*
* @throws StunException java.lang.Exception if we fail
* @throws Exception java.lang.Exception if we fail
*/
public void testDecode()
throws Exception
@ -238,7 +240,8 @@ public class MessageTest extends TestCase {
/**
* Tests whether attributes are properly counted
*/
public void testGetAttributeCount() {
public void testGetAttributeCount()
{
int expectedReturn = 1;
int actualReturn = bindingRequest.getAttributeCount();
assertEquals("getAttributeCount failed for a bindingRequest",
@ -252,7 +255,8 @@ public class MessageTest extends TestCase {
/**
* Test whether attributes are properly removed.
*/
public void testRemoveAttribute() {
public void testRemoveAttribute()
{
bindingRequest.removeAttribute(changeRequest.getAttributeType());

View File

@ -230,7 +230,6 @@ public class StunAddressDiscovererTest
assertEquals(
"The StunAddressDiscoverer failed for a no-udp environment.",
expectedReturn, actualReturn);
}
/**

View File

@ -27,7 +27,8 @@ import org.ice4j.stack.*;
* <p>Company: Net Research Team, Louis Pasteur University</p>
* @author Emil Ivov
*/
public class StunAddressDiscovererTest_v4v6 extends TestCase {
public class StunAddressDiscovererTest_v4v6 extends TestCase
{
private NetworkConfigurationDiscoveryProcess stunAddressDiscoverer_v6
= null;
private NetworkConfigurationDiscoveryProcess stunAddressDiscoverer_v4

View File

@ -22,7 +22,8 @@ import org.ice4j.stack.*;
* <p>Company: Net Research Team, Louis Pasteur University</p>
* @author Emil Ivov
*/
public class StunAddressDiscovererTest_v6 extends TestCase {
public class StunAddressDiscovererTest_v6 extends TestCase
{
private NetworkConfigurationDiscoveryProcess stunAddressDiscoverer = null;
private TransportAddress discovererAddress
= new TransportAddress("::1", 16555, Transport.UDP);
@ -290,9 +291,4 @@ public class StunAddressDiscovererTest_v6 extends TestCase {
expectedReturn, actualReturn);
}
}