/*
* use case: conversion from one IServiceTypeID to another (provider A -> provider B)
*/
public void testServiceTypeIDWithServiceTypeID() {
final IServiceTypeID aServiceTypeID = createIDFromStringWithEx("_service._ecf._foo._bar._tcp.ecf.eclipse.org._IANA");
final IServiceTypeID stid = createIDFromServiceTypeID(aServiceTypeID);
// this is the only differences
assertNotSame(aServiceTypeID.getInternal(), stid.getInternal());
// members should be the same
assertTrue(aServiceTypeID.getNamingAuthority().equalsIgnoreCase(stid.getNamingAuthority()));
assertTrue(Arrays.equals(aServiceTypeID.getServices(), stid.getServices()));
assertTrue(Arrays.equals(aServiceTypeID.getScopes(), stid.getScopes()));
assertTrue(Arrays.equals(aServiceTypeID.getProtocols(), stid.getProtocols()));
// logically they should be the same
assertTrue(aServiceTypeID.hashCode() == stid.hashCode());
assertEquals(aServiceTypeID, stid);
assertEquals(stid, aServiceTypeID);
// should be possible to create a new instance from the string representation of the other
createFromAnother(aServiceTypeID, stid);