Buggy code:
public class ResourceDescriptorRepositoryTest extends ResourceDescriptorSupport { private static Log logger = LogFactory . getLog ( ResourceDescriptorRepositoryTest . class ) ; private EntityManagerFactory emFactory = null ; private EntityManager em = null ; private Connection connection = null ; @ Override protected void setUp ( ) throws Exception { } @ Override protected void tearDown ( ) throws Exception { } @ Test public void testBasicPersistence ( ) { } @ Test public void testVirtualResourcePersistence ( ) { } @ Test public void testResourceWithNetworkCapabilitiesPersistence ( ) { try { em . getTransaction ( ) . begin ( ) ; ResourceDescriptor config = createNetworkDescriptor ( ) ; em . persist ( config ) ; em . getTransaction ( ) . commit ( ) ; assertNotNull ( config ) ; em . getTransaction ( ) . begin ( ) ; ResourceDescriptor loaded = em . find ( ResourceDescriptor . class , config . getId ( ) ) ; assertNotNull ( loaded ) ; List < CapabilityDescriptor > capabilityDescriptors = loaded . getCapabilityDescriptors ( ) ; Iterator < CapabilityDescriptor > capabilityIt = capabilityDescriptors . iterator ( ) ; assertEquals ( loaded . getInformation ( ) . getType ( ) , "network" ) ; assertEquals ( loaded . getInformation ( ) . getDescription ( ) , "network<seq2seq4repair_space>description" ) ; assertEquals ( loaded . getInformation ( ) . getName ( ) , "networklayer1.0" ) ; assertEquals ( loaded . getInformation ( ) . getVersion ( ) , "1.0.0" ) ; while ( capabilityIt . hasNext ( ) ) { CapabilityDescriptor capabilityDescriptor = capabilityIt . next ( ) ; CapabilityProperty prop = capabilityDescriptor . getCapabilityProperties ( ) . get ( 0 ) ; assertEquals ( prop . getName ( ) , "name" ) ; assertEquals ( prop . getValue ( ) , "value" ) ; } <START_BUG> assertEquals ( loaded . getNetworkFileDescriptor ( ) , "network//network_example1.xml" ) ; <END_BUG> NetworkTopology networkTopology = loaded . getNetworkTopology ( ) ; assertNotNull ( networkTopology . getDevices ( ) ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 0 ) . getName ( ) , "router:R-AS2-1" ) ; assertNotNull ( networkTopology . getDevices ( ) . get ( 0 ) . getHasInterfaces ( ) ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 0 ) . getHasInterfaces ( ) . size ( ) , 3 ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 0 ) . getHasInterfaces ( ) . get ( 0 ) . getResource ( ) , "#router:R-AS2-1:lt-1//2//0.51" ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 0 ) . getHasInterfaces ( ) . get ( 1 ) . getResource ( ) , "#router:R-AS2-1:lt-1//2//0.100" ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 0 ) . getHasInterfaces ( ) . get ( 2 ) . getResource ( ) , "#router:R-AS2-1:lo0.1" ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 1 ) . getName ( ) , "router:R-AS2-2" ) ; assertNotNull ( networkTopology . getDevices ( ) . get ( 1 ) . getHasInterfaces ( ) ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 1 ) . getHasInterfaces ( ) . size ( ) , 3 ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 1 ) . getHasInterfaces ( ) . get ( 0 ) . getResource ( ) , "#router:R-AS2-2:lt-1//2//0.100" ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 1 ) . getHasInterfaces ( ) . get ( 1 ) . getResource ( ) , "#router:R-AS2-2:lt-1//2//0.101" ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 1 ) . getHasInterfaces ( ) . get ( 2 ) . getResource ( ) , "#router:R-AS2-2:lo0.3" ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 2 ) . getName ( ) , "router:R-AS2-3" ) ; assertNotNull ( networkTopology . getDevices ( ) . get ( 2 ) . getHasInterfaces ( ) ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 2 ) . getHasInterfaces ( ) . size ( ) , 2 ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 2 ) . getHasInterfaces ( ) . get ( 0 ) . getResource ( ) , "#router:R-AS2-3:lt-1//2//0.103" ) ; assertEquals ( networkTopology . getDevices ( ) . get ( 2 ) . getHasInterfaces ( ) . get ( 1 ) . getResource ( ) , "#router:R-AS2-3:lo0.4" ) ; assertNotNull ( networkTopology . getInterfaces ( ) ) ; assertEquals ( networkTopology . getInterfaces ( ) . size ( ) , 5 ) ; assertEquals ( networkTopology . getInterfaces ( ) . get ( 0 ) . getCapacity ( ) , "1.2E+9" ) ; assertEquals ( networkTopology . getInterfaces ( ) . get ( 0 ) . getName ( ) , "router:R-AS2-1:lt-1//2//0.51" ) ; assertEquals ( networkTopology . getInterfaces ( ) . get ( 0 ) . getLinkTo ( ) . getName ( ) , "#router:R1:lt-1//2//0.50" ) ; assertEquals ( networkTopology . getInterfaces ( ) . get ( 1 ) . getCapacity ( ) , "1.2E+9" ) ; assertEquals ( networkTopology . getInterfaces ( ) . get ( 1 ) . getName ( ) , "router:R-AS2-1:lt-1//2//0.100" ) ; assertEquals ( networkTopology . getInterfaces ( ) . get ( 1 ) . getLinkTo ( ) . getName ( ) , "#router:R-AS2-2:lt-1//2//0.101" ) ; assertEquals ( networkTopology . getInterfaces ( ) . get ( 2 ) . getCapacity ( ) , "1.2E+9" ) ; assertEquals ( networkTopology . getInterfaces ( ) . get ( 2 ) . getName ( ) , "router:R-AS2-2:lt-1//2//0.101" ) ; assertEquals ( networkTopology . getInterfaces ( ) . get ( 2 ) . getLinkTo ( ) . getName ( ) , "#router:R-AS2-1:lt-1//2//0.100" ) ; assertEquals ( networkTopology . getInterfaces ( ) . get ( 3 ) . getCapacity ( ) , "1.2E+9" ) ;

Fix:
assertEquals ( loaded . getNetwork ( ) , "network//network_example1.xml" ) ;