<commit_before>package org.sbolstandard.core2.Testing;

import static org.junit.Assert.*;

import javax.xml.namespace.QName;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.sbolstandard.core2.GenericTopLevel;
import org.sbolstandard.core2.SBOLDocument;
import org.sbolstandard.core2.SBOLValidationException;

public class GenericTopLevelTest {
	private SBOLDocument doc = null;
	@Before
	public void setUp() throws Exception {
		String prURI="http://partsregistry.org";
		doc = new SBOLDocument();
		doc.setDefaultURIprefix(prURI);
	}

	@After
	public void tearDown() throws Exception {
	}


	@Test
	public void test_toString() throws SBOLValidationException
	{
		GenericTopLevel topLevel=doc.createGenericTopLevel(
				"datasheet1",
				"",
				new QName("http://partsregistry.org", "Datasheet", ""));
		
		String topLevel_string = "datasheet1" + '@' + Integer.toHexString(topLevel.hashCode());
		equals(topLevel_string == topLevel.toString());
		
	}
	

}<commit_msg>checking with completeness for the document fixed toString() test method to call the correct method<commit_after>package org.sbolstandard.core2.Testing;

import static org.junit.Assert.*;
import javax.xml.namespace.QName;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.sbolstandard.core2.GenericTopLevel;
import org.sbolstandard.core2.SBOLDocument;
import org.sbolstandard.core2.SBOLValidationException;

public class GenericTopLevelTest {
	private SBOLDocument doc = null;
	@Before
	public void setUp() throws Exception {
		String prURI="http://partsregistry.org";
		doc = new SBOLDocument();
		doc.setDefaultURIprefix(prURI);
		doc.setComplete(true);
	}

	@After
	public void tearDown() throws Exception {
	}


	@Test
	public void test_toString() throws SBOLValidationException
	{
		GenericTopLevel topLevel=doc.createGenericTopLevel(
				"random_sheet1",
				"",
				new QName("http://partsregistry.org", "Random_Sheet", ""));
		
		//why doesn't toString method print version? Bigger problem: why aren't all toString methods standard?
		assertTrue(doc.getGenericTopLevel(topLevel.getIdentity()).toString().length() != 0);
		assertNotNull(topLevel.toString());
		assertTrue(topLevel.toString().contains("displayId=random_sheet1"));
		assertTrue(!topLevel.toString().contains("name="));

		
	}
	

}
{'fraction_non_alphanumeric': 0.1188542112013681, 'fraction_numerical': 0.0055579307396323215, 'mean_word_length': 5.341463414634147, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5453950', 'n_tokens_mistral': 765, 'n_tokens_neox': 707, 'n_words': 152}