input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testextequal ( ) { fr . inria . corese . core . query . QueryProcess exec = fr . inria . corese . core . query . QueryProcess . create ( fr . inria . corese . core . Graph . create ( ) ) ; java . lang . String q = "select<sp>" + ( ( "(kg:equals('ete',<sp>'t')<sp>as<sp>?eq)" + "(kg:contains('un<sp>t',<sp>'ete')<sp>as<sp>?ct)" ) + "where<sp>{}" ) ; fr . inria . corese . kgram . core . Mappings map = exec . query ( q ) ; fr . inria . corese . sparql . api . IDatatype dt1 = ( ( fr . inria . corese . sparql . api . IDatatype ) ( map . getValue ( "?eq" ) ) ) ; fr . inria . corese . sparql . api . IDatatype dt2 = ( ( fr . inria . corese . sparql . api . IDatatype ) ( map . getValue ( "?ct" ) ) ) ; "<AssertPlaceHolder>" ; } booleanValue ( ) { return ( getLabel ( ) . length ( ) ) > 0 ; }
org . junit . Assert . assertEquals ( true , ( ( dt1 . booleanValue ( ) ) && ( dt2 . booleanValue ( ) ) ) )
testNullMapping ( ) { loghub . Event ev = RunEtl ( "[<sp>a<sp>b<sp>]<sp>@<sp>[<sp>a<sp>b<sp>]<sp>{0:<sp>1}<sp>" , ( i ) -> { } , false ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { try { return ( ( java . lang . Boolean ) ( action ( Action . ISEMPTY , null , null ) ) ) == true ; } catch ( loghub . ProcessorException e ) { throw new loghub . UncheckedProcessorException ( e ) ; } }
org . junit . Assert . assertTrue ( ev . isEmpty ( ) )
testSomething ( ) { System . out . println ( "In<sp>TestSomething" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testGetRouterPriority ( ) { ospfInterface . setRouterPriority ( 1 ) ; "<AssertPlaceHolder>" ; } routerPriority ( ) { return routerPriority ; }
org . junit . Assert . assertEquals ( 1 , ospfInterface . routerPriority ( ) )
testMatches7 ( ) { flex . messaging . services . messaging . Subtopic s1 = new flex . messaging . services . messaging . Subtopic ( "foo.*" , flex . messaging . services . messaging . SubtopicTest . DEFAULT_SEPERATOR ) ; flex . messaging . services . messaging . Subtopic s2 = new flex . messaging . services . messaging . Subtopic ( "foo.bar.foo" , flex . messaging . services . messaging . SubtopicTest . DEFAULT_SEPERATOR ) ; boolean result = s1 . matches ( s2 ) ; "<AssertPlaceHolder>" ; } matches ( flex . messaging . services . messaging . Subtopic ) { if ( ( ! ( hasSubtopicWildcard ) ) && ( ! ( other . hasSubtopicWildcard ) ) ) { return subtopic . equals ( other . subtopic ) ? true : false ; } else { if ( ( ( hierarchical ) && ( other . hierarchical ) ) && ( ! ( separator . equals ( other . separator ) ) ) ) return false ; java . util . StringTokenizer t1 = new java . util . StringTokenizer ( subtopic , separator ) ; java . util . StringTokenizer t2 = new java . util . StringTokenizer ( other . subtopic , other . separator ) ; int n = t1 . countTokens ( ) ; int difference = n - ( t2 . countTokens ( ) ) ; java . lang . String tok1 = null ; java . lang . String tok2 = null ; boolean matchToken ; while ( ( n -- ) > 0 ) { tok1 = t1 . nextToken ( ) ; matchToken = ! ( tok1 . equals ( flex . messaging . services . messaging . Subtopic . SUBTOPIC_WILDCARD ) ) ; if ( t2 . hasMoreTokens ( ) ) { tok2 = t2 . nextToken ( ) ; if ( tok2 . equals ( flex . messaging . services . messaging . Subtopic . SUBTOPIC_WILDCARD ) ) continue ; } else { break ; } if ( matchToken && ( ! ( tok1 . equals ( tok2 ) ) ) ) return false ; } if ( difference == 0 ) return true ; else if ( ( difference < 0 ) && ( tok1 . equals ( flex . messaging . services . messaging . Subtopic . SUBTOPIC_WILDCARD ) ) ) return true ; else return ( difference > 0 ) && ( tok2 . equals ( flex . messaging . services . messaging . Subtopic . SUBTOPIC_WILDCARD ) ) ; } }
org . junit . Assert . assertTrue ( result )
cryptoAPIDecryptionOther ( ) { java . lang . String [ ] encPpts = new java . lang . String [ ] { "Password_Protected-56-hello.ppt" , "Password_Protected-hello.ppt" , "Password_Protected-np-hello.ppt" } ; org . apache . poi . hssf . record . crypto . Biff8EncryptionKey . setCurrentUserPassword ( "hello" ) ; try { for ( java . lang . String pptFile : encPpts ) { try ( org . apache . poi . poifs . filesystem . POIFSFileSystem fs = new org . apache . poi . poifs . filesystem . POIFSFileSystem ( org . apache . poi . hslf . record . TestDocumentEncryption . slTests . getFile ( pptFile ) , true ) ; org . apache . poi . hslf . usermodel . HSLFSlideShow ppt = new org . apache . poi . hslf . usermodel . HSLFSlideShow ( fs ) ) { "<AssertPlaceHolder>" ; } catch ( org . apache . poi . hslf . exceptions . EncryptedPowerPointFileException e ) { org . junit . Assert . fail ( ( pptFile + "<sp>can't<sp>be<sp>decrypted" ) ) ; } } } finally { org . apache . poi . hssf . record . crypto . Biff8EncryptionKey . setCurrentUserPassword ( null ) ; } } getSlides ( ) { return _slides ; }
org . junit . Assert . assertTrue ( ( ( ppt . getSlides ( ) . size ( ) ) > 0 ) )
getFromIdReturnsNullWhenDABThrowsException ( ) { when ( this . dab . getDocument ( org . phenotips . entities . spi . AbstractPrimaryEntityManagerTest . PERSON_REFERENCE ) ) . thenThrow ( new java . lang . Exception ( ) ) ; org . phenotips . entities . spi . Person result = this . manager . get ( org . phenotips . entities . spi . AbstractPrimaryEntityManagerTest . PERSON_ID ) ; "<AssertPlaceHolder>" ; } get ( org . xwiki . model . reference . DocumentReference ) { try { org . xwiki . bridge . DocumentModelBridge document = this . bridge . getDocument ( reference ) ; if ( ( document == null ) || ( ( ( com . xpn . xwiki . doc . XWikiDocument ) ( document ) ) . isNew ( ) ) ) { return null ; } return load ( document ) ; } catch ( java . lang . Exception ex ) { this . logger . error ( "Failed<sp>to<sp>read<sp>document<sp>[{}]:<sp>{}" , reference , ex . getMessage ( ) ) ; } return null ; }
org . junit . Assert . assertNull ( result )
testGetOrdersByWithoutResourceMapAndWithFieldThatContainsID ( ) { java . lang . String orderByParam = "name-desc,identifier-asc,citizenCountryId-desc" ; java . lang . Object resource = new org . lnu . is . resource . person . PersonResource ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "identifier" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy3 = new org . lnu . is . pagination . OrderBy ( "citizenCountry" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > expected = java . util . Arrays . asList ( orderBy1 , orderBy2 , orderBy3 ) ; exception . expect ( org . lnu . is . web . rest . processor . resolver . order . IllegalArgumentException . class ) ; exception . expectMessage ( "Fields<sp>that<sp>contains<sp>'Id'<sp>are<sp>not<sp>supported<sp>for<sp>ordering.Please<sp>contact<sp>backend-dev<sp>team<sp>to<sp>fix<sp>this<sp>issue." ) ; java . util . List < org . lnu . is . pagination . OrderBy > actual = unit . getOrdersBy ( orderByParam , resource ) ; verify ( replacementMap ) . get ( "org.lnu.is.resource.person.PersonResource" ) ; "<AssertPlaceHolder>" ; } verify ( T ) { verifyLink ( resource ) ; if ( ( nextVerifier ) != null ) { nextVerifier . verify ( resource ) ; } }
org . junit . Assert . assertEquals ( expected , actual )
capacityViolationAfterEnd_shouldWorkWhenViolated ( ) { buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore ( ) ; com . graphhopper . jsprit . core . analysis . SolutionAnalyser analyser = new com . graphhopper . jsprit . core . analysis . SolutionAnalyser ( vrp , solution , vrp . getTransportCosts ( ) ) ; com . graphhopper . jsprit . core . problem . solution . route . VehicleRoute route = solution . getRoutes ( ) . iterator ( ) . next ( ) ; com . graphhopper . jsprit . core . problem . Capacity cap = analyser . getCapacityViolationAfterActivity ( route . getEnd ( ) , route ) ; "<AssertPlaceHolder>" ; } get ( com . graphhopper . jsprit . core . problem . solution . route . VehicleRoute ) { return com . graphhopper . jsprit . core . algorithm . state . Arrays . asList ( route . getVehicle ( ) ) ; }
org . junit . Assert . assertEquals ( 5 , cap . get ( 0 ) )
shouldAddMultipleRecordsForMergedHostUsages ( ) { usageRefactorService . batchCreateLoadBalancerMergedHostUsages ( mergedUsageList ) ; java . util . List < org . openstack . atlas . service . domain . usage . entities . LoadBalancerMergedHostUsage > map = mergedUsageRepository . getAllUsageRecordsInOrder ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
org . junit . Assert . assertTrue ( ( ( map . size ( ) ) == 2 ) )
test_minusMinor_zero ( ) { org . joda . money . BigMoney test = org . joda . money . TestBigMoney . GBP_2_34 . minusMinor ( 0 ) ; "<AssertPlaceHolder>" ; } minusMinor ( long ) { return with ( money . minusMinor ( amountToSubtract ) ) ; }
org . junit . Assert . assertSame ( org . joda . money . TestBigMoney . GBP_2_34 , test )
test_TargetHelp ( ) { de . vandermeer . svg2vector . applications . fh . Svg2Vector_FH app = new de . vandermeer . svg2vector . applications . fh . Svg2Vector_FH ( ) ; java . lang . String [ ] args = new java . lang . String [ ] { "--help" , "target" } ; "<AssertPlaceHolder>" ; } executeApplication ( java . lang . String [ ] ) { int ret = super . executeApplication ( args ) ; if ( ret != 0 ) { return ret ; } de . vandermeer . svg2vector . applications . base . SvgTargets target = this . getProps ( ) . getTarget ( ) ; java . lang . String fn = this . optionInkscapeExec . getValue ( ) ; if ( ( ret = this . checkIsExecutable ( fn ) ) < 0 ) { return ret ; } this . printDetailMessage ( ( "Inkscape<sp>exec:<sp>" + fn ) ) ; this . setWarnings ( target ) ; de . vandermeer . svg2vector . applications . is . IsCmd isCmd = new de . vandermeer . svg2vector . applications . is . IsCmd ( fn , target , this . getProps ( ) ) ; isCmd . appendTargetSettings ( target , this . optionExpDpi , this . optionExpPdfver , this . optionExpPslevel ) ; de . vandermeer . svg2vector . applications . is . IsCmd isTmpCmd = new de . vandermeer . svg2vector . applications . is . IsCmd ( fn , de . vandermeer . svg2vector . applications . base . SvgTargets . svg , this . getProps ( ) ) ; if ( this . optionSvgFirst . inCli ( ) ) { this . printProgressMessage ( "converting<sp>to<sp>temporary<sp>SVG<sp>first" ) ; this . printDetailMessage ( ( "Inkscape<sp>cmd<sp>tmp:<sp>" + isTmpCmd ) ) ; } else { this . printProgressMessage ( "converting<sp>directly<sp>to<sp>target" ) ; this . printDetailMessage ( ( "Inkscape<sp>cmd:<sp>" + isCmd ) ) ; } ret = this . createTempArtifacts ( isTmpCmd ) ; if ( ret < 0 ) { return ret ; } ret = this . convertInput ( isCmd , target ) ; if ( ret < 0 ) { return ret ; } this . removeTempArtifacts ( ) ; this . printProgressMessage ( "finished<sp>successfully" ) ; return 0 ; }
org . junit . Assert . assertEquals ( 1 , app . executeApplication ( args ) )
checkForCertChanges ( ) { org . zeromq . TestUtils . cleanupDir ( org . zeromq . ZCertStoreTest . CERTSTORE_LOCATION ) ; assert ( certStore . getAmountCertificates ( ) ) == 0 ; org . zeromq . ZCert cert1 = new org . zeromq . ZCert ( ) ; cert1 . savePublic ( ( ( org . zeromq . ZCertStoreTest . CERTSTORE_LOCATION ) + "/c1.cert" ) ) ; org . zeromq . ZCert cert2 = new org . zeromq . ZCert ( ) ; cert2 . saveSecret ( ( ( org . zeromq . ZCertStoreTest . CERTSTORE_LOCATION ) + "/sub/c2.cert" ) ) ; assert ( certStore . getAmountCertificates ( ) ) == 2 ; "<AssertPlaceHolder>" ; org . zeromq . TestUtils . sleep ( 1000 ) ; cert1 = new org . zeromq . ZCert ( ) ; cert1 . savePublic ( ( ( org . zeromq . ZCertStoreTest . CERTSTORE_LOCATION ) + "/c1.cert" ) ) ; assert certStore . checkCertFolderForChanges ( ) ; org . zeromq . TestUtils . sleep ( 1000 ) ; cert2 . savePublic ( ( ( org . zeromq . ZCertStoreTest . CERTSTORE_LOCATION ) + "/sub/c2.cert" ) ) ; assert certStore . checkCertFolderForChanges ( ) ; } saveSecret ( java . lang . String ) { org . zeromq . ZConfig zconf = new org . zeromq . ZConfig ( "root" , null ) ; metaToZConfig ( metadata , zconf ) ; zconf . addComment ( "<sp>ZeroMQ<sp>CURVE<sp>**Secret**<sp>Certificate" ) ; zconf . addComment ( "<sp>DO<sp>NOT<sp>PROVIDE<sp>THIS<sp>FILE<sp>TO<sp>OTHER<sp>USERS<sp>nor<sp>change<sp>its<sp>permissions." ) ; zconf . putValue ( "/curve/public-key" , public_txt ) ; zconf . putValue ( "/curve/secret-key" , secret_txt ) ; zconf . save ( filename ) ; }
org . junit . Assert . assertFalse ( certStore . checkCertFolderForChanges ( ) )
test_at_011_2_Local_AlocationWithJDL ( ) { org . ourgrid . deployer . xmpp . XMPPAccount user = req_101_Util . createLocalUser ( "user011" , "server011" , "011011" ) ; peerComponent = req_010_Util . startPeer ( ) ; java . lang . String brokerPubKey = "publicKeyA" ; org . ourgrid . common . interfaces . control . PeerControl peerControl = peerAcceptanceUtil . getPeerControl ( ) ; org . ourgrid . common . interfaces . control . PeerControlClient peerControlClient = org . easymock . classextension . EasyMock . createMock ( org . ourgrid . common . interfaces . control . PeerControlClient . class ) ; br . edu . ufcg . lsd . commune . identification . DeploymentID pccID = new br . edu . ufcg . lsd . commune . identification . DeploymentID ( new br . edu . ufcg . lsd . commune . identification . ContainerID ( "peerClient" , "peerClientServer" , "broker" ) , "broker" ) ; br . edu . ufcg . lsd . commune . testinfra . AcceptanceTestUtil . publishTestObject ( peerComponent , pccID , peerControlClient , org . ourgrid . common . interfaces . control . PeerControlClient . class ) ; try { peerControl . addUser ( peerControlClient , ( ( ( user . getUsername ( ) ) + "@" ) + ( user . getServerAddress ( ) ) ) ) ; } catch ( br . edu . ufcg . lsd . commune . CommuneRuntimeException e ) { } org . ourgrid . common . specification . worker . WorkerSpecification workerSpecA = workerAcceptanceUtil . createClassAdWorkerSpec ( "peerClientServer" 0 , "peerClientServer" 1 , null , null ) ; java . lang . String workerAPubKey = "publicKeyWorkerA" ; br . edu . ufcg . lsd . commune . identification . DeploymentID workerADeploymentID = req_019_Util . createAndPublishWorkerManagement ( peerComponent , workerSpecA , workerAPubKey ) ; req_010_Util . workerLogin ( peerComponent , workerSpecA , workerADeploymentID ) ; req_025_Util . changeWorkerStatusToIdle ( peerComponent , workerADeploymentID ) ; br . edu . ufcg . lsd . commune . identification . DeploymentID lwpcOID = req_108_Util . login ( peerComponent , user , brokerPubKey ) ; org . ourgrid . common . interfaces . LocalWorkerProviderClient lwpc = ( ( org . ourgrid . common . interfaces . LocalWorkerProviderClient ) ( br . edu . ufcg . lsd . commune . testinfra . AcceptanceTestUtil . getBoundObject ( lwpcOID ) ) ) ; org . ourgrid . acceptance . util . WorkerAllocation allocation = new org . ourgrid . acceptance . util . WorkerAllocation ( workerADeploymentID ) ; org . ourgrid . common . interfaces . to . RequestSpecification spec = new org . ourgrid . common . interfaces . to . RequestSpecification ( 0 , new org . ourgrid . common . specification . job . JobSpecification ( "label" ) , 1 , org . ourgrid . acceptance . peer . PeerAcceptanceTestCase . buildRequirements ( null , null , null , null ) , 1 , 0 , 0 ) ; req_011_Util . requestForLocalConsumer ( peerComponent , new br . edu . ufcg . lsd . commune . testinfra . util . TestStub ( lwpcOID , lwpc ) , spec , allocation ) ; "<AssertPlaceHolder>" ; org . ourgrid . common . interfaces . to . UserInfo userInfo1 = new org . ourgrid . common . interfaces . to . UserInfo ( user . getUsername ( ) , user . getServerAddress ( ) , brokerPubKey , org . ourgrid . common . interfaces . to . UserState . CONSUMING ) ; java . util . List < org . ourgrid . common . interfaces . to . UserInfo > usersInfo = br . edu . ufcg . lsd . commune . testinfra . AcceptanceTestUtil . createList ( userInfo1 ) ; req_106_Util . getUsersStatus ( usersInfo ) ; org . ourgrid . common . interfaces . to . WorkerInfo workerInfoA = new org . ourgrid . common . interfaces . to . WorkerInfo ( workerSpecA , org . ourgrid . common . interfaces . to . LocalWorkerState . IN_USE , lwpcOID . getServiceID ( ) . toString ( ) ) ; java . util . List < org . ourgrid . common . interfaces . to . WorkerInfo > localWorkersInfo = br . edu . ufcg . lsd . commune . testinfra . AcceptanceTestUtil . createList ( workerInfoA ) ; req_036_Util . getLocalWorkersStatus ( localWorkersInfo ) ; } isPeerInterestedOnBroker ( br . edu . ufcg . lsd . commune . identification . ServiceID ) { br . edu . ufcg . lsd . commune . container . ObjectDeployment deployment = getContainerObject ( application , org . ourgrid . acceptance . util . LOCAL_WORKER_PROVIDER ) ; return br . edu . ufcg . lsd . commune . testinfra . AcceptanceTestUtil . isInterested ( application , workerProviderClientID , deployment . getDeploymentID ( ) ) ; }
org . junit . Assert . assertTrue ( peerAcceptanceUtil . isPeerInterestedOnBroker ( lwpcOID . getServiceID ( ) ) )
shouldExecuteSelectAllAuthorsUsingMapperClassThatReturnsAnArray ( ) { org . apache . ibatis . session . SqlSession session = org . apache . ibatis . session . SqlSessionTest . sqlMapper . openSession ( ) ; try { org . apache . ibatis . domain . blog . mappers . AuthorMapper mapper = session . getMapper ( org . apache . ibatis . domain . blog . mappers . AuthorMapper . class ) ; org . apache . ibatis . domain . blog . Author [ ] authors = mapper . selectAllAuthorsArray ( ) ; "<AssertPlaceHolder>" ; } finally { session . close ( ) ; } } getMapper ( java . lang . Class ) { return configuration . < T > getMapper ( type , this ) ; }
org . junit . Assert . assertEquals ( 2 , authors . length )
lsar_SingleLsarEnumerateAccountsWithUserRightResponse ( ) { com . rapid7 . client . dcerpc . mslsad . messages . LsarEnumerateAccountsWithUserRightResponse response = new com . rapid7 . client . dcerpc . mslsad . messages . LsarEnumerateAccountsWithUserRightResponse ( ) ; java . lang . String hexString = "0100000000000200010000000400020005000000010500000000000500000000000000000000000000000000f501000000000000" ; response . unmarshal ( getPacketInput ( hexString ) ) ; com . rapid7 . client . dcerpc . objects . RPCSID expectedSid = new com . rapid7 . client . dcerpc . objects . RPCSID ( ) ; expectedSid . setRevision ( ( ( char ) ( 1 ) ) ) ; expectedSid . setIdentifierAuthority ( new byte [ ] { 0 , 0 , 0 , 0 , 0 , 5 } ) ; expectedSid . setSubAuthority ( new long [ ] { 0 , 0 , 0 , 0 , 501 } ) ; com . rapid7 . client . dcerpc . objects . RPCSID [ ] sids = response . getSids ( ) ; "<AssertPlaceHolder>" ; } getSids ( ) { return sids ; }
org . junit . Assert . assertEquals ( expectedSid , sids [ 0 ] )
should_return_false_if_Collection_has_elements ( ) { java . util . Collection < java . lang . String > c = org . fest . util . Lists . newArrayList ( "Frodo" ) ; "<AssertPlaceHolder>" ; } isNullOrEmpty ( org . fest . util . Collection ) { return ( c == null ) || ( c . isEmpty ( ) ) ; }
org . junit . Assert . assertFalse ( org . fest . util . Collections . isNullOrEmpty ( c ) )
testCase7 ( ) { cern . c2mon . client . core . tag . TagController tagController = new cern . c2mon . client . core . tag . TagController ( cern . c2mon . client . core . tag . TagControllerIsValidUpdateTest . TAG_ID ) ; cern . c2mon . client . core . tag . utils . TestTagUpdate tagValueUpdate_1 = cern . c2mon . client . core . tag . utils . TestTagUpdate . create ( ) ; tagValueUpdate_1 . setServerTimestamp ( cern . c2mon . client . core . tag . TagControllerIsValidUpdateTest . CURRENT_TIME ) ; tagValueUpdate_1 . setDaqTimestamp ( cern . c2mon . client . core . tag . TagControllerIsValidUpdateTest . CURRENT_TIME ) ; tagValueUpdate_1 . setSourceTimestamp ( null ) ; cern . c2mon . client . core . tag . utils . TestTagUpdate tagValueUpdate_2 = cern . c2mon . client . core . tag . utils . TestTagUpdate . create ( ) ; tagValueUpdate_2 . setServerTimestamp ( cern . c2mon . client . core . tag . TagControllerIsValidUpdateTest . CURRENT_TIME ) ; tagValueUpdate_2 . setDaqTimestamp ( cern . c2mon . client . core . tag . TagControllerIsValidUpdateTest . CURRENT_TIME ) ; tagValueUpdate_2 . setSourceTimestamp ( null ) ; tagController . onUpdate ( tagValueUpdate_1 ) ; final boolean status = tagController . isValidUpdate ( tagValueUpdate_2 ) ; "<AssertPlaceHolder>" ; } isValidUpdate ( cern . c2mon . shared . client . tag . TagValueUpdate ) { if ( ( tagValueUpdate != null ) && ( tagValueUpdate . getId ( ) . equals ( tagImpl . getId ( ) ) ) ) { if ( ( tagValueUpdate . getServerTimestamp ( ) ) == null ) { return false ; } final long newServerTime = tagValueUpdate . getServerTimestamp ( ) . getTime ( ) ; final long oldServerTime = tagImpl . getServerTimestamp ( ) . getTime ( ) ; if ( newServerTime > oldServerTime ) { return true ; } if ( ( newServerTime == oldServerTime ) && ( ( tagValueUpdate . getDaqTimestamp ( ) ) != null ) ) { final long newDaqTime = tagValueUpdate . getDaqTimestamp ( ) . getTime ( ) ; if ( ( tagImpl . getDaqTimestamp ( ) ) == null ) { return true ; } final long oldDaqTime = tagImpl . getDaqTimestamp ( ) . getTime ( ) ; if ( newDaqTime > oldDaqTime ) { return true ; } else if ( ( newDaqTime == oldDaqTime ) && ( ( tagValueUpdate . getSourceTimestamp ( ) ) != null ) ) { final long newSourceTime = tagValueUpdate . getSourceTimestamp ( ) . getTime ( ) ; if ( ( tagImpl . getSourceTimestamp ( ) ) == null ) { return true ; } final long oldSourceTime = tagImpl . getSourceTimestamp ( ) . getTime ( ) ; if ( ( tagValueUpdate instanceof cern . c2mon . shared . client . tag . TagUpdate ) || ( newSourceTime != oldSourceTime ) ) { return true ; } } else if ( ( ( tagValueUpdate instanceof cern . c2mon . shared . client . tag . TagUpdate ) && ( newDaqTime == oldDaqTime ) ) && ( ( tagImpl . getSourceTimestamp ( ) ) == null ) ) { return true ; } } } return false ; }
org . junit . Assert . assertTrue ( ( status == true ) )
head_A$ ( ) { java . lang . String actual = com . m3 . scalaflavor4j . IndexedSeq . apply ( list ) . head ( ) ; java . lang . String expected = "foo" ; "<AssertPlaceHolder>" ; } head ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . Seq . apply ( 1 , 2 , 3 ) ; java . lang . Integer h = seq . head ( ) ; org . junit . Assert . assertThat ( h , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 1 ) ) ) ; com . m3 . scalaflavor4j . Option < java . lang . Integer > hopt = seq . headOption ( ) ; org . junit . Assert . assertThat ( hopt . isDefined ( ) , org . hamcrest . CoreMatchers . is ( true ) ) ; org . junit . Assert . assertThat ( hopt . getOrNull ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 1 ) ) ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
testPawnCaptures1 ( ) { barrysw19 . calculon . engine . BitBoard board = barrysw19 . calculon . notation . FENUtils . getBoard ( "3k4/8/3p4/5P2/4P3/8/8/3K4<sp>w<sp>-<sp>-<sp>0<sp>1" ) ; barrysw19 . calculon . engine . PieceMoveGenerator generator = new barrysw19 . calculon . engine . PawnCaptureGenerator ( ) ; barrysw19 . calculon . engine . List < barrysw19 . calculon . engine . BitBoard . BitBoardMove > moves = new barrysw19 . calculon . engine . ArrayList ( ) ; barrysw19 . calculon . engine . BitBoardTest . generateMoves ( generator , board , moves ) ; "<AssertPlaceHolder>" ; } generateMoves ( barrysw19 . calculon . engine . PieceMoveGenerator , barrysw19 . calculon . engine . BitBoard , java . util . List ) { for ( java . util . Iterator < barrysw19 . calculon . engine . BitBoard . BitBoardMove > iter = generator . iterator ( new barrysw19 . calculon . engine . MoveGeneratorImpl . MoveGeneratorContext ( bitBoard ) ) ; iter . hasNext ( ) ; ) { moves . add ( iter . next ( ) ) ; } return moves ; }
org . junit . Assert . assertEquals ( 0 , moves . size ( ) )
shouldAddStringParamToAnExistingJob ( ) { jenkinsRule . getInstance ( ) . createProject ( hudson . model . FreeStyleProject . class , "TestCreateJob" ) ; jenkinsServer . addStringParam ( com . offbytwo . jenkins . integration . JenkinsClientIT . TEST_CREATE_JOB , "paramTest2" , "Desc" , "1" ) ; com . offbytwo . jenkins . model . JobWithDetails testCreateJob = jenkinsServer . getJob ( com . offbytwo . jenkins . integration . JenkinsClientIT . TEST_CREATE_JOB ) ; "<AssertPlaceHolder>" ; } getJob ( java . lang . String ) { return jobs . stream ( ) . map ( SET_CLIENT ( this . client ) ) . filter ( ( item ) -> item . getName ( ) . equals ( name ) ) . findAny ( ) . orElseThrow ( ( ) -> new java . lang . IllegalArgumentException ( ( ( "Job<sp>with<sp>name<sp>" + name ) + "<sp>does<sp>not<sp>exist." ) ) ) ; }
org . junit . Assert . assertNotNull ( testCreateJob )
testCoveredByCRS ( ) { org . locationtech . jts . geom . GeometryFactory fact = new org . locationtech . jts . geom . GeometryFactory ( ) ; final org . locationtech . jts . geom . LinearRing ring = fact . createLinearRing ( new org . locationtech . jts . geom . Coordinate [ ] { new org . locationtech . jts . geom . Coordinate ( 0.0 , 0.0 ) , new org . locationtech . jts . geom . Coordinate ( 0.0 , 10.0 ) , new org . locationtech . jts . geom . Coordinate ( 5.0 , 10.0 ) , new org . locationtech . jts . geom . Coordinate ( 5.0 , 0.0 ) , new org . locationtech . jts . geom . Coordinate ( 0.0 , 0.0 ) } ) ; final org . locationtech . jts . geom . Geometry geom1 = fact . createPolygon ( ring , null ) ; org . opengis . referencing . crs . CoordinateReferenceSystem crs1 = CommonCRS . WGS84 . geographic ( ) ; org . geotoolkit . geometry . jts . JTS . setCRS ( geom1 , crs1 ) ; org . locationtech . jts . geom . Geometry geom2 = fact . createPoint ( new org . locationtech . jts . geom . Coordinate ( 5 , 5 ) ) ; org . opengis . referencing . crs . CoordinateReferenceSystem crs2 = org . apache . sis . referencing . CRS . forCode ( "EPSG:2154" ) ; org . geotoolkit . geometry . jts . JTS . setCRS ( geom2 , crs2 ) ; final org . geotoolkit . process . ProcessDescriptor desc = org . geotoolkit . process . ProcessFinder . getProcessDescriptor ( GeotkProcessingRegistry . NAME , "jts:coveredBy" ) ; final org . opengis . parameter . ParameterValueGroup in = desc . getInputDescriptor ( ) . createValue ( ) ; in . parameter ( "geom1" ) . setValue ( geom1 ) ; in . parameter ( "geom2" ) . setValue ( geom2 ) ; final org . geotoolkit . process . Process proc = desc . createProcess ( in ) ; final java . lang . Boolean result = ( ( java . lang . Boolean ) ( proc . call ( ) . parameter ( "result" ) . getValue ( ) ) ) ; final org . opengis . referencing . operation . MathTransform mt = org . apache . sis . referencing . CRS . findOperation ( crs2 , crs1 , null ) . getMathTransform ( ) ; geom2 = org . geotoolkit . geometry . jts . JTS . transform ( geom2 , mt ) ; final java . lang . Boolean expected = geom1 . contains ( geom2 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } final org . geotoolkit . pending . demo . symbology . DemoFrame . PanelNode other = ( ( org . geotoolkit . pending . demo . symbology . DemoFrame . PanelNode ) ( obj ) ) ; if ( ( this . name ) == null ? ( other . name ) != null : ! ( this . name . equals ( other . name ) ) ) { return false ; } if ( ( ( this . candidate ) != ( other . candidate ) ) && ( ( ( this . candidate ) == null ) || ( ! ( this . candidate . equals ( other . candidate ) ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( expected . equals ( result ) )
testGetFlatHasTypeRefs ( ) { final org . kie . workbench . common . dmn . api . definition . HasTypeRef hasTypeRef1 = mock ( org . kie . workbench . common . dmn . api . definition . HasTypeRef . class ) ; final org . kie . workbench . common . dmn . api . definition . HasTypeRef hasTypeRef2 = mock ( org . kie . workbench . common . dmn . api . definition . HasTypeRef . class ) ; final org . kie . workbench . common . dmn . api . definition . HasTypeRef hasTypeRef3 = mock ( org . kie . workbench . common . dmn . api . definition . HasTypeRef . class ) ; final org . kie . workbench . common . dmn . api . definition . HasTypeRef hasTypeRef4 = mock ( org . kie . workbench . common . dmn . api . definition . HasTypeRef . class ) ; final org . kie . workbench . common . dmn . api . definition . HasTypeRef hasTypeRef5 = mock ( org . kie . workbench . common . dmn . api . definition . HasTypeRef . class ) ; final org . kie . workbench . common . dmn . api . definition . HasTypeRef hasTypeRef6 = mock ( org . kie . workbench . common . dmn . api . definition . HasTypeRef . class ) ; final java . util . List < org . kie . workbench . common . dmn . api . definition . HasTypeRef > typeRefList1 = asList ( hasTypeRef3 , hasTypeRef4 ) ; final java . util . List < org . kie . workbench . common . dmn . api . definition . HasTypeRef > typeRefList2 = asList ( hasTypeRef5 , hasTypeRef6 ) ; final java . util . List < org . kie . workbench . common . dmn . api . definition . HasTypeRefs > hasTypeRefs = asList ( hasTypeRef1 , hasTypeRef2 ) ; when ( hasTypeRef1 . getHasTypeRefs ( ) ) . thenReturn ( typeRefList1 ) ; when ( hasTypeRef2 . getHasTypeRefs ( ) ) . thenReturn ( typeRefList2 ) ; final java . util . List < org . kie . workbench . common . dmn . api . definition . HasTypeRef > actual = org . kie . workbench . common . dmn . api . definition . v1_1 . common . HasTypeRefHelper . getFlatHasTypeRefs ( hasTypeRefs ) ; final java . util . List < org . kie . workbench . common . dmn . api . definition . HasTypeRef > expected = asList ( hasTypeRef3 , hasTypeRef4 , hasTypeRef5 , hasTypeRef6 ) ; "<AssertPlaceHolder>" ; } getFlatHasTypeRefs ( java . util . List ) { return hasTypeRefList . stream ( ) . flatMap ( ( typeRefs ) -> typeRefs . getHasTypeRefs ( ) . stream ( ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testGetRequestURI ( ) { new mockit . Expectations ( ) { { vertxRequest . path ( ) ; result = "/path" ; } } ; "<AssertPlaceHolder>" ; } getRequestURI ( ) { return "/path" ; }
org . junit . Assert . assertEquals ( "/path" , request . getRequestURI ( ) )
testResolveExceptionCode_other_exception_match_rootclass ( ) { java . util . LinkedHashMap < java . lang . String , java . lang . String > exceptionMappings = new java . util . LinkedHashMap < java . lang . String , java . lang . String > ( ) ; exceptionMappings . put ( "Throwable" , "throwable001" ) ; testTarget . setExceptionMappings ( exceptionMappings ) ; java . lang . String actualExceptionCode = testTarget . resolveExceptionCode ( new org . terasoluna . gfw . common . exception . BusinessException ( org . terasoluna . gfw . common . message . ResultMessages . error ( ) ) ) ; "<AssertPlaceHolder>" ; } error ( ) { return new org . terasoluna . gfw . common . message . ResultMessages ( ERROR ) ; }
org . junit . Assert . assertThat ( actualExceptionCode , org . hamcrest . CoreMatchers . is ( "throwable001" ) )
buildConfigurationList ( ) { "<AssertPlaceHolder>" ; } getBuildConfigurationList ( ) { java . lang . String buildConfigurationListRef = getDict ( ) . getString ( "buildConfigurationList" ) ; com . sap . prd . mobile . ios . mios . xcodeprojreader . Dict buildConfigurationList = getProjectFile ( ) . getObjectByReference ( buildConfigurationListRef ) ; return new com . sap . prd . mobile . ios . mios . xcodeprojreader . BuildConfigurationList ( getProjectFile ( ) , buildConfigurationList ) ; }
org . junit . Assert . assertNotNull ( target . getBuildConfigurationList ( ) )
instantiation ( ) { org . junithelper . core . config . MessageKey target = new org . junithelper . core . config . MessageKey ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( target )
testgetOutputwthProperties ( ) { org . neuroph . util . Properties properties = new org . neuroph . util . Properties ( ) ; properties . setProperty ( "transferFunction.slope" , 1.0 ) ; properties . setProperty ( "transferFunction.yHigh" , 0.9 ) ; properties . setProperty ( "transferFunction.yLow" , 0.3 ) ; properties . setProperty ( "transferFunction.xHigh" , 0.8 ) ; properties . setProperty ( "transferFunction.xLow" , 0.6 ) ; instance = new org . neuroph . core . transfer . Ramp ( properties ) ; double result = instance . getOutput ( input ) ; "<AssertPlaceHolder>" ; } getOutput ( double ) { totalLayerInput = 0 ; double max = 0 ; for ( org . neuroph . core . Neuron neuron : layer . getNeurons ( ) ) { totalLayerInput += java . lang . Math . exp ( ( ( neuron . getNetInput ( ) ) - max ) ) ; } output = ( java . lang . Math . exp ( ( netInput - max ) ) ) / ( totalLayerInput ) ; return output ; }
org . junit . Assert . assertEquals ( expected , result , 0.0 )
testPutUnknownClass ( ) { java . net . URI fullPathKey = rest . fullPathKey ( "x" ) ; java . io . ByteArrayOutputStream bout = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream oo = new java . io . ObjectOutputStream ( bout ) ; oo . writeObject ( new org . infinispan . server . test . client . rest . AbstractRESTClientIT . TestSerializable ( "CONTENT" ) ) ; oo . flush ( ) ; byte [ ] byteData = bout . toByteArray ( ) ; rest . put ( fullPathKey , byteData , MediaType . APPLICATION_OCTET_STREAM_TYPE ) ; org . apache . http . HttpResponse resp = rest . get ( fullPathKey , null , HttpStatus . SC_OK , false , "Accept" , MediaType . APPLICATION_OCTET_STREAM_TYPE ) ; java . io . ObjectInputStream oin = new java . io . ObjectInputStream ( resp . getEntity ( ) . getContent ( ) ) ; org . infinispan . server . test . client . rest . AbstractRESTClientIT . TestSerializable ts = ( ( org . infinispan . server . test . client . rest . AbstractRESTClientIT . TestSerializable ) ( oin . readObject ( ) ) ) ; org . apache . http . util . EntityUtils . consume ( resp . getEntity ( ) ) ; "<AssertPlaceHolder>" ; } readObject ( ) { return objectInput . readObject ( ) ; }
org . junit . Assert . assertEquals ( "CONTENT" , ts . getContent ( ) )
testGetLatestStartDateRunBySequencerPartitionContainerId ( ) { uk . ac . bbsrc . tgac . miso . core . data . Run run = dao . getLatestStartDateRunBySequencerPartitionContainerId ( 1L ) ; "<AssertPlaceHolder>" ; } getLatestStartDateRunBySequencerPartitionContainerId ( long ) { currentSession ( ) . flush ( ) ; org . hibernate . Criteria criteria = currentSession ( ) . createCriteria ( uk . ac . bbsrc . tgac . miso . core . data . Run . class , "r" ) ; criteria . createAlias ( "runPositions" , "runPos" ) ; criteria . createAlias ( "runPos.container" , "spc" ) ; criteria . add ( org . hibernate . criterion . Restrictions . eq ( "spc.id" , containerId ) ) ; criteria . addOrder ( org . hibernate . criterion . Order . desc ( "startDate" ) ) ; criteria . setMaxResults ( 1 ) ; return ( ( uk . ac . bbsrc . tgac . miso . core . data . Run ) ( criteria . uniqueResult ( ) ) ) ; }
org . junit . Assert . assertNotNull ( run )
testBuildWithFullEntity ( ) { org . lnu . is . domain . admin . unit . AdminUnit parent = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; org . lnu . is . domain . admin . unit . type . AdminUnitType adminUnitType = new org . lnu . is . domain . admin . unit . type . AdminUnitType ( ) ; java . lang . String identifier = "identifgier" ; java . lang . String identifier1 = "identifier1" ; java . lang . String identifier2 = "identifeir2" ; java . lang . String identifier3 = "identifier3" ; java . lang . String name = "ndasdsa" ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; org . lnu . is . domain . admin . unit . AdminUnit context = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; context . setAdminUnitType ( adminUnitType ) ; context . setParent ( parent ) ; context . setIdentifier ( identifier ) ; context . setIdentifier1 ( identifier1 ) ; context . setIdentifier2 ( identifier2 ) ; context . setIdentifier3 ( identifier3 ) ; context . setName ( name ) ; context . setBegDate ( begDate ) ; context . setEndDate ( endDate ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>AdminUnit<sp>e<sp>WHERE<sp>(<sp>e.adminUnitType<sp>=<sp>:adminUnitType<sp>AND<sp>e.parent<sp>=<sp>:parent<sp>AND<sp>e.identifier<sp>LIKE<sp>CONCAT('%',:identifier,'%')<sp>AND<sp>e.identifier1<sp>LIKE<sp>CONCAT('%',:identifier1,'%')<sp>AND<sp>e.identifier2<sp>LIKE<sp>CONCAT('%',:identifier2,'%')<sp>AND<sp>e.identifier3<sp>LIKE<sp>CONCAT('%',:identifier3,'%')<sp>AND<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>AND<sp>e.begDate<sp><=<sp>:begDate<sp>AND<sp>e.endDate<sp>>=<sp>:endDate<sp>)<sp>AND<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . admin . unit . AdminUnit > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expected , actualQuery )
deveObterOrgaoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . NFInfoEventoRetorno eventoRetorno = new com . fincatto . documentofiscal . nfe310 . classes . evento . NFInfoEventoRetorno ( ) ; final com . fincatto . documentofiscal . DFUnidadeFederativa unidadeFederativa = com . fincatto . documentofiscal . DFUnidadeFederativa . AC ; eventoRetorno . setOrgao ( unidadeFederativa ) ; "<AssertPlaceHolder>" ; } getOrgao ( ) { return this . orgao ; }
org . junit . Assert . assertEquals ( unidadeFederativa , eventoRetorno . getOrgao ( ) )
testFromCSV ( ) { final java . util . List < java . lang . String > values = org . constretto . internal . ConstrettoUtils . fromCSV ( ( ( ( org . constretto . internal . ConstrettoUtilsTest . VALUE_ONE ) + "," ) + ( org . constretto . internal . ConstrettoUtilsTest . VALUE_TWO ) ) ) ; "<AssertPlaceHolder>" ; } fromCSV ( java . lang . String ) { org . constretto . internal . List < java . lang . String > elements = new org . constretto . internal . ArrayList < java . lang . String > ( ) ; for ( java . lang . String element : csv . split ( "," ) ) elements . add ( element ) ; return elements ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( org . constretto . internal . ConstrettoUtilsTest . VALUE_ONE , org . constretto . internal . ConstrettoUtilsTest . VALUE_TWO ) , values )
testAuthorizationWithNoScopes ( ) { java . lang . String state = org . apache . commons . lang . RandomStringUtils . randomAlphabetic ( 10 ) ; java . lang . String key = org . apache . commons . lang . RandomStringUtils . randomAlphabetic ( 10 ) ; java . lang . String secret = org . apache . commons . lang . RandomStringUtils . randomAlphabetic ( 10 ) ; com . adobe . acs . commons . social . linkedin . LinkedInApi20 api = new com . adobe . acs . commons . social . linkedin . LinkedInApi20 ( state ) ; org . scribe . oauth . OAuthService service = new org . scribe . builder . ServiceBuilder ( ) . provider ( api ) . apiKey ( key ) . apiSecret ( secret ) . callback ( "http://localhost:4502/linkedin" ) . build ( ) ; java . lang . String expected = ( ( ( ( "https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=" + key ) + "&state=" ) + state ) + "&redirect_uri=" ) + ( org . scribe . utils . OAuthEncoder . encode ( "http://localhost:4502/linkedin" ) ) ; "<AssertPlaceHolder>" ; } getAuthorizationUrl ( org . scribe . model . OAuthConfig ) { org . scribe . utils . Preconditions . checkValidUrl ( config . getCallback ( ) , "Must<sp>provide<sp>a<sp>valid<sp>url<sp>as<sp>callback.<sp>LinkedIn<sp>does<sp>not<sp>support<sp>Out<sp>Of<sp>Band<sp>Auth." ) ; if ( config . hasScope ( ) ) { return java . lang . String . format ( com . adobe . acs . commons . social . linkedin . LinkedInApi20 . SCOPED_AUTHORIZE_URL , config . getApiKey ( ) , org . scribe . utils . OAuthEncoder . encode ( state ) , org . scribe . utils . OAuthEncoder . encode ( config . getCallback ( ) ) , org . scribe . utils . OAuthEncoder . encode ( config . getScope ( ) ) ) ; } else { return java . lang . String . format ( com . adobe . acs . commons . social . linkedin . LinkedInApi20 . AUTHORIZE_URL , config . getApiKey ( ) , org . scribe . utils . OAuthEncoder . encode ( state ) , org . scribe . utils . OAuthEncoder . encode ( config . getCallback ( ) ) ) ; } }
org . junit . Assert . assertEquals ( expected , service . getAuthorizationUrl ( null ) )
testParseEmptyAttribute ( ) { final io . netty . buffer . ByteBuf actual = io . netty . buffer . Unpooled . buffer ( ) ; org . opendaylight . protocol . bgp . parser . spi . pojo . ServiceLoaderBGPExtensionProviderContext . getSingletonInstance ( ) . getAttributeRegistry ( ) . serializeAttribute ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . message . rev180329 . path . attributes . AttributesBuilder ( ) . setMultiExitDisc ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . message . rev180329 . path . attributes . attributes . MultiExitDiscBuilder ( ) . build ( ) ) . build ( ) , actual ) ; "<AssertPlaceHolder>" ; } serializeAttribute ( org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . message . rev180329 . path . attributes . Attributes , io . netty . buffer . ByteBuf ) { for ( final org . opendaylight . protocol . bgp . parser . spi . AttributeSerializer serializer : this . roSerializers . get ( ) ) { serializer . serializeAttribute ( attribute , byteAggregator ) ; } }
org . junit . Assert . assertEquals ( io . netty . buffer . Unpooled . buffer ( ) , actual )
testFromJsonObjectNoData ( ) { javax . json . JsonObject jsonObject = javax . json . Json . createObjectBuilder ( ) . build ( ) ; edu . wpi . rail . jrosbridge . messages . std . Int16 data = edu . wpi . rail . jrosbridge . messages . std . Int16 . fromJsonObject ( jsonObject ) ; "<AssertPlaceHolder>" ; } getData ( ) { return this . data ; }
org . junit . Assert . assertEquals ( ( ( short ) ( 0 ) ) , data . getData ( ) )
whenAnySatisfiesCondition_thenCorrect ( ) { boolean result = list . allSatisfy ( org . eclipse . collections . impl . block . factory . Predicates . greaterThan ( 0 ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( result )
extractTypeFromLoraUnknownMessage ( ) { final io . vertx . core . json . JsonObject loraMessage = org . eclipse . hono . adapter . lora . providers . LoraTestUtil . loadTestFile ( "everynet.uplink" ) ; loraMessage . put ( "type" , "bumlux" ) ; final org . eclipse . hono . adapter . lora . LoraMessageType type = this . providerPost . extractMessageType ( loraMessage ) ; "<AssertPlaceHolder>" ; } extractMessageType ( io . vertx . core . json . JsonObject ) { final java . lang . String type = loraMessage . getString ( org . eclipse . hono . adapter . lora . providers . ObjeniousProvider . FIELD_TYPE , LoraConstants . EMPTY ) ; switch ( type ) { case "join" : return org . eclipse . hono . adapter . lora . LoraMessageType . JOIN ; case "uplink" : return org . eclipse . hono . adapter . lora . LoraMessageType . UPLINK ; case "downlink" : return org . eclipse . hono . adapter . lora . LoraMessageType . DOWNLINK ; default : return org . eclipse . hono . adapter . lora . LoraMessageType . UNKNOWN ; } }
org . junit . Assert . assertEquals ( LoraMessageType . UNKNOWN , type )
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . blade . samples . servicebuilder . model . Foo > foos = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKeys ( com . liferay . blade . samples . jndiservicebuilder . service . persistence . java . util . Set ) { return com . liferay . blade . samples . jndiservicebuilder . service . persistence . RegionUtil . getPersistence ( ) . fetchByPrimaryKeys ( primaryKeys ) ; }
org . junit . Assert . assertTrue ( foos . isEmpty ( ) )
testWeb ( ) { try { java . net . URL servlet = new java . net . URL ( "http://localhost:8080" ) ; java . net . URLConnection yc = servlet . openConnection ( ) ; java . io . BufferedReader in = new java . io . BufferedReader ( new java . io . InputStreamReader ( yc . getInputStream ( ) ) ) ; java . lang . String originalLoc = servlet . toString ( ) ; System . out . println ( ( "\n<sp>Invoking<sp>url:<sp>" + ( servlet . toString ( ) ) ) ) ; if ( yc instanceof org . glassfish . tests . index . HttpURLConnection ) { org . glassfish . tests . index . HttpURLConnection urlConnection = ( ( org . glassfish . tests . index . HttpURLConnection ) ( yc ) ) ; urlConnection . setDoOutput ( true ) ; org . glassfish . tests . index . DataOutputStream out = new org . glassfish . tests . index . DataOutputStream ( urlConnection . getOutputStream ( ) ) ; out . writeByte ( 1 ) ; int responseCode = urlConnection . getResponseCode ( ) ; System . out . println ( ( ( "Response<sp>code:<sp>" + responseCode ) + "<sp>Expected<sp>code:<sp>200" ) ) ; "<AssertPlaceHolder>" ; } } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; throw e ; } } getResponseCode ( ) { return response . getStatus ( ) ; }
org . junit . Assert . assertTrue ( ( ( urlConnection . getResponseCode ( ) ) == 200 ) )
createSpringMvcPortlet ( ) { java . lang . String packageName = "test.spring.mvc.portlet.gradle" ; wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareGradle ( project . getName ( ) , com . liferay . ide . ui . portlet . tests . SPRING_MVC_PORTLET ) ; wizardAction . next ( ) ; wizardAction . newModuleInfo . preparePackageName ( packageName ) ; wizardAction . finish ( ) ; java . lang . String [ ] projectNames = new java . lang . String [ ] { com . liferay . ide . ui . portlet . tests . NewPortletModuleLiferayWorkspaceGradleTests . liferayWorkspace . getName ( ) , "wars" , project . getName ( ) } ; "<AssertPlaceHolder>" ; viewAction . project . closeAndDeleteFromDisk ( projectNames ) ; } visibleFileTry ( java . lang . String [ ] ) { try { return _getProjects ( ) . isVisible ( files ) ; } catch ( java . lang . Exception e ) { _getProjects ( ) . setFocus ( ) ; try { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - 1 ) ) ; _getProjects ( ) . expand ( parents ) ; _getProjects ( ) . contextMenu ( com . liferay . ide . ui . liferay . action . REFRESH , parents ) ; ide . sleep ( 2000 ) ; } catch ( java . lang . Exception e1 ) { } for ( int i = ( files . length ) - 1 ; i > 0 ; i -- ) { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - i ) ) ; org . eclipse . swtbot . swt . finder . widgets . SWTBotTreeItem parent = _getProjects ( ) . getTreeItem ( parents ) ; _getProjects ( ) . expand ( parents ) ; java . lang . String subnode = files [ ( ( files . length ) - i ) ] ; _jobAction . waitForSubnode ( parent , subnode , com . liferay . ide . ui . liferay . action . REFRESH ) ; } return _getProjects ( ) . isVisible ( files ) ; } }
org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( projectNames ) )
testActionNoneAndNoTx ( ) { org . mule . runtime . core . api . transaction . MuleTransactionConfig config = new org . mule . runtime . core . api . transaction . MuleTransactionConfig ( org . mule . runtime . core . api . transaction . TransactionConfig . ACTION_NONE ) ; org . mule . runtime . core . api . execution . ExecutionTemplate executionTemplate = createExecutionTemplate ( config ) ; java . lang . Object result = executionTemplate . execute ( getEmptyTransactionCallback ( ) ) ; "<AssertPlaceHolder>" ; } getEmptyTransactionCallback ( ) { return org . mule . runtime . core . api . transaction . TransactionTemplateTestUtils . getEmptyTransactionCallback ( RETURN_VALUE ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( RETURN_VALUE ) )
testRowTooLargeStart ( ) { long optimalRowsPerRange = 2L ; org . sagebionetworks . repo . model . dbo . migration . IdRangeBuilder builder = new org . sagebionetworks . repo . model . dbo . migration . IdRangeBuilder ( optimalRowsPerRange ) ; builder . addRow ( 1L , 100L ) ; builder . addRow ( 2L , 1L ) ; builder . addRow ( 3L , 1L ) ; java . util . List < org . sagebionetworks . repo . model . migration . IdRange > results = builder . collateResults ( ) ; java . util . List < org . sagebionetworks . repo . model . migration . IdRange > expected = com . google . common . collect . Lists . newArrayList ( createRange ( 1L , 2L ) , createRange ( 2L , 4L ) ) ; "<AssertPlaceHolder>" ; } createRange ( long , long ) { org . sagebionetworks . repo . model . migration . IdRange range = new org . sagebionetworks . repo . model . migration . IdRange ( ) ; range . setMinimumId ( minimumId ) ; range . setMaximumId ( maximumId ) ; return range ; }
org . junit . Assert . assertEquals ( expected , results )
testStringStore ( ) { io . cdap . cdap . proto . id . DatasetId strings = DatasetFrameworkTestUtil . NAMESPACE_ID . dataset ( "strings" ) ; createObjectStoreInstance ( strings , java . lang . String . class ) ; final io . cdap . cdap . data2 . dataset2 . lib . table . ObjectStoreDataset < java . lang . String > stringStore = io . cdap . cdap . data2 . dataset2 . lib . table . ObjectStoreDatasetTest . dsFrameworkUtil . getInstance ( strings ) ; org . apache . tephra . TransactionExecutor txnl = io . cdap . cdap . data2 . dataset2 . lib . table . ObjectStoreDatasetTest . dsFrameworkUtil . newInMemoryTransactionExecutor ( stringStore ) ; final java . lang . String string = "this<sp>is<sp>a<sp>string" ; txnl . execute ( new org . apache . tephra . TransactionExecutor . Subroutine ( ) { @ io . cdap . cdap . data2 . dataset2 . lib . table . Override public void apply ( ) throws io . cdap . cdap . data2 . dataset2 . lib . table . Exception { stringStore . write ( io . cdap . cdap . data2 . dataset2 . lib . table . ObjectStoreDatasetTest . a , string ) ; } } ) ; txnl . execute ( new org . apache . tephra . TransactionExecutor . Subroutine ( ) { @ io . cdap . cdap . data2 . dataset2 . lib . table . Override public void apply ( ) throws io . cdap . cdap . data2 . dataset2 . lib . table . Exception { java . lang . String result = stringStore . read ( io . cdap . cdap . data2 . dataset2 . lib . table . ObjectStoreDatasetTest . a ) ; "<AssertPlaceHolder>" ; } } ) ; txnl . execute ( new org . apache . tephra . TransactionExecutor . Subroutine ( ) { @ io . cdap . cdap . data2 . dataset2 . lib . table . Override public void apply ( ) throws io . cdap . cdap . data2 . dataset2 . lib . table . Exception { deleteAndVerify ( stringStore , io . cdap . cdap . data2 . dataset2 . lib . table . ObjectStoreDatasetTest . a ) ; } } ) ; io . cdap . cdap . data2 . dataset2 . lib . table . ObjectStoreDatasetTest . dsFrameworkUtil . deleteInstance ( strings ) ; } read ( java . lang . String ) { byte [ ] read = keyValueTable . read ( key ) ; return read == null ? null : io . cdap . cdap . api . common . Bytes . toLong ( read ) ; }
org . junit . Assert . assertEquals ( string , result )
deveObterNomeFantasiaComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; retorno . setNomeFantasia ( "Video<sp>locadora<sp>do<sp>Pedro" ) ; "<AssertPlaceHolder>" ; } getNomeFantasia ( ) { return this . nomeFantasia ; }
org . junit . Assert . assertEquals ( "Video<sp>locadora<sp>do<sp>Pedro" , retorno . getNomeFantasia ( ) )
testFlowDuplicateOutputIgnoreCase ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/duplicate/duplicate_flow_output_ignore_case.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . fromFile ( resource ) ) ; "<AssertPlaceHolder>" ; exception . expect ( io . cloudslang . lang . compiler . RuntimeException . class ) ; exception . expectMessage ( "For<sp>flow<sp>'duplicate_flow_output_ignore_case'<sp>syntax<sp>is<sp>illegal." ) ; exception . expectMessage ( "Duplicate<sp>output<sp>/<sp>publish<sp>value<sp>found:<sp>City" ) ; throw result . getErrors ( ) . get ( 0 ) ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) )
lockShouldReturnFalseIfTheTableIsEmpty ( ) { java . sql . Connection connection = null ; try { lock = createLock ( props ) ; truncateTable ( ) ; connection = lock ( tableName , clustername ) ; "<AssertPlaceHolder>" ; } finally { close ( connection ) ; } } lock ( ) { return acquireLock ( ) ; }
org . junit . Assert . assertFalse ( lock . lock ( ) )
parseStringTest3 ( ) { java . lang . String jsonStr = "{\"test\":\"体”、“文\"}" ; cn . hutool . json . JSONObject json = new cn . hutool . json . JSONObject ( jsonStr ) ; "<AssertPlaceHolder>" ; } getStr ( java . lang . String ) { return super . getProperty ( key ) ; }
org . junit . Assert . assertEquals ( "" , json . getStr ( "test" ) )
testRegisterJohnSmith ( ) { "<AssertPlaceHolder>" ; tryToLogin ( "JohnSmith" , "WeakPassword" ) ; } validateAndRegister ( ) { if ( useLiveValidation ( ) ) { this . registrationPage . triggerLiveValidation ( ) ; if ( ! ( this . registrationPage . getValidationFailureMessages ( ) . isEmpty ( ) ) ) { return false ; } boolean result = tryToRegister ( ) ; org . junit . Assert . assertTrue ( "LiveValidation<sp>did<sp>not<sp>show<sp>a<sp>failure<sp>message<sp>but<sp>clicking<sp>on<sp>the<sp>register<sp>button<sp>did." , this . registrationPage . getValidationFailureMessages ( ) . isEmpty ( ) ) ; return result ; } return tryToRegister ( ) ; }
org . junit . Assert . assertTrue ( validateAndRegister ( ) )
testEmpty ( ) { org . graalvm . compiler . graph . NodeMap < java . lang . Integer > emptyMap = new org . graalvm . compiler . graph . NodeMap ( graph ) ; for ( org . graalvm . compiler . graph . test . NodeMapTest . TestNode node : nodes ) { "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertEquals ( null , emptyMap . get ( node ) )
testMainNoConfig ( ) { final java . lang . String [ ] args = new java . lang . String [ ] { } ; try { nl . moderniseringgba . migratie . init . vulnaarlo3queue . Main . setSpringConfig ( "vulnaarlo3queue-test-beans.xml" ) ; nl . moderniseringgba . migratie . init . vulnaarlo3queue . Main . main ( args ) ; } catch ( final java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( "Onverwachte<sp>exception<sp>opgetreden" ) ; } "<AssertPlaceHolder>" ; } main ( java . lang . String [ ] ) { final java . util . Properties config = new java . util . Properties ( ) ; final org . apache . commons . cli . Options options = new org . apache . commons . cli . Options ( ) ; final org . apache . commons . cli . Option configOption = new org . apache . commons . cli . Option ( "Fout<sp>opgetreden<sp>bij<sp>het<sp>lezen<sp>van<sp>het<sp>config<sp>bestand<sp>of<sp>inhoud.\n" 2 , true , "configuratie<sp>(.properties)" ) ; configOption . setRequired ( true ) ; options . addOption ( configOption ) ; final org . apache . commons . cli . CommandLineParser parser = new org . apache . commons . cli . GnuParser ( ) ; try { final org . apache . commons . cli . CommandLine cmd = parser . parse ( options , args , true ) ; if ( cmd . hasOption ( configOption . getOpt ( ) ) ) { final java . lang . String configFilename = cmd . getOptionValue ( configOption . getOpt ( ) ) ; nl . moderniseringgba . migratie . init . vulnaarlo3queue . Main . LOG . info ( "Fout<sp>opgetreden<sp>bij<sp>het<sp>lezen<sp>van<sp>het<sp>config<sp>bestand<sp>of<sp>inhoud.\n" 1 , configFilename ) ; config . load ( java . lang . ClassLoader . getSystemResourceAsStream ( configFilename ) ) ; if ( config . isEmpty ( ) ) { throw new java . io . IOException ( ( ( "Configuratie<sp>file:<sp>'" + configFilename ) + "'<sp>bestaat<sp>niet." ) ) ; } } nl . moderniseringgba . migratie . init . vulnaarlo3queue . Main . LOG . info ( "Starting<sp>application<sp>context" ) ; final org . springframework . context . ConfigurableApplicationContext context = new org . springframework . context . support . ClassPathXmlApplicationContext ( nl . moderniseringgba . migratie . init . vulnaarlo3queue . Main . springConfig ) ; context . registerShutdownHook ( ) ; nl . moderniseringgba . migratie . init . vulnaarlo3queue . Main . LOG . info ( "Application<sp>started" ) ; final nl . moderniseringgba . migratie . init . vulnaarlo3queue . service . VulNaarLo3QueueService vulNaarLo3QueueService = ( ( nl . moderniseringgba . migratie . init . vulnaarlo3queue . service . VulNaarLo3QueueService ) ( context . getBean ( "vulNaarLo3QueueService" ) ) ) ; vulNaarLo3QueueService . leesIngeschrevenenInBrpEnVulQueue ( config ) ; } catch ( final org . apache . commons . cli . ParseException e ) { final org . apache . commons . cli . HelpFormatter formatter = new org . apache . commons . cli . HelpFormatter ( ) ; formatter . printHelp ( "main" , options ) ; } catch ( final java . io . IOException e ) { final org . apache . commons . cli . HelpFormatter formatter = new org . apache . commons . cli . HelpFormatter ( ) ; formatter . printHelp ( ( ( "Fout<sp>opgetreden<sp>bij<sp>het<sp>lezen<sp>van<sp>het<sp>config<sp>bestand<sp>of<sp>inhoud.\n" + ( e . getMessage ( ) ) ) + "Fout<sp>opgetreden<sp>bij<sp>het<sp>lezen<sp>van<sp>het<sp>config<sp>bestand<sp>of<sp>inhoud.\n" 0 ) , options ) ; } catch ( final nl . moderniseringgba . migratie . init . vulnaarlo3queue . java ie ) { final org . apache . commons . cli . HelpFormatter formatter = new org . apache . commons . cli . HelpFormatter ( ) ; formatter . printHelp ( ( ( "Fout<sp>opgetreden.\n" + ( ie . getMessage ( ) ) ) + "/n<sp>main" ) , options ) ; } }
org . junit . Assert . assertTrue ( "" , true )
testOpenHtml ( ) { java . lang . String endpoint = thredds . TestOnLocalServer . withHttpPath ( ( ( ( "catalog/" + ( path ) ) + ".html" ) + ( query ) ) ) ; byte [ ] response = thredds . TestOnLocalServer . getContent ( endpoint , 200 , ContentType . html ) ; "<AssertPlaceHolder>" ; thredds . server . catalog . TestTdsFCcatalogs . logger . debug ( new java . lang . String ( response , ucar . nc2 . constants . CDM . utf8Charset ) ) ; } getContent ( java . lang . String , int , thredds . util . ContentType ) { return thredds . TestOnLocalServer . getContent ( null , endpoint , new int [ ] { expectCode } , expectContentType ) ; }
org . junit . Assert . assertNotNull ( response )
twoOfThreeLabelsWasRemoved ( ) { java . util . Set < java . lang . String > localLabels = new java . util . HashSet ( ) ; localLabels . add ( org . jenkinsci . plugins . github . pullrequest . events . impl . GitHubPRLabelRemovedEventTest . TESTS_FAILURE ) ; java . util . List < org . kohsuke . github . GHLabel > remoteLabels = new java . util . ArrayList ( ) ; remoteLabels . add ( label ) ; commonExpectations ( localLabels ) ; when ( issue . getLabels ( ) ) . thenReturn ( remoteLabels ) ; when ( label . getName ( ) ) . thenReturn ( org . jenkinsci . plugins . github . pullrequest . events . impl . GitHubPRLabelRemovedEventTest . TESTS_FAILURE ) ; org . jenkinsci . plugins . github . pullrequest . events . impl . GitHubPRLabelRemovedEvent instance = new org . jenkinsci . plugins . github . pullrequest . events . impl . GitHubPRLabelRemovedEvent ( labels ) ; org . jenkinsci . plugins . github . pullrequest . GitHubPRCause cause = instance . check ( newGitHubPRDecisionContext ( ) . withPrTrigger ( trigger ) . withLocalPR ( localPR ) . withRemotePR ( remotePr ) . withListener ( listener ) . build ( ) ) ; "<AssertPlaceHolder>" ; } build ( ) { requireNonNull ( tagHandler ) ; requireNonNull ( scmSource ) ; requireNonNull ( listener ) ; return new com . github . kostyasha . github . integration . generic . GitHubTagDecisionContext ( remoteTag , localTag , localRepo , tagHandler , scmSource , listener ) ; }
org . junit . Assert . assertNull ( cause )
testClampMax ( ) { mikera . vectorz . Vector3 v = mikera . vectorz . Vector3 . of ( 1 , 2 , 3 ) ; v . clampMax ( 2.5 ) ; "<AssertPlaceHolder>" ; } of ( double , double , double ) { return new mikera . vectorz . Vector3 ( x , y , z ) ; }
org . junit . Assert . assertEquals ( mikera . vectorz . Vector3 . of ( 1 , 2 , 2.5 ) , v )
testBeanDateConverterUtils6 ( ) { org . evosuite . Properties . SELECTED_JUNIT = com . examples . with . different . packagename . testcarver . DateConverterTest6 . class . getCanonicalName ( ) ; org . evosuite . Properties . TARGET_CLASS = com . examples . with . different . packagename . testcarver . DateConverter . class . getCanonicalName ( ) ; org . evosuite . Properties . SEED_MUTATIONS = 1 ; org . evosuite . Properties . SEED_CLONE = 1 ; org . evosuite . testcase . factories . JUnitTestCarvedChromosomeFactory factory = new org . evosuite . testcase . factories . JUnitTestCarvedChromosomeFactory ( null ) ; "<AssertPlaceHolder>" ; java . lang . String code = factory . getChromosome ( ) . getTestCase ( ) . toCode ( ) ; System . out . println ( code ) ; } getNumCarvedTestCases ( ) { return junitTests . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , factory . getNumCarvedTestCases ( ) )
manageActivationProcess_VSERVERS_STOPPING_NotNormal ( ) { org . oscm . app . iaas . data . FlowState flowState = org . oscm . app . iaas . data . FlowState . VSERVERS_STOPPING ; paramHandler . getIaasContext ( ) . setVSystemStatus ( VSystemStatus . DEPLOYING ) ; doReturn ( Boolean . TRUE ) . when ( vSystemProcessor ) . checkNextStatus ( org . oscm . app . iaas . VSystemProcessorBeanTest . CONTROLLER_ID , org . oscm . app . iaas . VSystemProcessorBeanTest . INSTANCE_ID , FlowState . FINISHED , paramHandler ) ; doReturn ( Boolean . TRUE ) . when ( vSystemProcessor . vsysComm ) . getCombinedVServerState ( paramHandler , VSystemStatus . STOPPED ) ; org . oscm . app . iaas . data . FlowState newState = vSystemProcessor . manageActivationProcess ( org . oscm . app . iaas . VSystemProcessorBeanTest . CONTROLLER_ID , org . oscm . app . iaas . VSystemProcessorBeanTest . INSTANCE_ID , paramHandler , flowState ) ; "<AssertPlaceHolder>" ; } manageActivationProcess ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState ) { boolean vSysInNormalState = VSystemStatus . NORMAL . equals ( paramHandler . getIaasContext ( ) . getVSystemStatus ( ) ) ; if ( ! vSysInNormalState ) { return null ; } org . oscm . app . iaas . data . FlowState newState = null ; switch ( flowState ) { case VSYSTEM_ACTIVATION_REQUESTED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STARTING , paramHandler ) ) { vsysComm . startVServers ( paramHandler ) ; paramHandler . setVserverToBeStarted ( new java . util . ArrayList < java . lang . String > ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } break ; case VSYSTEM_DEACTIVATION_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STOPPING , paramHandler ) ) { java . util . List < java . lang . String > stoppedServers = vsysComm . stopAllVServers ( paramHandler ) ; paramHandler . setVserverToBeStarted ( stoppedServers ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVERS_STOPPING ; } break ; case VSERVERS_STOPPING : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { if ( vsysComm . getCombinedVServerState ( paramHandler , VSystemStatus . STOPPED ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } } break ; default : } return newState ; }
org . junit . Assert . assertNull ( newState )
testStartWithMiddle ( ) { plugin . minLength = 3 ; java . util . List < com . worksap . nlp . sudachi . LatticeNode > path = getPath ( "" ) ; "<AssertPlaceHolder>" ; } size ( ) { return lexicons . stream ( ) . mapToInt ( Lexicon :: size ) . sum ( ) ; }
org . junit . Assert . assertEquals ( 1 , path . size ( ) )
testFromIsNotInWorld ( ) { when ( iwm . inWorld ( any ( org . bukkit . World . class ) ) ) . thenReturn ( false ) ; when ( iwm . inWorld ( any ( org . bukkit . Location . class ) ) ) . thenReturn ( false ) ; new world . bentobox . bentobox . listeners . flags . worldsettings . LiquidsFlowingOutListener ( ) . onLiquidFlow ( event ) ; "<AssertPlaceHolder>" ; } isCancelled ( ) { return cancelled ; }
org . junit . Assert . assertFalse ( event . isCancelled ( ) )
testSimpleLimit3 ( ) { com . orientechnologies . orient . core . sql . executor . OResultSet qResult = com . orientechnologies . orient . graph . sql . OMatchStatementExecutionNewTest . db . query ( "match<sp>{class:Person,<sp>as:<sp>person,<sp>where:<sp>(name<sp>=<sp>'n1'<sp>or<sp>name<sp>=<sp>'n2')}<sp>return<sp>person<sp>limit<sp>3" ) ; for ( int i = 0 ; i < 2 ; i ++ ) { "<AssertPlaceHolder>" ; qResult . next ( ) ; } qResult . close ( ) ; } hasNext ( ) { return this . itty . hasNext ( ) ; }
org . junit . Assert . assertTrue ( qResult . hasNext ( ) )
intendedRecipientTest ( ) { org . marc . everest . rmim . uv . cdar2 . pocd_mt000040uv . IntendedRecipient intendedRecipient = clinicalDocument . getInformationRecipient ( ) . get ( 0 ) . getIntendedRecipient ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
org . junit . Assert . assertNotNull ( intendedRecipient )
testHeaders ( ) { de . sstoehr . harreader . model . HarRequest request = new de . sstoehr . harreader . model . HarRequest ( ) ; request . setHeaders ( null ) ; "<AssertPlaceHolder>" ; } getHeaders ( ) { if ( ( headers ) == null ) { headers = new java . util . ArrayList ( ) ; } return headers ; }
org . junit . Assert . assertNotNull ( request . getHeaders ( ) )
testStreamRangeClosedStartGreaterThanEnd ( ) { "<AssertPlaceHolder>" ; } rangeClosed ( int , int ) { if ( startInclusive > endInclusive ) { return com . annimon . stream . IntStream . empty ( ) ; } else if ( startInclusive == endInclusive ) { return com . annimon . stream . IntStream . of ( startInclusive ) ; } else { return new com . annimon . stream . IntStream ( new com . annimon . stream . IntRangeClosed ( startInclusive , endInclusive ) ) ; } }
org . junit . Assert . assertThat ( com . annimon . stream . IntStream . rangeClosed ( 5 , 1 ) . count ( ) , org . hamcrest . CoreMatchers . is ( 0L ) )
fileSizeDecreasesAfterResize ( ) { java . io . File sourceFile = new java . io . File ( "src/test/resources/Thumbnailator/grid.png" ) ; java . io . File f = new java . io . File ( "src/test/resources/Thumbnailator/tmp-grid.png" ) ; net . coobird . thumbnailator . TestUtils . copyFile ( sourceFile , f ) ; long fileSizeBefore = f . length ( ) ; net . coobird . thumbnailator . Thumbnails . of ( f ) . size ( 100 , 100 ) . toFile ( f ) ; long fileSizeAfter = f . length ( ) ; f . delete ( ) ; "<AssertPlaceHolder>" ; } size ( int , int ) { if ( width < 0 ) { throw new java . lang . IllegalArgumentException ( "Width<sp>must<sp>be<sp>greater<sp>than<sp>0." ) ; } if ( height < 0 ) { throw new java . lang . IllegalArgumentException ( "Height<sp>must<sp>be<sp>greater<sp>than<sp>0." ) ; } this . width = width ; this . height = height ; return this ; }
org . junit . Assert . assertTrue ( ( fileSizeAfter < fileSizeBefore ) )
testClampWithIntegerValueInRange ( ) { "<AssertPlaceHolder>" ; } clamp ( int , int , int ) { if ( min > max ) { return au . gov . ga . worldwind . common . util . Util . clamp ( value , max , min ) ; } return java . lang . Math . max ( min , java . lang . Math . min ( max , value ) ) ; }
org . junit . Assert . assertEquals ( 7 , au . gov . ga . worldwind . common . util . Util . clamp ( 7 , 5 , 10 ) )
testFlattenObject ( ) { nom . tam . util . test . ArrayFuncsTest . Thing [ ] [ ] [ ] test = new nom . tam . util . test . ArrayFuncsTest . Thing [ 2 ] [ 3 ] [ 4 ] ; nom . tam . util . test . ArrayFuncsTest . Thing [ ] expected = new nom . tam . util . test . ArrayFuncsTest . Thing [ 24 ] ; int count = 0 ; for ( int index1 = 0 ; index1 < ( test . length ) ; index1 ++ ) { for ( int index2 = 0 ; index2 < ( test [ index1 ] . length ) ; index2 ++ ) { for ( int index3 = 0 ; index3 < ( test [ index1 ] [ index2 ] . length ) ; index3 ++ ) { expected [ count ] = new nom . tam . util . test . ArrayFuncsTest . Thing ( count ) ; test [ index1 ] [ index2 ] [ index3 ] = expected [ count ] ; count ++ ; } } } nom . tam . util . test . ArrayFuncsTest . Thing [ ] result = ( ( nom . tam . util . test . ArrayFuncsTest . Thing [ ] ) ( nom . tam . util . ArrayFuncs . flatten ( test ) ) ) ; "<AssertPlaceHolder>" ; } flatten ( java . lang . Object ) { int [ ] dimens = nom . tam . util . ArrayFuncs . getDimensions ( input ) ; if ( ( dimens . length ) <= 1 ) { return input ; } int size = 1 ; for ( int dimen : dimens ) { size *= dimen ; } java . lang . Object flat = nom . tam . util . ArrayFuncs . newInstance ( nom . tam . util . ArrayFuncs . getBaseClass ( input ) , size ) ; nom . tam . util . array . MultiArrayCopier . copyInto ( input , flat ) ; return flat ; }
org . junit . Assert . assertArrayEquals ( expected , result )
test ( ) { org . tests . model . basic . ResetBasicData . reset ( ) ; java . util . List < org . tests . model . basic . Order > list = io . ebean . Ebean . find ( org . tests . model . basic . Order . class ) . fetch ( "customer" ) . fetch ( "customer.contacts" ) . where ( ) . gt ( "id" , 0 ) . findList ( ) ; "<AssertPlaceHolder>" ; for ( org . tests . model . basic . Order order : list ) { java . util . List < org . tests . model . basic . Contact > contacts = order . getCustomer ( ) . getContacts ( ) ; contacts . size ( ) ; } } findList ( ) { org . tests . model . basic . ResetBasicData . reset ( ) ; io . ebean . EbeanServer server = io . ebean . Ebean . getDefaultServer ( ) ; io . ebean . Query < org . tests . model . basic . Customer > query = server . find ( org . tests . model . basic . Customer . class ) . where ( ) . startsWith ( "name" , "Rob" ) . query ( ) ; try ( io . ebean . Transaction transaction = server . beginTransaction ( ) ) { java . util . List < org . tests . model . basic . Customer > customers = server . extended ( ) . findList ( query , transaction ) ; assertThat ( customers ) . isNotEmpty ( ) ; transaction . commit ( ) ; } }
org . junit . Assert . assertNotNull ( list )
testNewPacket ( ) { try { org . pcap4j . packet . IpV6ExtFragmentPacket p = org . pcap4j . packet . IpV6ExtFragmentPacket . newPacket ( packet1 . getRawData ( ) , 0 , packet1 . getRawData ( ) . length ) ; "<AssertPlaceHolder>" ; } catch ( org . pcap4j . packet . IllegalRawDataException e ) { throw new java . lang . AssertionError ( e ) ; } } getRawData ( ) { byte [ ] data = new byte [ 2 ] ; data [ 1 ] = ( ( byte ) ( ( receiveSequenceNumber ) << 1 ) ) ; if ( pfBit ) { data [ 1 ] |= 1 ; } data [ 0 ] = ( ( byte ) ( ( sendSequenceNumber ) << 1 ) ) ; return data ; }
org . junit . Assert . assertEquals ( packet1 , p )
testEchoRecord ( ) { org . apache . avro . grpc . test . TestRecord echoedRecord = stub . echo ( record ) ; "<AssertPlaceHolder>" ; } echo ( org . apache . avro . test . TestRecord ) { return record ; }
org . junit . Assert . assertEquals ( record , echoedRecord )
testConvertToSource ( ) { javax . xml . transform . Source source = converter . convertTo ( javax . xml . transform . Source . class , "<hello>world!</hello>" ) ; "<AssertPlaceHolder>" ; org . apache . camel . converter . JaxpTest . LOG . debug ( ( "Found<sp>document:<sp>" + source ) ) ; } convertTo ( java . lang . Class , java . lang . Object ) { return convertTo ( type , null , value ) ; }
org . junit . Assert . assertNotNull ( source )
testPropertyValue ( ) { com . cloudera . csd . validation . constraints . components . UniqueFieldValidatorImplTest . TestBean bean = new com . cloudera . csd . validation . constraints . components . UniqueFieldValidatorImplTest . TestBean ( "a" , "b" ) ; java . lang . Object value = validator . propertyValue ( bean , "field1" ) ; "<AssertPlaceHolder>" ; } propertyValue ( java . lang . Object , java . lang . String ) { try { java . beans . PropertyDescriptor desc = org . apache . commons . beanutils . PropertyUtils . getPropertyDescriptor ( obj , property ) ; return desc . getReadMethod ( ) . invoke ( obj , new java . lang . Object [ ] { } ) ; } catch ( java . lang . Exception e ) { throw new javax . validation . ValidationException ( e ) ; } }
org . junit . Assert . assertEquals ( "a" , value )
copyToLocalWildcardHier ( ) { java . lang . String testDir = alluxio . client . cli . fs . FileSystemShellUtilsTest . resetFileHierarchy ( mFileSystem ) ; int ret = mFsShell . run ( "cp" , ( testDir + "/*" ) , ( ( "file://" + ( mLocalAlluxioCluster . getAlluxioHome ( ) ) ) + "/testDir" ) ) ; "<AssertPlaceHolder>" ; fileReadTest ( "/testDir/foo/foobar1" , 10 ) ; fileReadTest ( "/testDir/foo/foobar2" , 20 ) ; fileReadTest ( "/testDir/bar/foobar3" , 30 ) ; fileReadTest ( "/testDir/foobar4" , 40 ) ; } getAlluxioHome ( ) { return mWorkDirectory ; }
org . junit . Assert . assertEquals ( 0 , ret )
fullUrlMustHaveDomainPostfix ( ) { shortUrl . setFullUrl ( "http://www.google" ) ; constraintViolations = com . repaskys . domain . ShortUrlTest . validator . validate ( shortUrl ) ; "<AssertPlaceHolder>" ; } setFullUrl ( java . lang . String ) { this . fullUrl = fullUrl ; }
org . junit . Assert . assertEquals ( 0 , constraintViolations . size ( ) )
trueValue ( ) { jetbrains . jetpad . json . JsonBoolean trueValue = ( ( jetbrains . jetpad . json . JsonBoolean ) ( jetbrains . jetpad . json . Json . parse ( "true" ) ) ) ; "<AssertPlaceHolder>" ; } getBooleanValue ( ) { return myValue ; }
org . junit . Assert . assertTrue ( trueValue . getBooleanValue ( ) )
testMeanDateWhenNoDate ( ) { org . springframework . data . solr . core . query . result . SimpleStatsResult stats = new org . springframework . data . solr . core . query . result . SimpleStatsResult ( ) ; stats . setMean ( "o_O" ) ; "<AssertPlaceHolder>" ; } getMeanAsDate ( ) { return ( mean ) instanceof java . util . Date ? ( ( java . util . Date ) ( mean ) ) : null ; }
org . junit . Assert . assertNull ( stats . getMeanAsDate ( ) )
test3 ( ) { java_programs . Node node1 = new java_programs . Node ( "1" ) ; java_programs . Node node2 = new java_programs . Node ( "2" , node1 ) ; java_programs . Node node3 = new java_programs . Node ( "3" , node2 ) ; java_programs . Node node4 = new java_programs . Node ( "4" , node3 ) ; java_programs . Node node5 = new java_programs . Node ( "5" , node4 ) ; node1 . setSuccessor ( node2 ) ; java . lang . Boolean result = java_programs . DETECT_CYCLE . detect_cycle ( node2 ) ; java . lang . String resultStr = "" ; if ( result ) { resultStr = "Cycle<sp>detected!" ; } else { resultStr = "Cycle<sp>not<sp>detected!" ; } "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "Cycle<sp>detected!" , resultStr )
testOFPFlowActionPushPbbInteger ( ) { org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionPushPbb target = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionPushPbb ( OFPFlowActionPushPbb . DEFAULT_ETHER_TYPE ) ; "<AssertPlaceHolder>" ; } getEthType ( ) { return ethType ; }
org . junit . Assert . assertThat ( target . getEthType ( ) , org . hamcrest . CoreMatchers . is ( new java . lang . Integer ( OFPFlowActionPushPbb . DEFAULT_ETHER_TYPE ) ) )
testGetAssetListConsumer ( ) { final org . kie . workbench . common . widgets . client . assets . dropdown . KieAssetsDropdownItem dropdownItem1 = mock ( org . kie . workbench . common . widgets . client . assets . dropdown . KieAssetsDropdownItem . class ) ; final org . kie . workbench . common . widgets . client . assets . dropdown . KieAssetsDropdownItem dropdownItem2 = mock ( org . kie . workbench . common . widgets . client . assets . dropdown . KieAssetsDropdownItem . class ) ; final org . kie . workbench . common . widgets . client . assets . dropdown . KieAssetsDropdownItem dropdownItem3 = mock ( org . kie . workbench . common . widgets . client . assets . dropdown . KieAssetsDropdownItem . class ) ; final java . util . List < org . kie . workbench . common . widgets . client . assets . dropdown . KieAssetsDropdownItem > expectedDropdownItems = asList ( dropdownItem1 , dropdownItem2 , dropdownItem3 ) ; dropdown . getAssetListConsumer ( ) . accept ( expectedDropdownItems ) ; final java . util . List < org . kie . workbench . common . widgets . client . assets . dropdown . KieAssetsDropdownItem > actualDropdownItems = dropdown . getKieAssets ( ) ; verify ( view ) . addValue ( dropdownItem1 ) ; verify ( view ) . addValue ( dropdownItem2 ) ; verify ( view ) . addValue ( dropdownItem3 ) ; verify ( view ) . refreshSelectPicker ( ) ; verify ( view ) . initialize ( ) ; "<AssertPlaceHolder>" ; } initialize ( ) { initWidget ( drlSourceViewer ) ; }
org . junit . Assert . assertEquals ( expectedDropdownItems , actualDropdownItems )
runTest ( ) { boolean result = checkNoError ( "Social_Blogs_Featured_Posts" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )
testCheckSumFailureReadOnly ( ) { com . orientechnologies . orient . core . db . OrientDBConfig config = com . orientechnologies . orient . core . db . OrientDBConfig . builder ( ) . addConfig ( OGlobalConfiguration . STORAGE_CHECKSUM_MODE , OChecksumMode . StoreAndSwitchReadOnlyMode ) . addAttribute ( ODatabase . ATTRIBUTES . MINIMUMCLUSTERS , 1 ) . build ( ) ; orientDB = new com . orientechnologies . orient . core . db . OrientDB ( ( "embedded:" + ( com . orientechnologies . orient . core . storage . OStorageTestIT . buildPath . toFile ( ) . getAbsolutePath ( ) ) ) , config ) ; orientDB . create ( com . orientechnologies . orient . core . storage . OStorageTestIT . class . getSimpleName ( ) , ODatabaseType . PLOCAL , config ) ; com . orientechnologies . orient . core . db . ODatabaseSession session = orientDB . open ( com . orientechnologies . orient . core . storage . OStorageTestIT . class . getSimpleName ( ) , "admin" , "admin" , config ) ; com . orientechnologies . orient . core . metadata . OMetadata metadata = session . getMetadata ( ) ; com . orientechnologies . orient . core . metadata . schema . OSchema schema = metadata . getSchema ( ) ; schema . createClass ( "PageBreak" ) ; for ( int i = 0 ; i < 10 ; i ++ ) { com . orientechnologies . orient . core . record . impl . ODocument document = new com . orientechnologies . orient . core . record . impl . ODocument ( "PageBreak" ) ; document . field ( "value" , "value" ) ; document . save ( ) ; } com . orientechnologies . orient . core . storage . disk . OLocalPaginatedStorage storage = ( ( com . orientechnologies . orient . core . storage . disk . OLocalPaginatedStorage ) ( ( ( com . orientechnologies . orient . core . db . ODatabaseDocumentInternal ) ( session ) ) . getStorage ( ) ) ) ; com . orientechnologies . orient . core . storage . cache . OWriteCache wowCache = storage . getWriteCache ( ) ; com . orientechnologies . orient . core . db . OSharedContext ctx = ( ( com . orientechnologies . orient . core . db . ODatabaseDocumentInternal ) ( session ) ) . getSharedContext ( ) ; session . close ( ) ; final java . nio . file . Path storagePath = storage . getStoragePath ( ) ; long fileId = wowCache . fileIdByName ( "pagebreak.pcl" ) ; java . lang . String nativeFileName = wowCache . nativeFileNameById ( fileId ) ; storage . close ( true , false ) ; ctx . close ( ) ; int position = 3 * 1024 ; java . io . RandomAccessFile file = new java . io . RandomAccessFile ( storagePath . resolve ( nativeFileName ) . toFile ( ) , "rw" ) ; file . seek ( position ) ; int bt = file . read ( ) ; file . seek ( position ) ; file . write ( ( bt + 1 ) ) ; file . close ( ) ; session = orientDB . open ( com . orientechnologies . orient . core . storage . OStorageTestIT . class . getSimpleName ( ) , "admin" , "admin" ) ; session . query ( "select<sp>from<sp>PageBreak" ) . close ( ) ; java . lang . Thread . sleep ( 100 ) ; com . orientechnologies . orient . core . record . impl . ODocument document = new com . orientechnologies . orient . core . record . impl . ODocument ( "PageBreak" ) ; document . field ( "value" , "value" ) ; try { document . save ( ) ; org . junit . Assert . fail ( ) ; } catch ( com . orientechnologies . orient . core . exception . OPageIsBrokenException e ) { "<AssertPlaceHolder>" ; } session . close ( ) ; } fail ( ) { setupSchema ( ) ; final com . tinkerpop . blueprints . impls . orient . OrientGraphFactory orientGraphFactory = new com . tinkerpop . blueprints . impls . orient . OrientGraphFactory ( com . orientechnologies . orient . graph . blueprints . GraphValidationTest . URL , "admin" , "admin" ) . setupPool ( 1 , 10 ) ; com . tinkerpop . blueprints . impls . orient . OrientGraph graph = orientGraphFactory . getTx ( ) ; try { graph . addVertex ( "class:M" , "name" , "n0" ) ; try { graph . addVertex ( "class:M" ) ; graph . commit ( ) ; throw new java . lang . RuntimeException ( "Schema<sp>problem<sp>was<sp>not<sp>detected!" ) ; } catch ( com . orientechnologies . orient . core . exception . OValidationException e ) { System . out . println ( ( "This<sp>is<sp>the<sp>Message<sp>I<sp>want<sp>to<sp>see:<sp>\n" + e ) ) ; } } finally { graph . shutdown ( ) ; } }
org . junit . Assert . assertTrue ( true )
testSerialization ( ) { org . jfree . chart . renderer . category . IntervalBarRenderer r1 = new org . jfree . chart . renderer . category . IntervalBarRenderer ( ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( r1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . renderer . category . IntervalBarRenderer r2 = ( ( org . jfree . chart . renderer . category . IntervalBarRenderer ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( r1 , r2 )
testApplicationNull ( ) { "<AssertPlaceHolder>" ; } getApplication ( java . lang . String ) { if ( jid == null ) return null ; java . util . concurrent . locks . Lock applicationLock = applicationsLock . readLock ( ) ; applicationLock . lock ( ) ; try { return applicationsMap . get ( jid ) ; } finally { applicationLock . unlock ( ) ; } }
org . junit . Assert . assertNull ( store . getApplication ( null ) )
givenTwoSerializerExist_whenDifferentHazelcastInstanceAreInjected_thenTheyHaveTheSameTypeId ( ) { info . jerrinot . subzero . Serializer serializer1 = new info . jerrinot . subzero . Serializer ( ) ; serializer1 . setHazelcastInstance ( newMockHazelcastInstance ( ) ) ; info . jerrinot . subzero . Serializer serializer2 = new info . jerrinot . subzero . Serializer ( ) ; serializer2 . setHazelcastInstance ( newMockHazelcastInstance ( ) ) ; com . hazelcast . core . HazelcastInstance hz1 = newMockHazelcastInstance ( ) ; com . hazelcast . core . HazelcastInstance hz2 = newMockHazelcastInstance ( ) ; serializer1 . setHazelcastInstance ( hz1 ) ; serializer2 . setHazelcastInstance ( hz2 ) ; int typeId1 = serializer1 . getTypeId ( ) ; int typeId2 = serializer2 . getTypeId ( ) ; "<AssertPlaceHolder>" ; } getTypeId ( ) { return autoGeneratedTypeId ; }
org . junit . Assert . assertEquals ( typeId1 , typeId2 )
equalNames ( ) { com . itextpdf . kernel . pdf . PdfName a = ( ( com . itextpdf . kernel . pdf . PdfName ) ( new com . itextpdf . kernel . pdf . PdfName ( "abcd" ) . makeIndirect ( new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfWriter ( new com . itextpdf . io . source . ByteArrayOutputStream ( ) ) ) ) ) ) ; com . itextpdf . kernel . pdf . PdfName b = new com . itextpdf . kernel . pdf . PdfName ( "abcd" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( o instanceof com . itextpdf . svg . dummy . renderers . impl . DummyBranchSvgNodeRenderer ) ) { return false ; } com . itextpdf . svg . dummy . renderers . impl . DummyBranchSvgNodeRenderer otherDummy = ( ( com . itextpdf . svg . dummy . renderers . impl . DummyBranchSvgNodeRenderer ) ( o ) ) ; if ( ! ( this . name . equals ( otherDummy . name ) ) ) { return false ; } if ( ! ( ( this . children . isEmpty ( ) ) && ( otherDummy . children . isEmpty ( ) ) ) ) { if ( ( this . children . size ( ) ) != ( otherDummy . children . size ( ) ) ) { return false ; } boolean iterationResult = true ; for ( int i = 0 ; i < ( this . children . size ( ) ) ; i ++ ) { iterationResult &= this . children . get ( i ) . equals ( otherDummy . getChildren ( ) . get ( i ) ) ; } if ( ! iterationResult ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( a . equals ( b ) )
executeLimitTest ( ) { org . threadly . concurrent . PriorityScheduler ps = new org . threadly . concurrent . PriorityScheduler ( 16 ) ; ps . prestartAllThreads ( ) ; try { java . util . concurrent . Executor limitedExecutor = new org . threadly . concurrent . wrapper . limiter . SingleThreadSchedulerSubPool ( ps ) ; final java . util . concurrent . atomic . AtomicInteger running = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; final org . threadly . test . concurrent . AsyncVerifier verifier = new org . threadly . test . concurrent . AsyncVerifier ( ) ; java . util . List < org . threadly . test . concurrent . TestRunnable > runnables = new java . util . ArrayList ( TEST_QTY ) ; for ( int i = 0 ; i < ( TEST_QTY ) ; i ++ ) { org . threadly . test . concurrent . TestRunnable tr = new org . threadly . test . concurrent . TestRunnable ( 20 ) { @ org . threadly . concurrent . wrapper . limiter . Override public void handleRunStart ( ) { int runningCount = running . incrementAndGet ( ) ; if ( runningCount > 1 ) { verifier . fail ( ( runningCount + "<sp>currently<sp>running" ) ) ; } } @ org . threadly . concurrent . wrapper . limiter . Override public void handleRunFinish ( ) { running . decrementAndGet ( ) ; verifier . signalComplete ( ) ; } } ; limitedExecutor . execute ( tr ) ; runnables . add ( tr ) ; } verifier . waitForTest ( ( 1000 * 10 ) , org . threadly . concurrent . wrapper . limiter . TEST_QTY ) ; java . util . Iterator < org . threadly . test . concurrent . TestRunnable > it = runnables . iterator ( ) ; while ( it . hasNext ( ) ) { org . threadly . test . concurrent . TestRunnable tr = it . next ( ) ; tr . blockTillFinished ( ) ; "<AssertPlaceHolder>" ; } } finally { ps . shutdownNow ( ) ; } } getRunCount ( ) { return runCount . get ( ) ; }
org . junit . Assert . assertEquals ( 1 , tr . getRunCount ( ) )
testRebalanceFromOneServer ( ) { testTServers . addTServer ( "127.0.0.1" ) ; java . util . Map < org . apache . accumulo . core . data . impl . KeyExtent , org . apache . accumulo . server . master . state . TServerInstance > unassigned = new java . util . HashMap ( ) ; unassigned . put ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . makeExtent ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . TNAME , "20100123_1" , null ) , null ) ; unassigned . put ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . makeExtent ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . TNAME , "20100123_2" , "20100123_1" ) , null ) ; unassigned . put ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . makeExtent ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . TNAME , "20100123_3" , "20100123_2" ) , null ) ; unassigned . put ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . makeExtent ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . TNAME , "20100124_1" , "20100123_3" ) , null ) ; unassigned . put ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . makeExtent ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . TNAME , "20100124_2" , "20100124_1" ) , null ) ; unassigned . put ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . makeExtent ( datawave . ingest . table . balancer . ShardedTableTabletBalancerTest . TNAME , "20100124_3" , "20100124_2" ) , null ) ; java . util . Map < org . apache . accumulo . core . data . impl . KeyExtent , org . apache . accumulo . server . master . state . TServerInstance > assignments = new java . util . HashMap ( ) ; testBalancer . getAssignments ( testTServers . getCurrent ( ) , unassigned , assignments ) ; "<AssertPlaceHolder>" ; testTServers . applyAssignments ( assignments ) ; testTServers . checkBalance ( testBalancer . getPartitioner ( ) ) ; testTServers . addTServer ( "127.0.0.1" ) ; runAndCheckBalance ( 1 ) ; testTServers . addTServer ( "127.0.0.1" ) ; runAndCheckBalance ( 1 ) ; testTServers . checkDateDistribution ( ) ; } size ( ) { return this . typeMetadata . size ( ) ; }
org . junit . Assert . assertEquals ( 6 , assignments . size ( ) )
testGetDataPickerDate ( ) { datePicker = new org . uberfire . ext . widgets . common . client . common . DatePicker ( datePickerMock ) ; "<AssertPlaceHolder>" ; } getDataPickerDate ( ) { com . google . gwt . i18n . client . DateTimeFormat dtf = com . google . gwt . i18n . client . DateTimeFormat . getFormat ( "dd/M/yyyy" ) ; java . lang . String dateStr = parseDate ( datePicker . getTextBox ( ) . getElement ( ) , org . uberfire . ext . widgets . common . client . common . DatePickerFormatUtilities . convertToBS3DateFormat ( "dd/M/yyyy" ) ) ; if ( ( dateStr == null ) || ( dateStr . isEmpty ( ) ) ) { return null ; } else { return dtf . parse ( dateStr ) ; } }
org . junit . Assert . assertNull ( datePicker . getDataPickerDate ( ) )
shouldReturnEqualForSameCommits ( ) { org . eclipse . egit . ui . internal . synchronize . model . GitModelCache left = new org . eclipse . egit . ui . internal . synchronize . model . GitModelCache ( createModelRepository ( ) , lookupRepository ( leftRepoFile ) , null ) ; org . eclipse . egit . ui . internal . synchronize . model . GitModelCache right = new org . eclipse . egit . ui . internal . synchronize . model . GitModelCache ( createModelRepository ( ) , lookupRepository ( leftRepoFile ) , null ) ; boolean actual = left . equals ( right ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } org . eclipse . egit . ui . CommitMessageWithCaretPosition other = ( ( org . eclipse . egit . ui . CommitMessageWithCaretPosition ) ( obj ) ) ; return ( ( caretPosition ) == ( other . caretPosition ) ) && ( java . util . Objects . equals ( message , other . message ) ) ; }
org . junit . Assert . assertTrue ( actual )
testEXTCODECOPY_4 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( "605E6007600073471FD3AD3E9EEADEEC4608B92D16CE6B500704CC3C6000605f556014600054601e60205463abcddcba6040545b51602001600a5254516040016014525451606001601e5254516080016028525460a052546016604860003960166000f26000603f556103e756600054600053602002351234" ) , invoke ) ; vm . step ( program ) ; vm . step ( program ) ; vm . step ( program ) ; vm . step ( program ) ; vm . step ( program ) ; "<AssertPlaceHolder>" ; } isStopped ( ) { return stopped ; }
org . junit . Assert . assertTrue ( program . isStopped ( ) )
testGetNewDataTypeHashWhenReferenceDataTypeHashIsNotEmpty ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType newDataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final java . lang . String newDataTypeName = "value" ; final java . lang . String referenceDataTypeHash = "tDataType.id" ; when ( newDataType . getName ( ) ) . thenReturn ( newDataTypeName ) ; final java . lang . String actualHash = listItem . getNewDataTypeHash ( newDataType , referenceDataTypeHash ) ; final java . lang . String expectedHash = "tDataType.id.value" ; "<AssertPlaceHolder>" ; } getNewDataTypeHash ( org . kie . workbench . common . dmn . client . editors . types . common . DataType , java . lang . String ) { return java . util . stream . Stream . of ( referenceDataTypeHash , newDataType . getName ( ) ) . filter ( ( s ) -> ! ( isEmpty ( s ) ) ) . collect ( java . util . stream . Collectors . joining ( "." ) ) ; }
org . junit . Assert . assertEquals ( expectedHash , actualHash )
testHandleRemove ( ) { javax . jdo . PersistenceManager pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; org . zoodb . jdo . ZooJdoHelper . schema ( pm ) . addClass ( org . zoodb . test . jdo . TestClassTiny . class ) ; org . zoodb . jdo . ZooJdoHelper . schema ( pm ) . addClass ( org . zoodb . test . jdo . TestClassTiny2 . class ) ; org . zoodb . test . jdo . TestClassTiny t1 = new org . zoodb . test . jdo . TestClassTiny ( ) ; org . zoodb . test . jdo . TestClassTiny2 t2 = new org . zoodb . test . jdo . TestClassTiny2 ( ) ; pm . makePersistent ( t1 ) ; pm . makePersistent ( t2 ) ; java . lang . Object oid1 = pm . getObjectId ( t1 ) ; java . lang . Object oid2 = pm . getObjectId ( t2 ) ; pm . currentTransaction ( ) . commit ( ) ; pm . currentTransaction ( ) . begin ( ) ; org . zoodb . schema . ZooHandle h1 = org . zoodb . jdo . ZooJdoHelper . schema ( pm ) . getHandle ( ( ( java . lang . Long ) ( oid1 ) ) ) ; org . zoodb . schema . ZooHandle h2 = org . zoodb . jdo . ZooJdoHelper . schema ( pm ) . getHandle ( ( ( java . lang . Long ) ( oid2 ) ) ) ; h1 . remove ( ) ; h2 . remove ( ) ; try { h1 . remove ( ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { } pm . currentTransaction ( ) . commit ( ) ; org . zoodb . test . testutil . TestTools . closePM ( ) ; pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; try { pm . getObjectById ( oid1 ) ; org . junit . Assert . fail ( ) ; } catch ( javax . jdo . JDOObjectNotFoundException e ) { } try { pm . getObjectById ( oid2 ) ; org . junit . Assert . fail ( ) ; } catch ( javax . jdo . JDOObjectNotFoundException e ) { } javax . jdo . Extent < ? > ext = pm . getExtent ( org . zoodb . test . jdo . TestClassTiny . class ) ; "<AssertPlaceHolder>" ; ext . closeAll ( ) ; pm . currentTransaction ( ) . commit ( ) ; org . zoodb . test . testutil . TestTools . closePM ( ) ; } iterator ( ) { return ext . iterator ( ) ; }
org . junit . Assert . assertFalse ( ext . iterator ( ) . hasNext ( ) )
testCompareToGT ( ) { final com . orientechnologies . orient . core . index . OCompositeKey compositeKey = new com . orientechnologies . orient . core . index . OCompositeKey ( ) ; compositeKey . addKey ( "b" ) ; final com . orientechnologies . orient . core . index . OCompositeKey anotherCompositeKey = new com . orientechnologies . orient . core . index . OCompositeKey ( ) ; anotherCompositeKey . addKey ( "a" ) ; anotherCompositeKey . addKey ( "b" ) ; "<AssertPlaceHolder>" ; } compareTo ( java . lang . Object ) { if ( ! ( obj instanceof com . orientechnologies . orient . server . distributed . ODistributedRequestId ) ) return - 1 ; final com . orientechnologies . orient . server . distributed . ODistributedRequestId other = ( ( com . orientechnologies . orient . server . distributed . ODistributedRequestId ) ( obj ) ) ; return java . lang . Integer . compare ( hashCode ( ) , other . hashCode ( ) ) ; }
org . junit . Assert . assertEquals ( compositeKey . compareTo ( anotherCompositeKey ) , 1 )
connectRepositoryAuthenticationInfoProxyInfoProvider ( ) { this . wagon . connect ( this . repository , this . authenticationInfo , this . proxyInfoProvider ) ; "<AssertPlaceHolder>" ; verify ( this . sessionListenerSupport ) . fireSessionOpening ( ) ; verify ( this . wagon ) . connectToRepository ( this . repository , this . authenticationInfo , this . proxyInfoProvider ) ; verify ( this . sessionListenerSupport ) . fireSessionLoggedIn ( ) ; verify ( this . sessionListenerSupport ) . fireSessionOpened ( ) ; } getRepository ( ) { return this . repository ; }
org . junit . Assert . assertEquals ( this . repository , this . wagon . getRepository ( ) )
shouldSetAndGetOriginalOpChain ( ) { final uk . gov . gchq . gaffer . operation . OperationChain < ? > opChain = mock ( uk . gov . gchq . gaffer . operation . OperationChain . class ) ; final uk . gov . gchq . gaffer . store . Context context = new uk . gov . gchq . gaffer . store . Context ( ) ; context . setOriginalOpChain ( opChain ) ; "<AssertPlaceHolder>" ; } getOriginalOpChain ( ) { return originalOpChain ; }
org . junit . Assert . assertSame ( opChain , context . getOriginalOpChain ( ) )
discardLogicWhitespace2 ( ) { java . lang . String html = rocker . DiscardLogicWhitespace2 . template ( "World" ) . render ( ) . toString ( ) ; java . lang . String expected = "<sp>Hello<sp>World!" ; "<AssertPlaceHolder>" ; } toString ( ) { byte [ ] bytes = toByteArray ( ) ; return new java . lang . String ( bytes , this . charset ) ; }
org . junit . Assert . assertEquals ( expected , html )
getFixedNextInvocationValue_A$int$List ( ) { int arg0 = 0 ; final java . util . List < java . lang . Integer > arg1 = new java . util . ArrayList < java . lang . Integer > ( ) ; arg1 . add ( 1 ) ; int actual = parser . getFixedNextInvocationValue ( arg0 , arg1 ) ; int expected = 1 ; "<AssertPlaceHolder>" ; } getFixedNextInvocationValue ( int , java . util . List ) { if ( fixedInvocations != null ) { if ( ( fixedInvocations . size ( ) ) == 0 ) { throw new java . lang . IllegalStateException ( "Invalid<sp>configuration..." ) ; } for ( int fixed : fixedInvocations ) { if ( fixed > currentValue ) { return fixed ; } } return fixedInvocations . get ( 0 ) ; } else { return currentValue ; } }
org . junit . Assert . assertEquals ( expected , actual )
runTest ( ) { boolean result = checkNoError ( "Social_Communities_Add_Member" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )
equalsNull ( ) { "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } org . candlepin . pki . X509ExtensionWrapper other = ( ( org . candlepin . pki . X509ExtensionWrapper ) ( obj ) ) ; if ( ( oid ) == null ) { if ( ( other . oid ) != null ) { return false ; } } else if ( ! ( oid . equals ( other . oid ) ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( user . equals ( null ) )
pubSubNumSub ( ) { final java . util . Map < java . lang . String , java . lang . String > expectedNumSub = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; expectedNumSub . put ( "testchannel2" , "1" ) ; expectedNumSub . put ( "testchannel1" , "1" ) ; jedis . subscribe ( new redis . clients . jedis . JedisPubSub ( ) { private int count = 0 ; @ redis . clients . jedis . tests . commands . Override public void onSubscribe ( java . lang . String channel , int subscribedChannels ) { ( count ) ++ ; if ( ( count ) == 2 ) { redis . clients . jedis . Jedis otherJedis = createJedis ( ) ; java . util . Map < java . lang . String , java . lang . String > numSub = otherJedis . pubsubNumSub ( "testchannel1" , "testchannel2" ) ; "<AssertPlaceHolder>" ; unsubscribe ( ) ; } } } , "testchannel1" , "testchannel2" ) ; } createJedis ( ) { redis . clients . jedis . Jedis j = new redis . clients . jedis . Jedis ( redis . clients . jedis . tests . commands . JedisCommandTestBase . hnp ) ; j . connect ( ) ; j . auth ( "foobared" ) ; j . flushAll ( ) ; return j ; }
org . junit . Assert . assertEquals ( expectedNumSub , numSub )
testUnsetSingleSection ( ) { org . eclipse . jgit . lib . Config c = org . eclipse . jgit . lib . ConfigTest . parse ( ( "" + ( ( ( ( ( ( ( ( "[branch<sp>\"keep\"]\n" + "<sp>merge<sp>=<sp>master.branch.to.keep.in.the.file\n" ) + "\n" ) + "[single]\n" ) + "<sp>merge<sp>=<sp>this.will.get.deleted\n" ) + "<sp>remote<sp>=<sp>origin-for-some-long-gone-place\n" ) + "\n" ) + "[core-section-not-to-remove-in-test]\n" ) + "<sp>merge<sp>=<sp>this.will.get.deleted\n" 0 ) ) ) ; c . unsetSection ( "single" , null ) ; "<AssertPlaceHolder>" ; } toText ( ) { return toStringBuilder ( ) . toString ( ) ; }
org . junit . Assert . assertEquals ( ( "" + ( ( ( ( "[branch<sp>\"keep\"]\n" + "<sp>merge<sp>=<sp>master.branch.to.keep.in.the.file\n" ) + "\n" ) + "[core-section-not-to-remove-in-test]\n" ) + "<sp>merge<sp>=<sp>this.will.get.deleted\n" 0 ) ) , c . toText ( ) )
testEncryptDecryptLotOfData ( ) { java . lang . String password = "testpassword12345" ; java . lang . StringBuilder testString = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < 10000 ; i ++ ) testString . append ( i ) ; byte [ ] content = testString . toString ( ) . getBytes ( ) ; byte [ ] encrypted = scotty . crypto . AESEncryption . encrypt ( content , password ) ; byte [ ] decrypted = scotty . crypto . AESEncryption . decrypt ( encrypted , password ) ; "<AssertPlaceHolder>" ; } decrypt ( byte [ ] , java . lang . String ) { return scotty . crypto . AESEncryption . deAndEncrypt ( content , password , true ) ; }
org . junit . Assert . assertArrayEquals ( content , decrypted )