input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
loadsStreamResourceFromAppFirst ( ) { appClassLoader . addStreamResource ( org . mule . runtime . core . internal . util . CompositeClassLoaderTestCase . RESOURCE_NAME , APP_LOADED_STREAM_RESOURCE ) ; pluginClassLoader . addStreamResource ( org . mule . runtime . core . internal . util . CompositeClassLoaderTestCase . ... | org . junit . Assert . assertThat ( resourceAsStream , org . hamcrest . Matchers . equalTo ( APP_LOADED_STREAM_RESOURCE ) ) |
parseWithHostAndPortAndPathAndTwoQueryParameters ( ) { final com . azure . common . implementation . http . UrlBuilder builder = com . azure . common . implementation . http . UrlBuilder . parse ( "www.bing.com:123/index.html?a=1&b=2" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . value ; } | org . junit . Assert . assertEquals ( "www.bing.com:123/index.html?a=1&b=2" , builder . toString ( ) ) |
testManagedHiveRepo ( ) { command . hive = true ; command . directory = null ; "<AssertPlaceHolder>" ; verify ( console ) . trace ( contains ( "repo:hive" ) ) ; } buildRepoURI ( ) { if ( ( repoURI ) != null ) { if ( repoURI . startsWith ( "repo:" ) ) { return repoURI ; } else { return "repo:" + ( repoURI ) ; } } java .... | org . junit . Assert . assertEquals ( "repo:hive" , command . buildRepoURI ( ) ) |
testGetProcessing ( ) { java . io . InputStream stream = org . opencastproject . adminui . endpoint . TasksEndpointTest . class . getResourceAsStream ( "/taskProcessing.json" ) ; java . io . InputStreamReader reader = new java . io . InputStreamReader ( stream ) ; org . json . simple . JSONArray expected = ( ( org . js... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetRegisteredWorkflows ( ) { iridaWorkflowsService . registerWorkflow ( testWorkflow1v1 ) ; iridaWorkflowsService . registerWorkflow ( testWorkflow1v2 ) ; java . util . Set < ca . corefacility . bioinformatics . irida . model . workflow . IridaWorkflow > iridaWorkflows = iridaWorkflowsService . getRegisteredWorkflo... | org . junit . Assert . assertEquals ( com . google . common . collect . Sets . newHashSet ( testWorkflow1v1 , testWorkflow1v2 ) , iridaWorkflows ) |
failsCreationGracefullyTest ( ) { org . quartz . JobDataMap map = new org . quartz . JobDataMap ( ) ; map . put ( JobStatus . TARGET_ID , "TaylorSwift" ) ; org . quartz . JobKey jobKey = new org . quartz . JobKey ( "name" , "group" ) ; org . quartz . JobDetail detail = newJob ( org . candlepin . pinsetter . tasks . Tes... | org . junit . Assert . assertEquals ( e . getMessage ( ) , "covfefe" ) |
testFailBoth ( ) { org . apache . hadoop . fs . shell . find . Or or = new org . apache . hadoop . fs . shell . find . Or ( ) ; org . apache . hadoop . fs . shell . PathData pathData = mock ( org . apache . hadoop . fs . shell . PathData . class ) ; org . apache . hadoop . fs . shell . find . Expression first = mock ( ... | org . junit . Assert . assertEquals ( Result . FAIL , or . apply ( pathData ) ) |
testFileNotModified ( ) { java . util . concurrent . Future < com . liferay . portal . fabric . netty . fileserver . FileResponse > future = _asyncBroker . post ( com . liferay . portal . fabric . netty . fileserver . handlers . FileResponseChannelHandlerTest . _path ) ; com . liferay . portal . fabric . netty . filese... | org . junit . Assert . assertSame ( fileResponse , future . get ( ) ) |
test_valid_handle_maxlength ( ) { org . restfulwhois . rdap . common . dto . DomainDto domain = generateDomainDto ( ) ; java . lang . String stringMaxLength = createStringWithLength ( UpdateValidateUtil . MAX_LENGTH_HANDLE ) ; domain . setHandle ( stringMaxLength ) ; "<AssertPlaceHolder>" ; java . lang . String content... | org . junit . Assert . assertTrue ( ( ( domain . getHandle ( ) . length ( ) ) == ( org . restfulwhois . rdap . common . util . UpdateValidateUtil . MAX_LENGTH_HANDLE ) ) ) |
testSetFullPhoneAutocompleteWithPhoneType ( ) { java . lang . String expected ; com . github . bordertech . wcomponents . WTextField field = new com . github . bordertech . wcomponents . WTextField ( ) ; for ( com . github . bordertech . wcomponents . autocomplete . segment . PhoneFormat phoneType : com . github . bord... | org . junit . Assert . assertEquals ( expected , field . getAutocomplete ( ) ) |
testDeleteAttributeValueList ( ) { org . finra . herd . model . api . xml . AttributeValueListKey attributeValueListKey = new org . finra . herd . model . api . xml . AttributeValueListKey ( ATTRIBUTE_VALUE_LIST_NAMESPACE , ATTRIBUTE_VALUE_LIST_NAME ) ; org . finra . herd . model . jpa . NamespaceEntity namespaceEntity... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . AttributeValueList ( ATTRIBUTE_VALUE_LIST_ID , attributeValueListKey ) , result ) |
testSplitLogFileFirstLineCorruptionLog ( ) { org . apache . hadoop . hbase . wal . TestWALSplit . conf . setBoolean ( org . apache . hadoop . hbase . wal . TestWALSplit . HBASE_SKIP_ERRORS , true ) ; generateWALs ( 1 , 10 , ( - 1 ) ) ; org . apache . hadoop . fs . FileStatus logfile = fs . listStatus ( WALDIR ) [ 0 ] ;... | org . junit . Assert . assertEquals ( 1 , fs . listStatus ( corruptDir ) . length ) |
testToJSONRoundTrip ( ) { java . lang . String json = instance . toJSON ( ) ; edu . illinois . library . cantaloupe . image . Info info2 = edu . illinois . library . cantaloupe . image . Info . fromJSON ( json ) ; "<AssertPlaceHolder>" ; } fromJSON ( java . nio . file . Path ) { return edu . illinois . library . cantal... | org . junit . Assert . assertEquals ( instance , info2 ) |
testFifoExecution ( ) { se . sics . kompics . SubscribeTest . semaphore = new java . util . concurrent . Semaphore ( 0 ) ; se . sics . kompics . SubscribeTest . list1 = new java . util . LinkedList < java . lang . Integer > ( ) ; java . lang . Integer [ ] expected = new java . lang . Integer [ se . sics . kompics . Sub... | org . junit . Assert . assertArrayEquals ( expected , se . sics . kompics . SubscribeTest . list1 . toArray ( ) ) |
testMergbeRGBWriting ( ) { byte [ ] pixels = new byte [ 3 ] ; net . imglib2 . img . Img < net . imglib2 . type . numeric . integer . UnsignedByteType > image = net . imglib2 . img . array . ArrayImgs . unsignedBytes ( pixels , 3 ) ; net . imglib2 . RandomAccessibleInterval < net . imglib2 . type . numeric . ARGBType > ... | org . junit . Assert . assertArrayEquals ( new byte [ ] { 1 , 2 , 3 } , pixels ) |
parseMAXTest ( ) { java . lang . String operation = "MAX(COL(column1))" ; analyze . computing . ComputingParser parser = new analyze . computing . ComputingParser ( ) ; model . datafield . DataField actual = parser . parseOperation ( operation , userData ) ; model . datafield . DataField expected = new model . datafiel... | org . junit . Assert . assertEquals ( expected , actual ) |
simpleSetItem ( ) { list . add ( 0 ) ; list . setItem ( 1 ) ; "<AssertPlaceHolder>" ; } getItem ( ) { return get ( 0 ) ; } | org . junit . Assert . assertEquals ( 1 , ( ( int ) ( list . getItem ( ) ) ) ) |
testGeneric ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; conf . set ( SynthTraceJobProducer . SLS_SYNTHETIC_TRACE_FILE , "src/test/resources/syn_generic.json" ) ; org . apache . hadoop . yarn . sls . synthetic . SynthTraceJobProducer stjp = new org . a... | org . junit . Assert . assertEquals ( stjp . getNumJobs ( ) , jobCount ) |
testToBuilder ( ) { org . batfish . datamodel . RipInternalRoute r = org . batfish . datamodel . RipInternalRoute . builder ( ) . setNetwork ( org . batfish . datamodel . Prefix . parse ( "1.1.1.0/24" ) ) . setMetric ( 1L ) . build ( ) ; "<AssertPlaceHolder>" ; } toBuilder ( ) { return org . batfish . dataplane . rib .... | org . junit . Assert . assertThat ( r . toBuilder ( ) . build ( ) , org . hamcrest . Matchers . equalTo ( r ) ) |
testGetPolicies_emptyPolicyGroupStore_assertNoPolicGroupsRetrieved ( ) { final java . util . Collection < org . nhindirect . config . store . CertPolicyGroup > groups = polDao . getPolicyGroups ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( groups . isEmpty ( ) ) |
testVerification ( ) { org . jboss . resteasy . security . doseta . Verifier verifier = new org . jboss . resteasy . security . doseta . Verifier ( ) ; org . jboss . resteasy . security . doseta . Verification verification = verifier . addNew ( ) ; verification . setRepository ( org . jboss . resteasy . tests . signatu... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testConnectToCassandraUsernamePassword ( ) { testRunner . setProperty ( AbstractCassandraProcessor . USERNAME , "user" ) ; testRunner . setProperty ( AbstractCassandraProcessor . PASSWORD , "password" ) ; testRunner . setProperty ( AbstractCassandraProcessor . CONSISTENCY_LEVEL , "ONE" ) ; processor . connectToCassandr... | org . junit . Assert . assertNotNull ( processor . getCluster ( ) ) |
testGetInitSessionTimezone ( ) { classUnderTest . setInitSessionTimezone ( true ) ; "<AssertPlaceHolder>" ; } getInitSessionTimezone ( ) { return initSessionTimezone ; } | org . junit . Assert . assertEquals ( true , classUnderTest . getInitSessionTimezone ( ) ) |
testGetName ( ) { classUnderTest . setName ( "aTestName" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return _name ; } | org . junit . Assert . assertEquals ( "aTestName" , classUnderTest . getName ( ) ) |
test_matchSubUrls_ok_two_params_prefix ( ) { java . util . Map < java . lang . String , java . lang . String > params = urlMarcher . matchSubUrls ( "sports-{id}-{key}" , "sports-abc-test" ) ; java . util . Map < java . lang . String , java . lang . String > expectParams = new java . util . HashMap < java . lang . Strin... | org . junit . Assert . assertTrue ( params . equals ( expectParams ) ) |
dependencies ( ) { io . cereebro . snitch . ComponentRelationshipsProperties c = new io . cereebro . snitch . ComponentRelationshipsProperties ( ) ; io . cereebro . snitch . DependencyProperties d = createDependency ( "iceman" , "superhero" ) ; c . setDependencies ( java . util . Arrays . asList ( d ) ) ; java . util .... | org . junit . Assert . assertEquals ( expected , actual ) |
testBrowseMetadataNoSubtitle ( ) { net . holmes . core . business . configuration . ConfigurationManager configurationManager = createMock ( net . holmes . core . business . configuration . ConfigurationManager . class ) ; net . holmes . core . business . media . MediaManager mediaManager = createMock ( net . holmes . ... | org . junit . Assert . assertNotNull ( result ) |
shouldCloseUpAllFilesWhenRequested ( ) { uk . co . probablyfine . dirty . Store < uk . co . probablyfine . dirty . testobjects . SmallObject > store = uk . co . probablyfine . dirty . Store . of ( uk . co . probablyfine . dirty . testobjects . SmallObject . class ) . from ( storeFile . getPath ( ) ) ; long initialOpenF... | org . junit . Assert . assertThat ( openFileCount ( ) , org . hamcrest . core . Is . is ( ( initialOpenFilesCount - 1 ) ) ) |
testDisableMarkupIsIgnored ( ) { item . setData ( RWT . TOOLTIP_MARKUP_ENABLED , Boolean . TRUE ) ; item . setData ( RWT . TOOLTIP_MARKUP_ENABLED , Boolean . FALSE ) ; "<AssertPlaceHolder>" ; } getData ( java . lang . String ) { if ( ( dataTable ) == null ) return null ; return ( ( java . lang . String ) ( dataTable . ... | org . junit . Assert . assertEquals ( Boolean . TRUE , item . getData ( RWT . TOOLTIP_MARKUP_ENABLED ) ) |
startSavedQueryWithDomainKey ( ) { java . lang . String domainKey = randomDomainKey ( ) ; java . lang . String queryName = com . treasuredata . client . TestTDClient . newTemporaryName ( "td_client_test" ) ; com . treasuredata . client . model . TDSaveQueryRequest query = com . treasuredata . client . model . TDSavedQu... | org . junit . Assert . assertThat ( e . getConflictsWith ( ) , org . hamcrest . Matchers . is ( com . google . common . base . Optional . of ( jobId ) ) ) |
testTrailingHeadersSizeLimit ( ) { org . apache . catalina . startup . Tomcat tomcat = getTomcatInstance ( ) ; org . apache . catalina . Context ctx = tomcat . addContext ( "x-trailer:<sp>Test" 0 , java . lang . System . getProperty ( "java.io.tmpdir" ) ) ; org . apache . catalina . startup . Tomcat . addServlet ( ctx ... | org . junit . Assert . assertTrue ( client . isResponse500 ( ) ) |
testEnforceLongAndEnforceLongOne ( ) { final org . apache . kafka . connect . data . SchemaBuilder schemaBuilder = org . apache . kafka . connect . data . SchemaBuilder . struct ( ) . field ( "long" , org . apache . kafka . connect . data . SchemaBuilder . int64 ( ) ) ; final io . confluent . ksql . util . GenericRowVa... | org . junit . Assert . assertEquals ( 0L , genericRowValueTypeEnforcer . enforceFieldType ( 0 , 0 ) ) |
testAnd_Vararg_Empty ( ) { org . apache . cayenne . exp . Expression e = org . apache . cayenne . exp . ExpressionFactory . and ( ) ; "<AssertPlaceHolder>" ; } and ( ) { org . apache . cayenne . query . ColumnSelect q = new org . apache . cayenne . query . ColumnSelect ( ) ; org . junit . Assert . assertNull ( q . getH... | org . junit . Assert . assertNull ( e ) |
testSortBySource ( ) { long [ ] data = org . neo4j . graphalgo . core . huge . loader . RadixSortTest . testData ( ) ; org . neo4j . graphalgo . core . huge . loader . RadixSort . radixSort ( data , org . neo4j . graphalgo . core . huge . loader . RadixSort . newCopy ( data ) , org . neo4j . graphalgo . core . huge . l... | org . junit . Assert . assertArrayEquals ( org . neo4j . graphalgo . core . huge . loader . RadixSortTest . expectedBySource ( ) , data ) |
retrieveSupplierBillingBySupplierId_nonExistingSupplierId ( ) { java . util . List < org . oscm . reportingservice . dao . ReportResultData > reportData = retrieveSupplierBillingBySupplierId ( org . oscm . reportingservice . dao . BillingDaoIT . NON_EXISTING_SUPPLIER_ID ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { retur... | org . junit . Assert . assertTrue ( reportData . isEmpty ( ) ) |
testWithoutLockType ( ) { final org . apache . druid . indexing . common . task . Task task = org . apache . druid . indexing . common . task . NoopTask . create ( ) ; final org . apache . druid . indexing . common . actions . LockTryAcquireAction action = new org . apache . druid . indexing . common . actions . LockTr... | org . junit . Assert . assertNotNull ( lock ) |
IfSelfTransitionPermitted_ActionsFire ( ) { com . github . oxo42 . stateless4j . StateMachineConfig < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > config = new com . github . oxo42 . stateless4j . StateMachineConfig ( ) ; config . configure ( State . B ) . onEntry ( new co... | org . junit . Assert . assertTrue ( fired ) |
_03_TestGetClientSecret ( ) { com . exacttarget . fuelsdk . ETConfigurationTest . clientSecret = com . exacttarget . fuelsdk . ETConfigurationTest . configuration . get ( "clientSecret" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { java . net . HttpURLConnection connection = null ; try { com . exacttarge... | org . junit . Assert . assertNotNull ( com . exacttarget . fuelsdk . ETConfigurationTest . clientSecret ) |
tailNotExist ( ) { int ret = mFsShell . run ( "tail" , "/testFile" ) ; "<AssertPlaceHolder>" ; } run ( alluxio . grpc . RunPRequest , io . grpc . stub . StreamObserver ) { alluxio . RpcUtils . call ( alluxio . master . job . JobMasterClientServiceHandler . LOG , ( ( alluxio . RpcUtils . RpcCallableThrowsIOException < a... | org . junit . Assert . assertEquals ( ( - 1 ) , ret ) |
testCouldHoldWithEnoughResources ( ) { java . util . Map < java . lang . String , java . lang . Double > allResources = new java . util . HashMap ( ) ; allResources . put ( Constants . COMMON_CPU_RESOURCE_NAME , 2.0 ) ; allResources . put ( gpuResourceName , 2.0 ) ; org . apache . storm . scheduler . resource . normali... | org . junit . Assert . assertThat ( couldHold , org . hamcrest . CoreMatchers . is ( true ) ) |
testGetLibraryBook ( ) { java . util . List < org . apache . cxf . jaxrs . ext . search . jpa . Book > books = queryBooks ( "library.books.bookTitle==num10" ) ; "<AssertPlaceHolder>" ; } size ( ) { return cache . getSize ( ) ; } | org . junit . Assert . assertEquals ( 3 , books . size ( ) ) |
test0TimeoutShouldReturnMaxInt ( ) { hudson . plugins . ec2 . SlaveTemplate st = new hudson . plugins . ec2 . SlaveTemplate ( "" , EC2AbstractSlave . TEST_ZONE , null , "default" , "foo" , com . amazonaws . services . ec2 . model . InstanceType . M1Large , false , "ttt" , Node . Mode . NORMAL , "" , "bar" , "0" 1 , "aa... | org . junit . Assert . assertEquals ( Integer . MAX_VALUE , st . getLaunchTimeout ( ) ) |
testBindLeftOptional ( ) { java . lang . String query = "SELECT<sp>*\n" + ( ( ( "WHERE<sp>{\n" + "<sp>BIND(<sp><http://example.org/Individual1><sp>AS<sp>?source<sp>)\n" ) + "<sp>OPTIONAL<sp>{<sp>?source<sp>rdfs:label<sp>?label<sp>.<sp>}\n" ) + "}" ) ; int count = runQueryAndCount ( query ) ; "<AssertPlaceHolder>" ; } r... | org . junit . Assert . assertEquals ( 1 , count ) |
testCurrentFieldWhenFactFieldIsNull ( ) { final java . lang . String factField = null ; doReturn ( factField ) . when ( plugin ) . getFactField ( ) ; final java . lang . String currentField = page . currentField ( ) ; "<AssertPlaceHolder>" ; } currentField ( ) { final java . util . List < java . lang . String > parts =... | org . junit . Assert . assertEquals ( "" , currentField ) |
testGetParametersWithDefaultEntityAndDisabledSecurity ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . degree . Degree entity = new org . lnu . is . domain . degree . Degree ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String ... | org . junit . Assert . assertEquals ( expected , actual ) |
itsPossibleToBindToInstancesCreatedOutsideTheModuleSystem ( ) { final com . avanza . astrix . modules . test . ModulesTest . Ping ping = new com . avanza . astrix . modules . test . ModulesTest . Ping ( ) { @ com . avanza . astrix . modules . test . Override public java . lang . String ping ( java . lang . String msg )... | org . junit . Assert . assertSame ( ping , exportedPing ) |
testIsDebugEnabled ( ) { org . apache . commons . logging . Log mockLog = mock ( org . apache . commons . logging . Log . class ) ; when ( mockLog . isDebugEnabled ( ) ) . thenReturn ( true ) ; io . netty . util . internal . logging . InternalLogger logger = new io . netty . util . internal . logging . CommonsLogger ( ... | org . junit . Assert . assertTrue ( logger . isDebugEnabled ( ) ) |
testHasChildren_appEngineStandardProjectElement_noConfigs ( ) { com . google . cloud . tools . eclipse . appengine . facets . ui . navigator . model . AppEngineProjectElement projectElement = mock ( com . google . cloud . tools . eclipse . appengine . facets . ui . navigator . model . AppEngineProjectElement . class ) ... | org . junit . Assert . assertFalse ( fixture . hasChildren ( projectElement ) ) |
getEmptyValues ( ) { final java . util . ArrayList < org . jboss . msc . value . Value < java . lang . Object > > values = new java . util . ArrayList < org . jboss . msc . value . Value < java . lang . Object > > ( ) ; final java . lang . Object [ ] valueArray = org . jboss . msc . value . Values . getValues ( values ... | org . junit . Assert . assertEquals ( 0 , valueArray . length ) |
testFieldUpdate ( ) { try ( com . syncleus . ferma . tx . Tx tx = tx ( ) ) { com . gentics . mesh . core . data . NodeGraphFieldContainer container = tx . getGraph ( ) . addFramedVertex ( com . gentics . mesh . core . data . container . impl . NodeGraphFieldContainerImpl . class ) ; com . gentics . mesh . core . data .... | org . junit . Assert . assertNotNull ( list ) |
testAppend ( ) { org . nuxeo . common . utils . Path path1 = new org . nuxeo . common . utils . Path ( "/a/b/c" ) ; org . nuxeo . common . utils . Path path2 = new org . nuxeo . common . utils . Path ( "/d/e/f" ) ; org . nuxeo . common . utils . Path path3 = new org . nuxeo . common . utils . Path ( "/a/b/c/d/e/f" ) ; ... | org . junit . Assert . assertEquals ( path1 . append ( path2 ) , path3 ) |
testGetProxyLowerCaseUser ( ) { final org . apache . hadoop . security . UserGroupInformation fooUgi = org . apache . hadoop . security . UserGroupInformation . createUserForTesting ( "BRYAN" , new java . lang . String [ ] { "all" } ) ; com . streamsets . pipeline . api . Stage . Context context = mock ( Stage . Contex... | org . junit . Assert . assertEquals ( "foo" , ugi . getUserName ( ) ) |
testHash64 ( ) { long h = net . openhft . chronicle . wire . HashWire . hash64 ( ( wire ) -> wire . write ( ( ) -> "entrySet" ) . sequence ( ( s ) -> { s . marshallable ( ( m ) -> m . write ( ( ) -> "key" ) . text ( "key-1" ) . write ( ( ) -> "value" ) . text ( "value-1" ) ) ; s . marshallable ( ( m ) -> m . write ( ( ... | org . junit . Assert . assertFalse ( ( h == 0 ) ) |
testDeleteFromLocalIndex ( ) { java . lang . String tableName = ( ( schemaName ) + "." ) + ( generateUniqueName ( ) ) ; java . lang . String indexName = "IDX_" + ( generateUniqueName ( ) ) ; java . sql . Connection conn = getConnection ( ) ; conn . setAutoCommit ( true ) ; if ( isNamespaceMapped ) { conn . createStatem... | org . junit . Assert . assertEquals ( 0 , rs . getInt ( 1 ) ) |
testCSVWithNewlines ( ) { java . lang . String [ ] expectedFileContents = new java . lang . String [ ] { "\"Champion,<sp>Mac\",\"1234<sp>Hoth<sp>St.\n\tApartment<sp>101\n\tAtlanta,<sp>GA\n\t64086\",\"30\",\"M\",\"5/28/2010<sp>12:00:00<sp>AM\",\"Just<sp>some<sp>guy\"" , "\"Champion,<sp>Mac\",\"5678<sp>Tatooine<sp>Rd.<sp... | org . junit . Assert . assertEquals ( expectedFileContents [ i ] , fileContents . get ( i ) ) |
testAddCRS ( ) { java . lang . String orig = "{\"type\":\"Polygon\",\"coordinates\":[[[1.0,<sp>1.0],[2.0,<sp>2.0],[3.0,<sp>1.0],[1.0,<sp>1.0]]]}" ; java . lang . String expected = "{\"type\":\"Polygon\",\"coordinates\":[[[1.0,1.0],[2.0,2.0],[3.0,1.0],[1.0,1.0]]],\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPS... | org . junit . Assert . assertEquals ( expected , uk . gov . dstl . baleen . consumers . Postgres . addCrsToGeoJSON ( orig ) ) |
testCorrectMarshal ( ) { java . io . ByteArrayOutputStream outStream = new java . io . ByteArrayOutputStream ( ) ; de . rub . nds . tlsattacker . core . certificate . CertificateAdapterTest . certificate . encode ( outStream ) ; java . lang . String correctCertificateString = de . rub . nds . modifiablevariable . util ... | org . junit . Assert . assertEquals ( marshalledCertificateString , correctCertificateString ) |
hasTextualContextTypeWithTextHtmlContentTypeShouldReturnTrue ( ) { subject . setContenttype ( "text/html;<sp>charset:<sp>UTF-8" ) ; "<AssertPlaceHolder>" ; } hasTextualRequestContent ( ) { return ( this . hasContenttype ( ) ) && ( isTextualContentType ( this . contenttype ) ) ; } | org . junit . Assert . assertThat ( subject . hasTextualRequestContent ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testResolvePackageDefaultJava ( ) { final javax . enterprise . inject . spi . Bean moduleServiceBean = ( ( javax . enterprise . inject . spi . Bean ) ( beanManager . getBeans ( org . kie . workbench . common . services . shared . project . KieModuleService . class ) . iterator ( ) . next ( ) ) ) ; final javax . enterpr... | org . junit . Assert . assertNull ( result ) |
testSearchForExtensionToken ( ) { ca . uhn . fhir . jpa . dao . dstu3 . SearchParameter eyeColourSp = new ca . uhn . fhir . jpa . dao . dstu3 . SearchParameter ( ) ; eyeColourSp . addBase ( "Patient" ) ; eyeColourSp . setCode ( "eyecolour" ) ; eyeColourSp . setType ( org . hl7 . fhir . dstu3 . model . Enumerations . Se... | org . junit . Assert . assertThat ( foundResources , contains ( p1id . getValue ( ) ) ) |
testAddCalendarBookingResourceRequestedNotifiesDenial ( ) { com . liferay . calendar . model . Calendar calendar = com . liferay . calendar . test . util . CalendarTestUtil . addCalendar ( _user ) ; com . liferay . calendar . model . Calendar resourceCalendar = com . liferay . calendar . test . util . CalendarTestUtil ... | org . junit . Assert . assertTrue ( com . liferay . portal . test . mail . MailServiceTestUtil . lastMailMessageContains ( messageBodySnippet ) ) |
testFindItemDefinitionParentWhenItCouldNotBeFound ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType dataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final org . kie . workbench . common . dmn . api . definitio... | org . junit . Assert . assertEquals ( expectedParent , actualParent ) |
testHasMissingPlugins ( ) { "<AssertPlaceHolder>" ; } hasMissingPlugins ( ) { return ( ( missingTrans ) != null ) && ( ! ( missingTrans . isEmpty ( ) ) ) ; } | org . junit . Assert . assertFalse ( meta . hasMissingPlugins ( ) ) |
testEvaluate ( ) { org . eclipse . rdf4j . model . ValueFactory vf = org . eclipse . rdf4j . model . impl . SimpleValueFactory . getInstance ( ) ; org . eclipse . rdf4j . model . Resource subj = vf . createIRI ( "http://whatever/subj/" ) ; org . eclipse . rdf4j . model . IRI pred = vf . createIRI ( "http://whatever/pre... | org . junit . Assert . assertTrue ( res . hasNext ( ) ) |
toSpdStringWithBody ( ) { final nl . bzk . migratiebrp . voisc . spd . GetMessageBody record = new nl . bzk . migratiebrp . voisc . spd . GetMessageBody ( "this<sp>is<sp>the<sp>message<sp>body" ) ; "<AssertPlaceHolder>" ; } toSpdString ( ) { return java . lang . String . format ( "%04d" , this . noOperationError ) ; } | org . junit . Assert . assertEquals ( "this<sp>is<sp>the<sp>message<sp>body" , record . toSpdString ( ) ) |
testCommitChangesInBatch ( ) { org . apache . cayenne . testdo . testmap . Artist a1 = context . newObject ( org . apache . cayenne . testdo . testmap . Artist . class ) ; a1 . setArtistName ( "abc1" ) ; org . apache . cayenne . testdo . testmap . Artist a2 = context . newObject ( org . apache . cayenne . testdo . test... | org . junit . Assert . assertEquals ( 3 , artists . size ( ) ) |
testEditaDescuento ( ) { log . debug ( "Test<sp>'edita'" ) ; mx . edu . um . mateo . general . model . Usuario usuario = obtieneUsuario ( ) ; mx . edu . um . mateo . inscripciones . model . Descuento descuento = new mx . edu . um . mateo . inscripciones . model . Descuento ( ) ; mx . edu . um . mateo . general . model ... | org . junit . Assert . assertNotNull ( descuento . getId ( ) ) |
canExtractNoCategory ( ) { final java . lang . String name = ( ( OIDFunctions . NO_CATEGORY ) + ( OIDFunctions . OID_SEPARATOR ) ) + "fldName" ; final java . lang . String OID = com . hartwig . hmftools . common . ecrf . reader . OIDFunctions . toOID ( name ) ; "<AssertPlaceHolder>" ; } toEcrfFieldName ( java . lang . ... | org . junit . Assert . assertEquals ( name , com . hartwig . hmftools . common . ecrf . reader . OIDFunctions . toEcrfFieldName ( OID ) ) |
testSetNeighborId ( ) { reachability . setNeighborId ( neighborId ) ; result4 = reachability . neighborId ( ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; } | org . junit . Assert . assertThat ( result4 , org . hamcrest . CoreMatchers . is ( neighborId ) ) |
categoryFilterLeavesOnlyMatchingMethods_usingConstructor ( ) { org . junit . experimental . categories . Categories . CategoryFilter filter = new org . junit . experimental . categories . Categories . CategoryFilter ( org . junit . experimental . categories . CategoryTest . SlowTests . class , null ) ; org . junit . ru... | org . junit . Assert . assertEquals ( 1 , runner . testCount ( ) ) |
testGetAverageTimeMillis_averageRoundsDown ( ) { frame . addElapsedTime ( 1 ) ; frame . addElapsedTime ( 2 ) ; "<AssertPlaceHolder>" ; } getAverageTimeMilis ( ) { return java . lang . Math . round ( ( ( this . elapsedTimeStatistics . getValueCount ( ) ) == 0 ? 0 : ( this . elapsedTimeStatistics . getValueSum ( ) ) / ( ... | org . junit . Assert . assertEquals ( 2 , frame . getAverageTimeMilis ( ) ) |
shouldRaiseConstraintsViolationCauseTitleAndPriceNull ( ) { org . agoncal . book . javaee7 . chapter03 . ex01 . Book01 book = new org . agoncal . book . javaee7 . chapter03 . ex01 . Book01 ( ) ; java . util . Set < javax . validation . ConstraintViolation < org . agoncal . book . javaee7 . chapter03 . ex01 . Book01 > >... | org . junit . Assert . assertEquals ( 2 , violations . size ( ) ) |
immutableContainerNodeBuilderExceptionTest ( ) { final org . opendaylight . yangtools . yang . data . api . schema . ContainerNode immutableContainerNode = org . opendaylight . yangtools . yang . data . impl . schema . builder . impl . ImmutableContainerNodeBuilder . create ( 1 ) . withNodeIdentifier ( org . opendaylig... | org . junit . Assert . assertNotNull ( immutableContainerNode ) |
testConvertISO ( ) { java . lang . String source = "2018-05-09T17:34:55.000Z" ; com . box . l10n . mojito . rest . textunit . StringToDateTimeConverter instance = new com . box . l10n . mojito . rest . textunit . StringToDateTimeConverter ( ) ; org . joda . time . DateTime expResult = new org . joda . time . DateTime (... | org . junit . Assert . assertEquals ( expResult , result ) |
inappropriateIndexable ( ) { net . java . sezpoz . impl . TestUtils . makeSource ( src , "A4" 0 , "import<sp>java.lang.annotation.*;" , "A4" 7 , "A1" 7 , "A4" 6 , "A1" 4 ) ; net . java . sezpoz . impl . TestUtils . runApt ( src , "A1" , clz , null , null ) ; net . java . sezpoz . impl . TestUtils . makeSource ( src , "... | org . junit . Assert . assertTrue ( ( "A1" 5 + baos ) , baos . toString ( ) . contains ( "A1" 6 ) ) |
testWriteMiddle ( ) { java . nio . ByteBuffer b1 = java . nio . ByteBuffer . wrap ( new byte [ ] { 0 , 0 , 0 , 0 , 0 , 0 } ) ; java . nio . ByteBuffer b2 = java . nio . ByteBuffer . wrap ( new byte [ ] { 0 } ) ; java . nio . ByteBuffer b3 = java . nio . ByteBuffer . wrap ( new byte [ ] { 0 , 0 } ) ; java . nio . ByteBu... | org . junit . Assert . assertEquals ( bytes [ ( i - 4 ) ] , i ) |
forEachWithOccurrences ( ) { com . gs . collections . api . bag . MutableBag < java . lang . Integer > integers = this . newWith ( 1 , 1 , 1 , 1 , 2 , 2 , 2 , 3 , 3 , 4 ) ; com . gs . collections . api . bag . MutableBag < java . lang . Integer > result = com . gs . collections . impl . bag . mutable . HashBag . newBag... | org . junit . Assert . assertEquals ( integers , result ) |
empty ( ) { java . lang . String json = "" ; biweekly . io . json . JCalReader reader = new biweekly . io . json . JCalReader ( json ) ; "<AssertPlaceHolder>" ; } readNext ( ) { warnings . clear ( ) ; context = new biweekly . io . ParseContext ( ) ; biweekly . ICalendar ical = _readNext ( ) ; if ( ical == null ) { retu... | org . junit . Assert . assertNull ( reader . readNext ( ) ) |
testIsTypeAlreadyRepresentedWhenIsReturnsTrue ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType dataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final java . lang . String uuid = "uuid" ; final java . lang . S... | org . junit . Assert . assertTrue ( manager . isTypeAlreadyRepresented ( type ) ) |
testSpecs ( ) { com . thinkbiganalytics . util . ColumnSpec [ ] specs = com . thinkbiganalytics . util . ColumnSpec . createFromString ( "col1|string|my<sp>comment\ncol2|int\ncol3|string|foo<sp>description\ncol4|string" ) ; java . lang . StringBuffer sb = new java . lang . StringBuffer ( ) ; int i = specs . length ; fo... | org . junit . Assert . assertNotNull ( sb . toString ( ) ) |
testException ( ) { org . mockito . Mockito . when ( brpDalService . geefAllePartijen ( ) ) . thenThrow ( new java . lang . RuntimeException ( "Messsage" ) ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . LeesPartijRegisterVerzoekBericht verzoek = new nl . bzk . migratiebrp . bericht . model . sync . ... | org . junit . Assert . assertNotNull ( "Er<sp>zou<sp>een<sp>fout<sp>op<sp>moeten<sp>treden." , e ) |
UmlLinkType_InstanceVariableDeclaration_Composite_Vector ( ) { java . lang . String fromClass = "domain.direct.violating.DeclarationVariableInstance_GenericType_OneTypeParameter" ; java . lang . String toClass = "technology.direct.dao.UserDAO" ; java . lang . String fromAttribute = "uDao" ; boolean isComposite = true ;... | org . junit . Assert . assertTrue ( isUmlLinkDetectedViaClass ( fromClass , toClass , fromAttribute , isComposite , typeToFind ) ) |
configureAndRetrieveGeneric ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; AvroMode . GENERIC . configure ( conf ) ; org . apache . crunch . types . avro . AvroMode returnedMode = org . apache . crunch . types . avro . AvroMode . fromConfiguration ( conf... | org . junit . Assert . assertThat ( returnedMode , org . hamcrest . CoreMatchers . is ( AvroMode . GENERIC ) ) |
simpleTransformTestSequence ( ) { java . util . List < java . util . List < org . datavec . api . writable . Writable > > sequence = new java . util . ArrayList ( ) ; sequence . add ( java . util . Arrays . asList ( ( ( org . datavec . api . writable . Writable ) ( new org . datavec . api . writable . LongWritable ( 14... | org . junit . Assert . assertEquals ( 2 , next . get ( 0 ) . size ( ) ) |
testRightIntegerInteger ( ) { int expected = 5 ; int actual = cFunction . right ( 10 , 1 ) ; "<AssertPlaceHolder>" ; } right ( java . lang . Integer , java . lang . Long ) { return l1 > > l2 ; } | org . junit . Assert . assertEquals ( expected , actual ) |
whenSettingIterations_itIsSetCorrectly ( ) { com . graphhopper . jsprit . core . algorithm . VehicleRoutingAlgorithm algorithm = new com . graphhopper . jsprit . core . algorithm . VehicleRoutingAlgorithm ( mock ( com . graphhopper . jsprit . core . problem . VehicleRoutingProblem . class ) , mock ( com . graphhopper .... | org . junit . Assert . assertEquals ( 50 , algorithm . getMaxIterations ( ) ) |
testRefreshDependentDataTypes ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType dataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final org . kie . workbench . common . dmn . client . editors . types . common .... | org . junit . Assert . assertEquals ( expectedDataTypes , actualDataTypes ) |
testNumericalValuesAsInputAndOuput ( ) { java . lang . Object result = session . newRequest ( NestedJSONOperation . ID ) . setInput ( 4.3 ) . execute ( ) ; "<AssertPlaceHolder>" ; } execute ( ) { return call ( ) . thenCompose ( ( req ) -> { if ( ( req . getStatus ( ) ) == HttpStatus . SC_ACCEPTED ) { java . lang . Stri... | org . junit . Assert . assertEquals ( 4 , result ) |
testArraySerialization ( ) { com . owlike . genson . Genson genson = createTimestampGenson ( java . time . OffsetDateTime . class , TimestampFormat . ARRAY , torontoZoneId ) ; java . time . OffsetDateTime dt = java . time . OffsetDateTime . ofInstant ( java . time . ZonedDateTime . of ( 2011 , 11 , 10 , 9 , 8 , 7 , 122... | org . junit . Assert . assertEquals ( expectedJson , genson . serialize ( dt ) ) |
isPrefixServletMapping_ ( ) { "<AssertPlaceHolder>" ; } isPrefixServletMapping ( javax . servlet . http . HttpServletRequest ) { java . lang . String pathInfo = trimToNull ( request . getPathInfo ( ) ) ; if ( pathInfo != null ) { return true ; } else { java . lang . String servletPath = trimToEmpty ( request . getServl... | org . junit . Assert . assertEquals ( isPrefixServletMapping , isPrefixServletMapping ( request ) ) |
deveObterCodigoEventoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFInfoEventoCancelamento infoEventoCancelamento = new com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFInfoEventoCancelamento ( ) ; final java . lang . String codig... | org . junit . Assert . assertEquals ( codigoEvento , infoEventoCancelamento . getCodigoEvento ( ) ) |
testCheckApiStatusActive ( ) { java . lang . Long apiId = 1L ; ca . corefacility . bioinformatics . irida . model . RemoteAPI client = new ca . corefacility . bioinformatics . irida . model . RemoteAPI ( "name" , "http://uri" , "a<sp>description" , "id" , "secret" ) ; when ( remoteAPIService . read ( apiId ) ) . thenRe... | org . junit . Assert . assertEquals ( RemoteAPIController . VALID_OAUTH_CONNECTION , checkApiStatus ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . LayoutRevision . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com ... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testStartAndStopServerMode ( ) { redis . clients . jedis . Jedis jedis = new redis . clients . jedis . Jedis ( "127.0.0.1" , fr . jetoile . hadoopunit . RedisBootstrapTest . configuration . getInt ( RedisConfig . REDIS_PORT_KEY ) ) ; "<AssertPlaceHolder>" ; System . out . println ( jedis . info ( ) ) ; jedis . close ( ... | org . junit . Assert . assertNotNull ( jedis . info ( ) ) |
testInputSize1FilterSize1 ( ) { try ( java . io . StringReader input = new java . io . StringReader ( "a" ) ; org . apache . commons . io . input . CharacterFilterReader reader = new org . apache . commons . io . input . CharacterFilterReader ( input , 'a' ) ) { "<AssertPlaceHolder>" ; } } read ( ) { if ( ( currentNumb... | org . junit . Assert . assertEquals ( ( - 1 ) , reader . read ( ) ) |
runnerShouldBeAliveWhenStatusTimeOut ( ) { runner . setStatus ( Runner . Status . TIMEOUT ) ; "<AssertPlaceHolder>" ; } isAlive ( ) { return java . util . EnumSet . range ( Status . RUNNING , Status . DONE ) . contains ( status ) ; } | org . junit . Assert . assertThat ( runner . isAlive ( ) , org . hamcrest . core . Is . is ( true ) ) |
testContstructor ( ) { super . setupDboExpectations ( mockDatabaseObjectInfo ) ; super . setupSqlDatabaseMetaDataExpectations ( mockMetaData ) ; mockHelper . replayAll ( ) ; classUnderTest = new net . sourceforge . squirrel_sql . plugins . postgres . util . RelatedObjectInfo ( mockDatabaseObjectInfo , TEST_SIMPLE_NAME ... | org . junit . Assert . assertEquals ( mockDatabaseObjectInfo , classUnderTest . getRelatedObjectInfo ( ) ) |
app_scoped_bean_should_not_be_empty_after_tx ( ) { org . apache . deltaspike . data . test . ee7 . domain . Simple simple = simpleClientApp . getSimple ( ) ; "<AssertPlaceHolder>" ; } getSimple ( ) { return simple ; } | org . junit . Assert . assertNotNull ( simple ) |
testCacheEntryIsRevalidatableIfHeadersIncludeETag ( ) { final org . apache . hc . core5 . http . Header [ ] headers = new org . apache . hc . core5 . http . Header [ ] { new org . apache . hc . core5 . http . message . BasicHeader ( "Expires" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( new j... | org . junit . Assert . assertTrue ( impl . isRevalidatable ( entry ) ) |
testLexerEOF ( ) { org . antlr . v4 . tool . LexerGrammar lg = new org . antlr . v4 . tool . LexerGrammar ( ( "2:RULE_STOP<sp>0\n" 4 + "2:RULE_STOP<sp>0\n" 5 ) ) ; java . lang . String expecting = "max<sp>type<sp>1\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( "2:RULE_STOP<sp>0\n" 6 + "1:RULE_START<sp>0\n" ) + "2:RULE_STOP<sp>0\n" ) ... | org . junit . Assert . assertEquals ( expecting , result ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.