input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
capacityViolationAtBeginning_shouldWork ( ) { jsprit . core . analysis . SolutionAnalyser analyser = new jsprit . core . analysis . SolutionAnalyser ( vrp , solution , new jsprit . core . problem . cost . TransportDistance ( ) { @ jsprit . core . analysis . Override public double getDistance ( jsprit . core . problem . Location from , jsprit . core . problem . Location to ) { return vrp . getTransportCosts ( ) . getTransportCost ( from , to , 0.0 , null , null ) ; } } ) ; jsprit . core . problem . solution . route . VehicleRoute route = solution . getRoutes ( ) . iterator ( ) . next ( ) ; jsprit . core . problem . Capacity atBeginning = analyser . getCapacityViolationAtBeginning ( route ) ; for ( int i = 0 ; i < ( atBeginning . getNuOfDimensions ( ) ) ; i ++ ) { "<AssertPlaceHolder>" ; } }
|
org . junit . Assert . assertTrue ( ( ( atBeginning . get ( i ) ) == 0 ) )
|
da03_returnInt ( ) { "<AssertPlaceHolder>" ; } returnInt ( ) { return 1 ; }
|
org . junit . Assert . assertEquals ( 1 , proxy . returnInt ( ) )
|
testChannelResize ( ) { org . apache . flume . Context context = new org . apache . flume . Context ( ) ; java . util . Map < java . lang . String , java . lang . String > parms = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; parms . put ( "capacity" , "5" ) ; parms . put ( "transactionCapacity" , "5" ) ; context . putAll ( parms ) ; org . apache . flume . conf . Configurables . configure ( channel , context ) ; org . apache . flume . Transaction transaction = channel . getTransaction ( ) ; transaction . begin ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { channel . put ( org . apache . flume . event . EventBuilder . withBody ( java . lang . String . format ( "test<sp>event<sp>%d" , i ) . getBytes ( ) ) ) ; } transaction . commit ( ) ; transaction . close ( ) ; parms . put ( "capacity" , "2" ) ; parms . put ( "transactionCapacity" , "2" ) ; context . putAll ( parms ) ; org . apache . flume . conf . Configurables . configure ( channel , context ) ; for ( int i = 0 ; i < 6 ; i ++ ) { transaction = channel . getTransaction ( ) ; transaction . begin ( ) ; "<AssertPlaceHolder>" ; transaction . commit ( ) ; transaction . close ( ) ; } } take ( ) { return getProvider ( ) . removeEvent ( getName ( ) ) ; }
|
org . junit . Assert . assertNotNull ( channel . take ( ) )
|
compose_A$Function1 ( ) { com . m3 . scalaflavor4j . Function1 < java . lang . Long , java . lang . Integer > f = new com . m3 . scalaflavor4j . Function1 < java . lang . Long , java . lang . Integer > ( ) { public com . m3 . scalaflavor4j . Integer apply ( java . lang . Long v1 ) { return v1 . intValue ( ) ; } } ; com . m3 . scalaflavor4j . RichFunction1 < java . lang . String , java . lang . Long > g = new com . m3 . scalaflavor4j . RichFunction1 ( new com . m3 . scalaflavor4j . Function1 < java . lang . String , java . lang . Long > ( ) { public com . m3 . scalaflavor4j . Long apply ( java . lang . String v1 ) { return java . lang . Long . valueOf ( v1 . length ( ) ) ; } } ) ; com . m3 . scalaflavor4j . RichFunction1 < java . lang . String , java . lang . Integer > composed = new com . m3 . scalaflavor4j . RichFunction1 < java . lang . Long , java . lang . Integer > ( f ) . compose ( g ) ; "<AssertPlaceHolder>" ; } apply ( com . m3 . scalaflavor4j . CollectionLike ) { return new com . m3 . scalaflavor4j . ForComprehension1 < T1 > ( xs ) ; }
|
org . junit . Assert . assertThat ( composed . apply ( "foo" ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 3 ) ) )
|
shouldSuccessfullyExtractUuidFromSelf ( ) { java . lang . String uuid = org . unitedinternet . cosmo . dao . external . UuidExternalGenerator . get ( ) . getNext ( ) ; java . lang . String extractedUuid = org . unitedinternet . cosmo . dao . external . UuidExternalGenerator . get ( ) . extractUuid ( uuid ) ; "<AssertPlaceHolder>" ; } extractUuid ( java . lang . String ) { if ( path != null ) { java . util . regex . Matcher matcher = this . pattern . matcher ( path ) ; if ( matcher . find ( ) ) { return matcher . group ( ) ; } } return null ; }
|
org . junit . Assert . assertEquals ( uuid , extractedUuid )
|
executeWithDifferentTimeToLive ( ) { org . xwiki . rendering . macro . cache . CacheMacroParameters params = new org . xwiki . rendering . macro . cache . CacheMacroParameters ( ) ; org . xwiki . rendering . transformation . MacroTransformationContext context = createMacroTransformationContext ( ) ; params . setId ( "id" ) ; params . setMaxEntries ( 10 ) ; params . setTimeToLive ( 100 ) ; java . util . List < org . xwiki . rendering . block . Block > result1 = this . cacheMacro . execute ( params , "content1" , context ) ; params . setTimeToLive ( 200 ) ; java . util . List < org . xwiki . rendering . block . Block > result2 = this . cacheMacro . execute ( params , "content2" , context ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { boolean equals = false ; if ( obj instanceof org . xwiki . officeimporter . splitter . TargetDocumentDescriptor ) { org . xwiki . officeimporter . splitter . TargetDocumentDescriptor other = ( ( org . xwiki . officeimporter . splitter . TargetDocumentDescriptor ) ( obj ) ) ; equals = other . getDocumentReference ( ) . equals ( getDocumentReference ( ) ) ; } return equals ; }
|
org . junit . Assert . assertFalse ( result2 . equals ( result1 ) )
|
shouldAcceptMessageAndNullThrowable ( ) { java . lang . Throwable t = null ; logger . error ( t , org . modeshape . common . logging . LoggerTest . errorMessageWithNullException ) ; logger . warn ( t , org . modeshape . common . logging . LoggerTest . warningMessageWithNullException ) ; logger . info ( t , org . modeshape . common . logging . LoggerTest . infoMessageWithNullException ) ; logger . debug ( t , "This<sp>is<sp>a<sp>debug<sp>message<sp>with<sp>a<sp>null<sp>exception" ) ; logger . trace ( t , "This<sp>is<sp>a<sp>trace<sp>message<sp>with<sp>a<sp>null<sp>exception" ) ; log . removeFirst ( Logger . Level . ERROR , "This<sp>is<sp>an<sp>error<sp>message<sp>with<sp>a<sp>null<sp>exception" ) ; log . removeFirst ( Logger . Level . WARNING , "This<sp>is<sp>a<sp>warning<sp>message<sp>with<sp>a<sp>null<sp>exception" ) ; log . removeFirst ( Logger . Level . INFO , "This<sp>is<sp>an<sp>info<sp>message<sp>with<sp>a<sp>null<sp>exception" ) ; log . removeFirst ( Logger . Level . DEBUG , "This<sp>is<sp>a<sp>debug<sp>message<sp>with<sp>a<sp>null<sp>exception" ) ; log . removeFirst ( Logger . Level . TRACE , "This<sp>is<sp>a<sp>trace<sp>message<sp>with<sp>a<sp>null<sp>exception" ) ; "<AssertPlaceHolder>" ; } hasEvents ( ) { return ( this . events . size ( ) ) != 0 ; }
|
org . junit . Assert . assertEquals ( false , log . hasEvents ( ) )
|
testGetGroupsFromEmptyListIds ( ) { getTransactionService ( ) . begin ( ) ; final long id1 = new java . util . Date ( ) . getTime ( ) ; final org . bonitasoft . engine . identity . model . SGroup group1 = org . bonitasoft . engine . builder . BuilderFactory . get ( org . bonitasoft . engine . identity . model . builder . SGroupBuilderFactory . class ) . createNewInstance ( ) . setName ( "testGetGroups1" ) . setId ( id1 ) . done ( ) ; org . bonitasoft . engine . identity . IdentityServiceTest . identityService . createGroup ( group1 , null , null ) ; final long id2 = id1 + 1L ; final org . bonitasoft . engine . identity . model . SGroup group2 = org . bonitasoft . engine . builder . BuilderFactory . get ( org . bonitasoft . engine . identity . model . builder . SGroupBuilderFactory . class ) . createNewInstance ( ) . setName ( "testGetGroups2" ) . setId ( id2 ) . done ( ) ; org . bonitasoft . engine . identity . IdentityServiceTest . identityService . createGroup ( group2 , null , null ) ; final java . util . List < org . bonitasoft . engine . identity . model . SGroup > retrievedGroups = org . bonitasoft . engine . identity . IdentityServiceTest . identityService . getGroups ( java . util . Collections . < java . lang . Long > emptyList ( ) ) ; getTransactionService ( ) . complete ( ) ; "<AssertPlaceHolder>" ; } complete ( ) { }
|
org . junit . Assert . assertEquals ( 0 , retrievedGroups . size ( ) )
|
testContinueAfterStartAndSameType ( ) { final java . lang . String outcome = opennlp . tools . namefind . NameFinderSequenceValidatorTest . CONTINUE_A ; java . lang . String [ ] inputSequence = new java . lang . String [ ] { "Stefanie" , "Schmidt" , "is" , "German" } ; java . lang . String [ ] outcomesSequence = new java . lang . String [ ] { opennlp . tools . namefind . NameFinderSequenceValidatorTest . START_A } ; "<AssertPlaceHolder>" ; } validSequence ( int , java . lang . String [ ] , java . lang . String [ ] , java . lang . String ) { if ( outcome . endsWith ( BioCodec . CONTINUE ) ) { int li = ( outcomesSequence . length ) - 1 ; if ( li == ( - 1 ) ) { return false ; } else if ( outcomesSequence [ li ] . endsWith ( BioCodec . OTHER ) ) { return false ; } else if ( ( outcomesSequence [ li ] . endsWith ( BioCodec . CONTINUE ) ) || ( outcomesSequence [ li ] . endsWith ( BioCodec . START ) ) ) { java . lang . String previousNameType = opennlp . tools . namefind . NameFinderME . extractNameType ( outcomesSequence [ li ] ) ; java . lang . String nameType = opennlp . tools . namefind . NameFinderME . extractNameType ( outcome ) ; if ( ( previousNameType != null ) || ( nameType != null ) ) { if ( nameType != null ) { if ( nameType . equals ( previousNameType ) ) { return true ; } } return false ; } } } return true ; }
|
org . junit . Assert . assertTrue ( opennlp . tools . namefind . NameFinderSequenceValidatorTest . validator . validSequence ( 1 , inputSequence , outcomesSequence , outcome ) )
|
testInvalidSelector ( ) { try { java . lang . String queryString = "selector=true" ; java . net . URI requestUri = new java . net . URI ( ( ( ( org . slc . sli . api . service . query . UriInfoToApiQueryConverterTest . URI_STRING ) + "?" ) + queryString ) ) ; when ( uriInfo . getRequestUri ( ) ) . thenReturn ( requestUri ) ; } catch ( java . net . URISyntaxException urise ) { "<AssertPlaceHolder>" ; } org . slc . sli . api . service . query . UriInfoToApiQueryConverterTest . QUERY_CONVERTER . convert ( uriInfo ) ; } getRequestUri ( ) { return this . uri ; }
|
org . junit . Assert . assertTrue ( false )
|
getCongressionalByInvalidDistrictTest ( ) { gov . nysenate . sage . model . district . Congressional congressional = congressionalDao . getCongressionalByDistrict ( 0 ) ; "<AssertPlaceHolder>" ; } getCongressionalByDistrict ( int ) { java . lang . String sql = "SELECT<sp>*<sp>FROM<sp>congressional<sp>WHERE<sp>district<sp>=<sp>?" ; org . apache . commons . dbutils . handlers . BeanHandler < gov . nysenate . sage . model . district . Congressional > congressionalHandler = new org . apache . commons . dbutils . handlers . BeanHandler ( gov . nysenate . sage . model . district . Congressional . class ) ; try { gov . nysenate . sage . model . district . Congressional congressional = run . query ( sql , congressionalHandler , district ) ; return congressional ; } catch ( java . sql . SQLException ex ) { logger . error ( "Failed<sp>to<sp>retrieve<sp>congressional" , ex ) ; } return null ; }
|
org . junit . Assert . assertNull ( congressional )
|
testNotInstrumentedConstructorNewInstance ( ) { org . evosuite . testcase . DefaultTestCase tc = buildNotInstrumentedConstructorNewInstanceTestCase ( ) ; org . evosuite . symbolic . PathCondition pc = org . evosuite . symbolic . ConcolicExecution . executeConcolic ( tc ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = pc . getBranchConditions ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return this . pathCondition . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( ( ! ( branch_conditions . isEmpty ( ) ) ) )
|
allSatisfy_executionException ( ) { try { this . classUnderTest ( ) . allSatisfy ( ( each ) -> { throw new java . lang . RuntimeException ( "Execution<sp>exception" ) ; } ) ; } catch ( java . lang . RuntimeException e ) { java . util . concurrent . ExecutionException executionException = ( ( java . util . concurrent . ExecutionException ) ( e . getCause ( ) ) ) ; java . lang . RuntimeException runtimeException = ( ( java . lang . RuntimeException ) ( executionException . getCause ( ) ) ) ; "<AssertPlaceHolder>" ; } } allSatisfy ( com . gs . collections . api . block . predicate . Predicate ) { synchronized ( this . lock ) { return this . iterable . allSatisfy ( predicate ) ; } }
|
org . junit . Assert . assertEquals ( "Execution<sp>exception" , runtimeException . getMessage ( ) )
|
testLo3MetLegeRij ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3PersoonslijstBuilder builder = new nl . bzk . migratiebrp . conversie . model . lo3 . Lo3PersoonslijstBuilder ( ) ; builder . persoonStapel ( nl . bzk . migratiebrp . conversie . model . testutils . VerplichteStapel . createPersoonStapel ( ) ) ; builder . inschrijvingStapel ( nl . bzk . migratiebrp . conversie . model . testutils . VerplichteStapel . createInschrijvingStapel ( ) ) ; builder . nationaliteitStapel ( nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . lo3Stapel ( nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . lo3Cat ( nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . lo3Nationaliteit ( "0050" , null , null , null ) , nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . lo3Akt ( 1 ) , nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . lo3His ( 19900101 ) , new nl . bzk . migratiebrp . conversie . model . lo3 . herkomst . Lo3Herkomst ( nl . bzk . migratiebrp . conversie . model . lo3 . herkomst . Lo3CategorieEnum . CATEGORIE_54 , 0 , 1 ) ) , nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . lo3Cat ( nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . lo3Nationaliteit ( null , null , null , null ) , nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . lo3Akt ( 2 ) , nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . lo3His ( 20000101 ) , new nl . bzk . migratiebrp . conversie . model . lo3 . herkomst . Lo3Herkomst ( nl . bzk . migratiebrp . conversie . model . lo3 . herkomst . Lo3CategorieEnum . CATEGORIE_04 , 0 , 0 ) ) ) ) ; final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Persoonslijst persoonslijst = builder . build ( ) ; final java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; nl . bzk . migratiebrp . conversie . model . serialize . PersoonslijstEncoder . encodePersoonslijst ( persoonslijst , baos ) ; final byte [ ] data = baos . toByteArray ( ) ; final java . io . ByteArrayInputStream bais = new java . io . ByteArrayInputStream ( data ) ; final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Persoonslijst decodedPl = nl . bzk . migratiebrp . conversie . model . serialize . PersoonslijstDecoder . decodeLo3Persoonslijst ( bais ) ; final java . lang . StringBuilder log = new java . lang . StringBuilder ( ) ; final boolean result = nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . vergelijkPersoonslijst ( log , persoonslijst , decodedPl ) ; "<AssertPlaceHolder>" ; } decodeLo3Persoonslijst ( java . io . InputStream ) { return nl . bzk . migratiebrp . conversie . model . serialize . PersoonslijstDecoder . decode ( nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Persoonslijst . class , in ) ; }
|
org . junit . Assert . assertTrue ( result )
|
testSetText ( ) { org . kie . workbench . common . forms . fields . shared . fieldTypes . basic . selectors . DefaultSelectorOption opt = new org . kie . workbench . common . forms . fields . shared . fieldTypes . basic . selectors . DefaultSelectorOption ( ) ; opt . setText ( org . kie . workbench . common . forms . fields . shared . fieldTypes . basic . selectors . LABEL_B ) ; "<AssertPlaceHolder>" ; } getText ( ) { return text ; }
|
org . junit . Assert . assertSame ( org . kie . workbench . common . forms . fields . shared . fieldTypes . basic . selectors . LABEL_B , opt . getText ( ) )
|
testModifyUserDataChangingAdminSettings ( ) { org . oscm . internal . vo . VOUserDetails user = createUserAndReRetrieveIt ( ) ; user . addUserRole ( UserRoleType . ORGANIZATION_ADMIN ) ; container . login ( java . lang . String . valueOf ( user . getKey ( ) ) , org . oscm . identityservice . bean . ROLE_ORGANIZATION_ADMIN ) ; idMgmt . updateUser ( user ) ; org . oscm . internal . vo . VOUserDetails userUpdated = retrieveUser ( user ) ; "<AssertPlaceHolder>" ; } hasAdminRole ( ) { return getUserRoles ( ) . contains ( UserRoleType . ORGANIZATION_ADMIN ) ; }
|
org . junit . Assert . assertEquals ( false , userUpdated . hasAdminRole ( ) )
|
testConvertFromAvroArray ( ) { org . talend . components . common . config . jdbc . TalendType expectedType = TalendType . LIST ; org . apache . avro . Schema fieldSchema = org . apache . avro . Schema . createArray ( org . apache . avro . Schema . create ( Schema . Type . STRING ) ) ; "<AssertPlaceHolder>" ; } convertFromAvro ( org . apache . avro . Schema ) { org . apache . avro . Schema type = org . talend . daikon . avro . AvroUtils . unwrapIfNullable ( avroType ) ; java . lang . String logicalType = org . talend . daikon . avro . LogicalTypeUtils . getLogicalTypeName ( type ) ; if ( logicalType != null ) { return org . talend . components . common . config . jdbc . TalendType . getTalendByLogicalType ( logicalType ) ; } java . lang . String javaClass = type . getProp ( SchemaConstants . JAVA_CLASS_FLAG ) ; if ( javaClass != null ) { return org . talend . components . common . config . jdbc . TalendType . getTalendByJavaClass ( javaClass ) ; } return org . talend . components . common . config . jdbc . TalendType . getTalendByAvroType ( type . getType ( ) ) ; }
|
org . junit . Assert . assertEquals ( expectedType , org . talend . components . common . config . jdbc . TalendType . convertFromAvro ( fieldSchema ) )
|
verifyOverriddenRootName ( ) { puck . thrifty . Converter c = new puck . thrifty . Converter ( "test" ) ; puck . thrifty . datatype . ObjectElement obj = c . parse ( "{}" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return listType . getName ( ) ; }
|
org . junit . Assert . assertEquals ( "test" , obj . getName ( ) )
|
checkPositionIndex_ok_highest ( ) { final int ret = net . sf . qualitycheck . Check . positionIndex ( 2 , 3 ) ; "<AssertPlaceHolder>" ; } positionIndex ( int , int ) { final boolean isIndexValid = ( ( size >= 0 ) && ( index >= 0 ) ) && ( index < size ) ; if ( ! isIndexValid ) { throw new net . sf . qualitycheck . exception . IllegalPositionIndexException ( index , size ) ; } return index ; }
|
org . junit . Assert . assertEquals ( 2 , ret )
|
testDeleteTrafficManager ( ) { java . lang . Boolean result = client . deleteTrafficManager ( org . rackspace . stingray . client . integration . TESTNAME ) ; "<AssertPlaceHolder>" ; client . getTrafficManager ( org . rackspace . stingray . client . integration . TESTNAME ) ; } deleteTrafficManager ( java . lang . String ) { return deleteItem ( name , ClientConstants . TRAFFICMANAGER_PATH ) ; }
|
org . junit . Assert . assertTrue ( result )
|
testProcessPathInfoNull ( ) { java . lang . String pathInfo = null ; javax . servlet . http . HttpServletRequest req = mock ( javax . servlet . http . HttpServletRequest . class ) ; javax . servlet . http . HttpServletResponse res = mock ( javax . servlet . http . HttpServletResponse . class ) ; javax . servlet . FilterChain chain = mock ( javax . servlet . FilterChain . class ) ; when ( req . getPathInfo ( ) ) . thenReturn ( pathInfo ) ; boolean actual = target . process ( req , res , chain ) ; "<AssertPlaceHolder>" ; } process ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse , javax . servlet . FilterChain ) { java . lang . String pathInfo = req . getPathInfo ( ) ; if ( ( pathInfo != null ) && ( pathInfo . equals ( getExclusionPath ( ) ) ) ) { chain . doFilter ( req , resp ) ; return true ; } return false ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( false ) )
|
testApplyGetOptionString ( ) { env . setSourceRoot ( "/foo/bar" ) ; java . lang . String response = target ( "configuration" ) . path ( "sourceRoot" ) . request ( ) . get ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } getSourceRootPath ( ) { if ( ( sourceRootPath ) == null ) { java . lang . String srcpath = getEnv ( ) . getSourceRootPath ( ) ; if ( srcpath != null ) { sourceRootPath = srcpath . replace ( File . separatorChar , org . opengrok . indexer . index . Indexer . PATH_SEPARATOR ) ; } } return sourceRootPath ; }
|
org . junit . Assert . assertEquals ( response , env . getSourceRootPath ( ) )
|
testCreateRepositoryReturnsSameInstanceOnSecondInvocation ( ) { final org . axonframework . modelling . command . Repository < org . axonframework . disruptor . commandhandling . CommandHandlerInvokerTest . StubAggregate > repository1 = testSubject . createRepository ( mockEventStore , new org . axonframework . disruptor . commandhandling . GenericAggregateFactory ( org . axonframework . disruptor . commandhandling . CommandHandlerInvokerTest . StubAggregate . class ) , snapshotTriggerDefinition , org . axonframework . messaging . annotation . ClasspathParameterResolverFactory . forClass ( org . axonframework . disruptor . commandhandling . CommandHandlerInvokerTest . StubAggregate . class ) ) ; final org . axonframework . modelling . command . Repository < org . axonframework . disruptor . commandhandling . CommandHandlerInvokerTest . StubAggregate > repository2 = testSubject . createRepository ( mockEventStore , new org . axonframework . disruptor . commandhandling . GenericAggregateFactory ( org . axonframework . disruptor . commandhandling . CommandHandlerInvokerTest . StubAggregate . class ) , snapshotTriggerDefinition , org . axonframework . messaging . annotation . ClasspathParameterResolverFactory . forClass ( org . axonframework . disruptor . commandhandling . CommandHandlerInvokerTest . StubAggregate . class ) ) ; "<AssertPlaceHolder>" ; } forClass ( java . lang . Class ) { return org . axonframework . messaging . annotation . ClasspathParameterResolverFactory . forClassLoader ( ( clazz == null ? null : clazz . getClassLoader ( ) ) ) ; }
|
org . junit . Assert . assertSame ( repository1 , repository2 )
|
testLeadActivityWithEmptyActivitiesREST ( ) { org . talend . components . marketo . tmarketoinput . TMarketoInputProperties props = getRESTProperties ( ) ; props . inputOperation . setValue ( getLeadActivity ) ; java . lang . String since = new java . text . SimpleDateFormat ( org . talend . components . marketo . MarketoConstants . DATETIME_PATTERN_PARAM ) . format ( new java . util . Date ( ( ( new java . util . Date ( ) . getTime ( ) ) - 10000000 ) ) ) ; props . sinceDateTime . setValue ( since ) ; props . batchSize . setValue ( 300 ) ; props . afterInputOperation ( ) ; props . beforeMappingInput ( ) ; props . setIncludeTypes . setValue ( true ) ; reader = getReader ( props ) ; "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "Shouldn't<sp>be<sp>here" ) ; } start ( ) { started = true ; makeHttpRequest ( ) ; return hasMoreRecords ; }
|
org . junit . Assert . assertTrue ( reader . start ( ) )
|
testIncludeSeverity2 ( ) { com . cflint . BugInfo bugInfo = new com . cflint . BugInfo . BugInfoBuilder ( ) . setFunction ( "testf" ) . setMessageCode ( "PARSE_ERROR" ) . setSeverity ( Levels . WARNING ) . build ( ) ; com . cflint . tools . CFLintFilter filter = com . cflint . tools . CFLintFilter . createFilter ( "[{\"severity\":\"INFO\"}]" ) ; "<AssertPlaceHolder>" ; } include ( java . lang . String [ ] ) { return include ( java . util . Arrays . asList ( codes ) ) ; }
|
org . junit . Assert . assertTrue ( filter . include ( bugInfo ) )
|
tabShouldBeReturned ( ) { tab . setFile ( file ) ; "<AssertPlaceHolder>" ; } getFile ( ) { return file ; }
|
org . junit . Assert . assertEquals ( file , tab . getFile ( ) )
|
testGetFolderInRoot ( ) { java . nio . file . Path folder = rootPath . resolve ( "o7fhgU" ) ; org . peerbox . watchservice . filetree . composite . FileComponent f = createFolder ( folder ) ; rootFolder . putComponent ( folder , f ) ; org . peerbox . watchservice . filetree . composite . FileComponent get = rootFolder . getComponent ( folder ) ; "<AssertPlaceHolder>" ; } getComponent ( java . nio . file . Path ) { if ( remainingPath . equals ( getPath ( ) ) ) { return this ; } remainingPath = stripOffPrefix ( remainingPath , getPath ( ) ) ; java . nio . file . Path nextLevelPath = remainingPath . getName ( 0 ) ; org . peerbox . watchservice . filetree . composite . FileComponent nextLevel = children . get ( nextLevelPath ) ; if ( nextLevel == null ) { return null ; } else if ( ( remainingPath . getNameCount ( ) ) == 1 ) { return nextLevel ; } else if ( nextLevel . isFolder ( ) ) { java . nio . file . Path newRemainingPath = remainingPath . subpath ( 1 , remainingPath . getNameCount ( ) ) ; return ( ( org . peerbox . watchservice . filetree . composite . FolderComposite ) ( nextLevel ) ) . getComponent ( newRemainingPath ) ; } else { return null ; } }
|
org . junit . Assert . assertEquals ( get , f )
|
shouldHandleOperatorButNoCriteria ( ) { final org . atomhopper . hibernate . query . SimpleCategoryCriteriaGenerator generator = new org . atomhopper . hibernate . query . SimpleCategoryCriteriaGenerator ( "+" , inclusionTerms ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 0 , inclusionTerms . size ( ) )
|
testOldCallSid ( ) { java . lang . String sidString = "CA6dcfdfd531e44ae4ac30e8f97e071ab2" ; try { org . restcomm . connect . commons . dao . Sid sid = new org . restcomm . connect . commons . dao . Sid ( sidString ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( "invalid<sp>validation" ) ; } }
|
org . junit . Assert . assertTrue ( ( sid != null ) )
|
testErrorsJsonView ( ) { org . springframework . validation . BindException errors = new org . springframework . validation . BindException ( new java . lang . Object ( ) , "baseUrl" ) ; errors . reject ( "foo" , "Foo" ) ; model . put ( "errors" , errors ) ; model . put ( "baseUrl" , "http://localhost:8080/springsource" ) ; standard . render ( model , request , response ) ; java . lang . String content = response . getContentAsString ( ) ; org . springframework . batch . admin . web . views . JsonWrapper wrapper = new org . springframework . batch . admin . web . views . JsonWrapper ( content ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , java . lang . Class ) { return ( ( T ) ( parser . parseExpression ( expression ) . getValue ( context , target ) ) ) ; }
|
org . junit . Assert . assertEquals ( 1 , wrapper . get ( "errors" , java . util . Map . class ) . size ( ) )
|
testIsSingleItem ( ) { "<AssertPlaceHolder>" ; } isItemEndpoint ( ) { return endpointResource . hasProperty ( RDF . type , API . ItemEndpoint ) ; }
|
org . junit . Assert . assertFalse ( page . isItemEndpoint ( ) )
|
deveObterQuantidadeBCCIDEComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProdutoCombustivelCIDE cide = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProdutoCombustivelCIDE ( ) ; cide . setQuantidadeBCCIDE ( new java . math . BigDecimal ( "99999999999.9999" ) ) ; "<AssertPlaceHolder>" ; } getQuantidadeBCCIDE ( ) { return this . quantidadeBCCIDE ; }
|
org . junit . Assert . assertEquals ( "99999999999.9999" , cide . getQuantidadeBCCIDE ( ) )
|
normalize ( ) { double a = this . random . nextDouble ( ) ; double b = this . random . nextDouble ( ) ; double c = this . random . nextDouble ( ) ; double d = this . random . nextDouble ( ) ; org . arakhne . afc . math . geometry . d3 . continuous . Quaternion q1 = new org . arakhne . afc . math . geometry . d3 . continuous . Quaternion ( ) ; q1 . setW ( a ) ; q1 . setX ( b ) ; q1 . setY ( c ) ; q1 . setZ ( d ) ; org . arakhne . afc . math . geometry . d3 . continuous . Quaternion q2 = new org . arakhne . afc . math . geometry . d3 . continuous . Quaternion ( b , c , d , a ) ; q1 . normalize ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( object instanceof org . arakhne . afc . vmutil . MACNumber ) ) { return false ; } final byte [ ] bao = ( ( org . arakhne . afc . vmutil . MACNumber ) ( object ) ) . bytes ; if ( ( bao . length ) != ( this . bytes . length ) ) { return false ; } for ( int i = 0 ; i < ( bao . length ) ; ++ i ) { if ( ( bao [ i ] ) != ( this . bytes [ i ] ) ) { return false ; } } return true ; }
|
org . junit . Assert . assertTrue ( q1 . equals ( q2 ) )
|
testEstimateSizeInBytesDouble ( ) { org . sagebionetworks . repo . model . dbo . dao . migration . ByteSizeUtilsTest . AllKinds object = new org . sagebionetworks . repo . model . dbo . dao . migration . ByteSizeUtilsTest . AllKinds ( ) ; object . setDoubleField ( 123.556 ) ; org . springframework . jdbc . core . namedparam . BeanPropertySqlParameterSource source = new org . springframework . jdbc . core . namedparam . BeanPropertySqlParameterSource ( object ) ; int expected = Double . SIZE ; int size = org . sagebionetworks . repo . model . dbo . migration . ByteSizeUtils . estimateSizeInBytes ( source ) ; "<AssertPlaceHolder>" ; } estimateSizeInBytes ( org . springframework . jdbc . core . namedparam . BeanPropertySqlParameterSource ) { if ( object == null ) return 0 ; int size = 0 ; java . lang . String [ ] names = object . getReadablePropertyNames ( ) ; for ( java . lang . String name : names ) { java . lang . Object value = object . getValue ( name ) ; if ( value != null ) { int type = object . getSqlType ( name ) ; if ( ( java . sql . Types . VARCHAR ) == type ) { java . lang . String string = ( ( java . lang . String ) ( value ) ) ; size += ( string . length ( ) ) * ( Character . SIZE ) ; } else if ( ( java . sql . Types . BIGINT ) == type ) { size += Long . SIZE ; } else if ( ( java . sql . Types . TIMESTAMP ) == type ) { size += Long . SIZE ; } else if ( ( java . sql . Types . DOUBLE ) == type ) { size += Double . SIZE ; } else if ( ( java . sql . Types . SMALLINT ) == type ) { size += Integer . SIZE ; } else if ( ( java . sql . Types . INTEGER ) == type ) { size += Integer . SIZE ; } else if ( ( java . sql . Types . BOOLEAN ) == type ) { size += 1 ; } else if ( ( Integer . MIN_VALUE ) == type ) { if ( value instanceof byte [ ] ) { byte [ ] array = ( ( byte [ ] ) ( value ) ) ; size += array . length ; } else if ( value instanceof java . lang . Class ) { } else if ( value . getClass ( ) . isEnum ( ) ) { try { java . lang . reflect . Method nameMethod = value . getClass ( ) . getMethod ( "name" ) ; java . lang . String enumName = ( ( java . lang . String ) ( nameMethod . invoke ( value , null ) ) ) ; size += ( enumName . length ( ) ) * ( Character . SIZE ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } } else if ( value instanceof java . lang . Boolean ) { size += 1 ; } else { } } else { throw new java . lang . IllegalArgumentException ( ( ( ( ( ( "Unknown<sp>SQL<sp>type:<sp>" + type ) + "<sp>for<sp>name:<sp>" ) + name ) + "<sp>value<sp>class:<sp>" ) + ( value . getClass ( ) ) ) ) ; } } } return size ; }
|
org . junit . Assert . assertEquals ( expected , size )
|
testStoreAccessToken ( ) { java . lang . String clientId = "4444-4444-4444-4441" ; org . springframework . security . oauth2 . common . DefaultOAuth2AccessToken token = new org . springframework . security . oauth2 . common . DefaultOAuth2AccessToken ( "some-long-oauth2-token-value-9" ) ; org . springframework . security . oauth2 . common . ExpiringOAuth2RefreshToken refreshToken = new org . springframework . security . oauth2 . common . DefaultExpiringOAuth2RefreshToken ( "some-long-oauth2-refresh-value-9" , new java . util . Date ( ) ) ; token . setRefreshToken ( refreshToken ) ; token . setScope ( new java . util . HashSet < java . lang . String > ( java . util . Arrays . asList ( "some-long-oauth2-token-value-9" 4 , "/orcid-works/read" ) ) ) ; token . setTokenType ( "some-long-oauth2-token-value-9" 0 ) ; token . setExpiration ( new java . util . Date ( ) ) ; token . setAdditionalInformation ( new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ) ; java . util . Map < java . lang . String , java . lang . String > parameters = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; parameters . put ( "client_id" , clientId ) ; parameters . put ( "some-long-oauth2-token-value-9" 5 , "some-long-oauth2-token-value-9" 3 ) ; parameters . put ( "scope" , "/orcid-profile/write" ) ; parameters . put ( "redirect_uri" , "http://www.google.com/" ) ; parameters . put ( "response_type" , "some-long-oauth2-token-value-9" 0 ) ; org . springframework . security . oauth2 . provider . OAuth2Request request = new org . springframework . security . oauth2 . provider . OAuth2Request ( java . util . Collections . < java . lang . String , java . lang . String > emptyMap ( ) , clientId , java . util . Collections . < org . springframework . security . core . GrantedAuthority > emptyList ( ) , true , new java . util . HashSet < java . lang . String > ( java . util . Arrays . asList ( "some-long-oauth2-token-value-9" 1 ) ) , java . util . Collections . < java . lang . String > emptySet ( ) , null , java . util . Collections . < java . lang . String > emptySet ( ) , java . util . Collections . < java . lang . String , java . io . Serializable > emptyMap ( ) ) ; org . orcid . persistence . jpa . entities . ProfileEntity profileEntity = profileEntityManager . findByOrcid ( "some-long-oauth2-token-value-9" 2 ) ; org . orcid . core . oauth . OrcidOauth2UserAuthentication userAuthentication = new org . orcid . core . oauth . OrcidOauth2UserAuthentication ( profileEntity , true ) ; org . springframework . security . oauth2 . provider . OAuth2Authentication authentication = new org . springframework . security . oauth2 . provider . OAuth2Authentication ( request , userAuthentication ) ; orcidTokenStoreService . storeAccessToken ( token , authentication ) ; org . springframework . security . oauth2 . common . OAuth2AccessToken oAuth2AccessToken = orcidTokenStoreService . readAccessToken ( "some-long-oauth2-token-value-9" ) ; "<AssertPlaceHolder>" ; } readAccessToken ( java . lang . String ) { if ( tokenValue == null ) { return null ; } org . orcid . persistence . jpa . entities . OrcidOauth2TokenDetail detail = orcidOauthTokenDetailService . findNonDisabledByTokenValue ( tokenValue ) ; return getOauth2AccessTokenFromDetails ( detail ) ; }
|
org . junit . Assert . assertNotNull ( oAuth2AccessToken )
|
testJoinMatcherRejectsLeftJoinPcj ( ) { final java . lang . String query1 = "" + ( ( ( ( ( "SELECT<sp>?e<sp>?c<sp>?l" + "{" ) + "<sp>?e<sp>a<sp>?c<sp>.<sp>" ) + "<sp>?e<sp><uri:talksTo><sp>?l<sp>.<sp>" ) + "<sp>?e<sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?l<sp>" ) + "}" ) ; final java . lang . String query2 = "" + ( ( ( ( ( "SELECT<sp>?a<sp>?b<sp>?m" + "{" ) + "<sp>?e<sp>a<sp>?c<sp>.<sp>" 0 ) + "<sp>?a<sp><uri:talksTo><sp>?m<sp>.<sp>" ) + "<sp>OPTIONAL<sp>{?a<sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?m}<sp>.<sp>" ) + "}" ) ; final org . eclipse . rdf4j . query . parser . sparql . SPARQLParser parser = new org . eclipse . rdf4j . query . parser . sparql . SPARQLParser ( ) ; final org . eclipse . rdf4j . query . parser . ParsedQuery pq1 = parser . parseQuery ( query1 , null ) ; final org . eclipse . rdf4j . query . parser . ParsedQuery pq2 = parser . parseQuery ( query2 , null ) ; final org . eclipse . rdf4j . query . algebra . TupleExpr te1 = pq1 . getTupleExpr ( ) ; final org . eclipse . rdf4j . query . algebra . TupleExpr te2 = pq2 . getTupleExpr ( ) ; final org . eclipse . rdf4j . query . algebra . TupleExpr expected = te1 . clone ( ) ; final org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet pcj = new org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ( ( ( org . eclipse . rdf4j . query . algebra . Projection ) ( te2 ) ) ) ; final java . util . List < org . apache . rya . indexing . external . tupleSet . ExternalTupleSet > externalList = new java . util . ArrayList ( ) ; externalList . add ( pcj ) ; provider . setIndices ( externalList ) ; final org . apache . rya . indexing . pcj . matching . PCJOptimizer optimizer = new org . apache . rya . indexing . pcj . matching . PCJOptimizer ( externalList , false , provider ) ; optimizer . optimize ( te1 , null , null ) ; "<AssertPlaceHolder>" ; } optimize ( org . eclipse . rdf4j . query . algebra . TupleExpr , org . eclipse . rdf4j . query . Dataset , org . eclipse . rdf4j . query . BindingSet ) { tupleExpr . visit ( new org . apache . rya . accumulo . pig . optimizer . SimilarVarJoinOptimizer . JoinVisitor ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , te1 )
|
test19 ( ) { byte [ ] expected = new byte [ ] { ( ( byte ) ( 97 ) ) , ( ( byte ) ( 98 ) ) , ( ( byte ) ( 99 ) ) , ( ( byte ) ( 0 ) ) } ; java . lang . String str = new java . lang . String ( "abc" ) ; "<AssertPlaceHolder>" ; } build_null_str ( java . lang . String ) { return com . github . mpjct . jmpjct . mysql . proto . Proto . build_null_str ( str , false ) ; }
|
org . junit . Assert . assertArrayEquals ( expected , com . github . mpjct . jmpjct . mysql . proto . Proto . build_null_str ( str ) )
|
testUpCastRetainsSuperInterfaceValues ( ) { org . apache . beam . sdk . options . ProxyInvocationHandler handler = new org . apache . beam . sdk . options . ProxyInvocationHandler ( org . apache . beam . vendor . guava . v20_0 . com . google . common . collect . Maps . newHashMap ( ) ) ; org . apache . beam . sdk . options . ProxyInvocationHandlerTest . SubClass extended = handler . as ( org . apache . beam . sdk . options . ProxyInvocationHandlerTest . SubClass . class ) ; extended . setString ( "parentValue" ) ; org . apache . beam . sdk . options . ProxyInvocationHandlerTest . Simple simple = extended . as ( org . apache . beam . sdk . options . ProxyInvocationHandlerTest . Simple . class ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( "parentValue" , simple . getString ( ) )
|
testIsDebugEnabledWithYesFilter ( ) { addYesFilter ( ) ; logger . setLevel ( Level . INFO ) ; "<AssertPlaceHolder>" ; } isDebugEnabled ( ) { return isDebugEnabled ( null ) ; }
|
org . junit . Assert . assertTrue ( logger . isDebugEnabled ( ) )
|
close ( ) { final java . util . concurrent . atomic . AtomicBoolean called = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; final java . util . function . Supplier < io . trane . ndbc . postgres . Connection > sup = new io . trane . ndbc . postgres . ConnectionTest . ConnectionSupplier ( ) { @ io . trane . ndbc . postgres . Override io . trane . ndbc . proto . Channel channel ( ) { return new io . trane . ndbc . postgres . ConnectionTest . TestChannel ( ) { @ io . trane . ndbc . postgres . Override public io . trane . future . Future < java . lang . Void > close ( ) { called . set ( true ) ; return io . trane . future . Future . VOID ; } } ; } } ; sup . get ( ) . close ( ) . get ( timeout ) ; "<AssertPlaceHolder>" ; } get ( ) { io . trane . ndbc . mysql . embedded . EmbeddedSupplier . log . info ( ( ( ( "Starting<sp>embedded<sp>mysql<sp>" + ( version ) ) + "<sp>on<sp>port<sp>" ) + ( config . port ( ) ) ) ) ; final java . lang . String password = config . password ( ) . orElseGet ( ( ) -> { throw new java . lang . UnsupportedOperationException ( "Embedded<sp>mysql<sp>requires<sp>a<sp>password" ) ; } ) ; final com . wix . mysql . config . DownloadConfig downloadConfig = com . wix . mysql . config . DownloadConfig . aDownloadConfig ( ) . withCacheDir ( java . nio . file . Paths . get ( java . lang . System . getProperty ( "user.home" ) , ".ndbc" , "embedded_mysql" ) . toString ( ) ) . build ( ) ; final com . wix . mysql . config . MysqldConfig mysqldConfig = com . wix . mysql . config . MysqldConfig . aMysqldConfig ( version ) . withPort ( config . port ( ) ) . withUser ( config . user ( ) , password ) . build ( ) ; final com . wix . mysql . EmbeddedMysql . Builder builder = com . wix . mysql . EmbeddedMysql . anEmbeddedMysql ( mysqldConfig , downloadConfig ) ; config . database ( ) . ifPresent ( ( db ) -> builder . addSchema ( com . wix . mysql . config . SchemaConfig . aSchemaConfig ( db ) . build ( ) ) ) ; final com . wix . mysql . EmbeddedMysql mysql = builder . start ( ) ; java . lang . Runtime . getRuntime ( ) . addShutdownHook ( new java . lang . Thread ( ( ) -> mysql . stop ( ) ) ) ; io . trane . ndbc . mysql . embedded . EmbeddedSupplier . log . info ( ( ( "mysql<sp>" + ( version ) ) + "<sp>started" ) ) ; io . trane . ndbc . DataSource < io . trane . ndbc . PreparedStatement , io . trane . ndbc . Row > underlying = io . trane . ndbc . DataSource . fromConfig ( config . embedded ( java . util . Optional . empty ( ) ) ) ; return new io . trane . ndbc . datasource . ProxyDataSource < io . trane . ndbc . PreparedStatement , io . trane . ndbc . Row > ( underlying ) { @ io . trane . ndbc . mysql . embedded . Override public io . trane . ndbc . Config config ( ) { return io . trane . ndbc . mysql . embedded . EmbeddedSupplier . this . config ; } } ; }
|
org . junit . Assert . assertTrue ( called . get ( ) )
|
testIsNotEmpty ( ) { com . eclipsesource . v8 . utils . V8Map < java . lang . String > map = new com . eclipsesource . v8 . utils . V8Map < java . lang . String > ( ) ; com . eclipsesource . v8 . V8Object v1 = new com . eclipsesource . v8 . V8Object ( v8 ) ; map . put ( v1 , "foo" ) ; v1 . close ( ) ; "<AssertPlaceHolder>" ; map . close ( ) ; } isEmpty ( ) { return map . isEmpty ( ) ; }
|
org . junit . Assert . assertFalse ( map . isEmpty ( ) )
|
emptyWhenWhitespace ( ) { java . lang . String [ ] testArray = new java . lang . String [ ] { "<sp>" , "\n\n\n\n" , "\t\t\t\t" , "<sp>\n<sp>\t<sp>" } ; summarizer = new cam . cl . kilo . NLP . MEADSummarizer ( testArray , "P10" , MEADSummarizer . LOCALHOST ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( getSummLength ( ) ) == 0 ; }
|
org . junit . Assert . assertTrue ( summarizer . isEmpty ( ) )
|
testRepeatedRestOpArray ( ) { org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . ST ( "<rest(names)>,<sp><rest(names)>" ) ; e . add ( "names" , new java . lang . String [ ] { "Ter" , "Tom" } ) ; java . lang . String expecting = "Tom,<sp>Tom" ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
|
org . junit . Assert . assertEquals ( expecting , e . render ( ) )
|
testSelectNoTargetSkip ( ) { com . orientechnologies . orient . core . sql . executor . OResultSet result = com . orientechnologies . orient . core . sql . executor . OSelectStatementExecutionTest . db . query ( "select<sp>1<sp>as<sp>one,<sp>2<sp>as<sp>two,<sp>2+3<sp>skip<sp>1" ) ; "<AssertPlaceHolder>" ; com . orientechnologies . orient . core . sql . executor . ExecutionPlanPrintUtils . printExecutionPlan ( result ) ; result . close ( ) ; } hasNext ( ) { return this . itty . hasNext ( ) ; }
|
org . junit . Assert . assertFalse ( result . hasNext ( ) )
|
hasZeroSeconds ( ) { "<AssertPlaceHolder>" ; } seconds ( ) { return ( totalTimeInSeconds ) % 60 ; }
|
org . junit . Assert . assertEquals ( 0 , time . seconds ( ) )
|
testSingleFastJobWithNoListener ( ) { org . apache . tuscany . sca . core . work . impl . TimeDelayWork fast = new org . apache . tuscany . sca . core . work . impl . TimeDelayWork ( 10 ) ; org . apache . tuscany . sca . core . work . impl . ThreadPoolWorkManagerTestCase . workManager . schedule ( fast ) ; long startTime = java . lang . System . currentTimeMillis ( ) ; while ( true ) { int completedCount = fast . getRunCompletedCount ( ) ; if ( completedCount == 1 ) { break ; } if ( ( ( java . lang . System . currentTimeMillis ( ) ) - startTime ) > ( org . apache . tuscany . sca . core . work . impl . ThreadPoolWorkManagerTestCase . WAIT_TIMEOUT ) ) { org . junit . Assert . fail ( ( ( "Only<sp>" + completedCount ) + "<sp>work<sp>items<sp>completed<sp>before<sp>timeout" ) ) ; return ; } try { java . lang . Thread . sleep ( 25 ) ; } catch ( java . lang . InterruptedException ex ) { org . junit . Assert . fail ( ( "Unexpected<sp>exception:<sp>" + ex ) ) ; } } "<AssertPlaceHolder>" ; } getRunCompletedCount ( ) { return runCompletedCount . get ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , fast . getRunCompletedCount ( ) )
|
testBuildWithDisabledDefaultConstraintsWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . enrolment . status . EnrolmentStatus context = new org . lnu . is . domain . enrolment . status . EnrolmentStatus ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "enrolment" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "specOfferWave" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy3 = new org . lnu . is . pagination . OrderBy ( "enrolmentStatusType" , org . lnu . is . pagination . OrderByType . ASC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 , orderBy3 ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>EnrolmentStatus<sp>e<sp>ORDER<sp>BY<sp>e.enrolment<sp>ASC,<sp>e.specOfferWave<sp>DESC,<sp>e.enrolmentStatusType<sp>ASC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . enrolment . status . EnrolmentStatus > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
testPluginSilverlight ( ) { request . setPluginSilverlight ( true ) ; "<AssertPlaceHolder>" ; } getPluginSilverlight ( ) { return getBooleanParameter ( org . piwik . java . tracking . PiwikRequest . PLUGIN_SILVERLIGHT ) ; }
|
org . junit . Assert . assertEquals ( true , request . getPluginSilverlight ( ) )
|
status ( ) { nginxAgentClient . api ( com . jslsolucoes . nginx . admin . agent . client . api . NginxAgentClientApis . status ( ) ) . withAuthorizationKey ( "fdoinsafodsoianoifd" ) . withEndpoint ( "http://192.168.99.100:3000" ) . build ( ) . status ( ) . thenAccept ( ( nginxResponse ) -> { if ( nginxResponse . error ( ) ) { com . jslsolucoes . nginx . admin . agent . model . response . NginxExceptionResponse nginxExceptionResponse = ( ( com . jslsolucoes . nginx . admin . agent . model . response . NginxExceptionResponse ) ( nginxResponse ) ) ; org . junit . Assert . fail ( nginxExceptionResponse . getStackTrace ( ) ) ; } else if ( nginxResponse . forbidden ( ) ) { com . jslsolucoes . nginx . admin . agent . model . response . NginxAuthenticationFailResponse nginxAuthenticationFailResponse = ( ( com . jslsolucoes . nginx . admin . agent . model . response . NginxAuthenticationFailResponse ) ( nginxResponse ) ) ; org . junit . Assert . fail ( nginxAuthenticationFailResponse . getMessage ( ) ) ; } else { com . jslsolucoes . nginx . admin . agent . model . response . NginxStatusResponse nginxStatusResponse = ( ( com . jslsolucoes . nginx . admin . agent . model . response . NginxStatusResponse ) ( nginxResponse ) ) ; "<AssertPlaceHolder>" ; } } ) . join ( ) ; } getAccepts ( ) { return accepts ; }
|
org . junit . Assert . assertTrue ( ( ( nginxStatusResponse . getAccepts ( ) ) > 0 ) )
|
testImmuneEncode ( ) { java . lang . String encoded = codec . encode ( immunityList , string ) ; "<AssertPlaceHolder>" ; } encode ( char [ ] , java . lang . String ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( int offset = 0 ; offset < ( input . length ( ) ) ; ) { final int point = input . codePointAt ( offset ) ; if ( java . lang . Character . isValidCodePoint ( point ) ) { sb . append ( encodeCharacter ( immune , point ) ) ; } offset += java . lang . Character . charCount ( point ) ; } return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( string , encoded )
|
testGetActionUrl_absoluteUriWithAuthority ( ) { java . lang . String [ ] uris = new java . lang . String [ ] { "http://example.com/foo/bar" , "https://example.com/foo/bar" , "ftp://example.com/foo/bar" , "svn+ssh://nobody@example.com/foo/bar" } ; for ( java . lang . String uri : uris ) { java . lang . String result = hudson . Functions . getActionUrl ( null , hudson . FunctionsTest . createMockAction ( uri ) ) ; "<AssertPlaceHolder>" ; } } createMockAction ( java . lang . String ) { hudson . model . Action action = mock ( hudson . model . Action . class ) ; when ( action . getUrlName ( ) ) . thenReturn ( uri ) ; return action ; }
|
org . junit . Assert . assertEquals ( uri , result )
|
testAuthHandlerFailing ( ) { java . lang . String secret = java . util . UUID . randomUUID ( ) . toString ( ) ; loghub . security . JWTHandler handler = loghub . security . JWTHandler . getBuilder ( ) . setAlg ( "HMAC256" ) . secret ( secret ) . build ( ) ; loghub . security . AuthenticationHandler authHandler = loghub . security . AuthenticationHandler . getBuilder ( ) . setJwtHandler ( handler ) . useJwt ( true ) . build ( ) ; java . security . Principal p = new javax . management . remote . JMXPrincipal ( "user" ) ; java . lang . String token = handler . getToken ( p , ( i ) -> i . withClaim ( "unittest" , true ) ) ; token = token . substring ( 0 , ( ( token . length ( ) ) - 1 ) ) ; loghub . security . JWTHandler . JWTPrincipal newp = ( ( loghub . security . JWTHandler . JWTPrincipal ) ( authHandler . checkJwt ( token ) ) ) ; "<AssertPlaceHolder>" ; } checkJwt ( java . lang . String ) { if ( ( jwtHandler ) != null ) { loghub . security . AuthenticationHandler . logger . debug ( "testing<sp>JWT<sp>token" ) ; try { return jwtHandler . verifyToken ( token ) ; } catch ( com . auth0 . jwt . exceptions . JWTVerificationException e ) { loghub . security . AuthenticationHandler . logger . warn ( "Failed<sp>token<sp>{}:<sp>{}" , token , e . getMessage ( ) ) ; loghub . security . AuthenticationHandler . logger . catching ( Level . DEBUG , e ) ; return null ; } } else { return null ; } }
|
org . junit . Assert . assertNull ( newp )
|
shouldCreateFewProjectByBatch ( ) { java . util . List < org . eclipse . che . api . project . shared . dto . NewProjectConfigDto > configs = java . util . Arrays . asList ( prjConfig1 , prjConfig2 ) ; client . createBatchProjects ( configs ) ; verify ( requestFactory ) . createPostRequest ( anyString ( ) , prjsArgCaptor . capture ( ) ) ; verify ( asyncRequest ) . header ( org . eclipse . che . ide . project . ACCEPT , org . eclipse . che . ide . MimeType . APPLICATION_JSON ) ; verify ( loaderFactory ) . newLoader ( "Creating<sp>the<sp>batch<sp>of<sp>projects..." ) ; verify ( asyncRequest ) . loader ( messageLoader ) ; verify ( asyncRequest ) . send ( unmarshallablePrjsConf ) ; verify ( unmarshaller ) . newListUnmarshaller ( org . eclipse . che . api . workspace . shared . dto . ProjectConfigDto . class ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertEquals ( 2 , prjsArgCaptor . getValue ( ) . size ( ) )
|
testInsert_Embedded ( ) { com . jmethods . catatumbo . entities . Customer entity = com . jmethods . catatumbo . entities . Customer . createSampleCustomer1 ( ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ) ; com . jmethods . catatumbo . entities . Customer entity2 = com . jmethods . catatumbo . EntityManagerTest . em . load ( com . jmethods . catatumbo . entities . Customer . class , entity . getId ( ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == null ) { return false ; } if ( ! ( obj instanceof com . jmethods . catatumbo . GeoLocation ) ) { return false ; } com . jmethods . catatumbo . GeoLocation that = ( ( com . jmethods . catatumbo . GeoLocation ) ( obj ) ) ; return ( ( this . latitude ) == ( that . latitude ) ) && ( ( this . longitude ) == ( that . longitude ) ) ; }
|
org . junit . Assert . assertTrue ( entity . equals ( entity2 ) )
|
shouldProduceCompleteBatchesPerOwner ( ) { org . neo4j . unsafe . impl . batchimport . Configuration config = org . neo4j . unsafe . impl . batchimport . Configuration . withBatchSize ( org . neo4j . unsafe . impl . batchimport . Configuration . DEFAULT , 10 ) ; java . util . Iterator < org . neo4j . kernel . impl . store . record . RelationshipGroupRecord > groups = org . neo4j . unsafe . impl . batchimport . ReadGroupsFromCacheStepTest . groups ( new org . neo4j . unsafe . impl . batchimport . ReadGroupsFromCacheStepTest . Group ( 1 , 3 ) , new org . neo4j . unsafe . impl . batchimport . ReadGroupsFromCacheStepTest . Group ( 2 , 3 ) , new org . neo4j . unsafe . impl . batchimport . ReadGroupsFromCacheStepTest . Group ( 3 , 4 ) , new org . neo4j . unsafe . impl . batchimport . ReadGroupsFromCacheStepTest . Group ( 4 , 2 ) , new org . neo4j . unsafe . impl . batchimport . ReadGroupsFromCacheStepTest . Group ( 5 , 10 ) , new org . neo4j . unsafe . impl . batchimport . ReadGroupsFromCacheStepTest . Group ( 6 , 35 ) , new org . neo4j . unsafe . impl . batchimport . ReadGroupsFromCacheStepTest . Group ( 7 , 2 ) ) . iterator ( ) ; final java . util . concurrent . atomic . AtomicInteger processCounter = new java . util . concurrent . atomic . AtomicInteger ( ) ; org . neo4j . unsafe . impl . batchimport . staging . Stage stage = new org . neo4j . unsafe . impl . batchimport . staging . Stage ( getClass ( ) . getSimpleName ( ) , null , config , 0 ) { { add ( new org . neo4j . unsafe . impl . batchimport . ReadGroupsFromCacheStep ( control ( ) , config , groups , 1 ) ) ; add ( new org . neo4j . unsafe . impl . batchimport . ReadGroupsFromCacheStepTest . VerifierStep ( control ( ) , config , processCounter ) ) ; } } ; superviseDynamicExecution ( stage ) ; "<AssertPlaceHolder>" ; } get ( ) { org . neo4j . kernel . recovery . LogTailScanner . LogTailInformation logTailInformation = logTailScanner . getTailInformation ( ) ; org . neo4j . kernel . impl . transaction . log . entry . CheckPoint lastCheckPoint = logTailInformation . lastCheckPoint ; long txIdAfterLastCheckPoint = logTailInformation . firstTxIdAfterLastCheckPoint ; if ( ! ( logTailInformation . commitsAfterLastCheckpoint ( ) ) ) { monitor . noCommitsAfterLastCheckPoint ( ( lastCheckPoint != null ? lastCheckPoint . getLogPosition ( ) : null ) ) ; return createRecoveryInformation ( LogPosition . UNSPECIFIED , txIdAfterLastCheckPoint ) ; } if ( lastCheckPoint != null ) { monitor . commitsAfterLastCheckPoint ( lastCheckPoint . getLogPosition ( ) , txIdAfterLastCheckPoint ) ; return createRecoveryInformation ( lastCheckPoint . getLogPosition ( ) , txIdAfterLastCheckPoint ) ; } else { if ( ( logTailInformation . oldestLogVersionFound ) != ( INITIAL_LOG_VERSION ) ) { long fromLogVersion = java . lang . Math . max ( org . neo4j . kernel . recovery . INITIAL_LOG_VERSION , logTailInformation . oldestLogVersionFound ) ; throw new org . neo4j . kernel . impl . store . UnderlyingStorageException ( ( ( ( "No<sp>check<sp>point<sp>found<sp>in<sp>any<sp>log<sp>file<sp>from<sp>version<sp>" + fromLogVersion ) + "<sp>to<sp>" ) + ( logTailInformation . currentLogVersion ) ) ) ; } monitor . noCheckPointFound ( ) ; return createRecoveryInformation ( org . neo4j . kernel . impl . transaction . log . LogPosition . start ( 0 ) , txIdAfterLastCheckPoint ) ; } }
|
org . junit . Assert . assertEquals ( 4 , processCounter . get ( ) )
|
testFalseBuitenlandsePlaatsOngelijk ( ) { final java . util . Set < nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Relatie > relatieSet = java . util . Collections . singleton ( relatie ) ; org . mockito . Mockito . when ( persoon . getRelaties ( ) ) . thenReturn ( relatieSet ) ; org . mockito . Mockito . when ( relatie . getDatumAanvang ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . DATUM_AANVANG ) ; org . mockito . Mockito . when ( relatie . getGemeenteAanvang ( ) ) . thenReturn ( null ) ; org . mockito . Mockito . when ( relatie . getBuitenlandsePlaatsAanvang ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . BUITENLANDSE_PLAATS_AANVANG ) ; org . mockito . Mockito . when ( relatie . getLandOfGebiedAanvang ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . LAND_AANVANG ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht verzoek = new nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieSoortGroepType relatieSoortGroep = new nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieSoortGroepType ( ) ; relatieSoortGroep . setSoort ( SoortRelatieType . H ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType . Sluiting sluiting = new nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType . Sluiting ( ) ; sluiting . setSoort ( relatieSoortGroep ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieSluitingGroepType relatieSluiting = new nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieSluitingGroepType ( ) ; relatieSluiting . setDatum ( java . math . BigInteger . valueOf ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . DATUM_AANVANG ) ) ; relatieSluiting . setLand ( java . lang . String . valueOf ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . LAND_AANVANG . getCode ( ) ) ) ; relatieSluiting . setPlaats ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . HuwelijkControleTest . BUITENLANDSE_PLAATS_AANVANG_LANG ) ; sluiting . setSluiting ( relatieSluiting ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType relatieType = new nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType ( ) ; relatieType . setSluiting ( sluiting ) ; verzoek . setRelatie ( relatieType ) ; "<AssertPlaceHolder>" ; } controleer ( nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Persoon , nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ) { final nl . bzk . migratiebrp . bericht . model . sync . generated . PersoonType persoon = verzoek . getPersoon ( ) ; if ( persoon == null ) { return false ; } return rootPersoon . getPersoonOverlijdenHistorieSet ( ) . isEmpty ( ) ; }
|
org . junit . Assert . assertFalse ( subject . controleer ( persoon , verzoek ) )
|
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . ClusterGroup . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "clusterGroupId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "clusterGroupId" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
|
testModifySubscriptionUnitAssignNotExisting ( ) { final java . lang . String id = prepareSubscriptionForModification ( 0L ) ; org . oscm . subscriptionservice . bean . VOSubscriptionDetails subToModify = runTX ( new java . util . concurrent . Callable < org . oscm . subscriptionservice . bean . VOSubscriptionDetails > ( ) { @ org . oscm . subscriptionservice . bean . Override public org . oscm . subscriptionservice . bean . VOSubscriptionDetails call ( ) { checkSubscribeToProduct ( false , id , testProducts . get ( 3 ) , SubscriptionStatus . ACTIVE , 3 , null , 1 ) ; org . oscm . subscriptionservice . bean . Subscription subscription = getSubscription ( id , testOrganizations . get ( 0 ) . getKey ( ) ) ; subscription . getProduct ( ) . getParameterSet ( ) . getParameters ( ) . get ( 0 ) . setConfigurable ( true ) ; return org . oscm . subscriptionservice . assembler . SubscriptionAssembler . toVOSubscriptionDetails ( subscription , new org . oscm . i18nservice . bean . LocalizerFacade ( new org . oscm . i18nservice . bean . LocalizerServiceStub2 ( ) , "en" ) ) ; } } ) ; final long subKey = subToModify . getKey ( ) ; org . oscm . subscriptionservice . bean . UserGroup subUnitBefore = runTX ( new java . util . concurrent . Callable < org . oscm . subscriptionservice . bean . UserGroup > ( ) { @ org . oscm . subscriptionservice . bean . Override public org . oscm . subscriptionservice . bean . UserGroup call ( ) throws org . oscm . subscriptionservice . bean . ObjectNotFoundException { org . oscm . subscriptionservice . bean . Subscription sub = mgr . getReference ( org . oscm . subscriptionservice . bean . Subscription . class , subKey ) ; return sub . getUserGroup ( ) ; } } ) ; "<AssertPlaceHolder>" ; subToModify . setUnitKey ( org . oscm . subscriptionservice . bean . SubscriptionServiceBeanIT . UNIT_NON_EXISTING ) ; subMgmt . modifySubscription ( subToModify , null , new org . oscm . subscriptionservice . bean . ArrayList < org . oscm . subscriptionservice . bean . VOUda > ( ) ) ; } getUserGroup ( ) { return userGroup ; }
|
org . junit . Assert . assertNull ( subUnitBefore )
|
cast_toString ( ) { for ( com . querydsl . jpa . Tuple tuple : query ( ) . from ( com . querydsl . jpa . AbstractJPATest . cat ) . select ( com . querydsl . jpa . AbstractJPATest . cat . breed , com . querydsl . jpa . AbstractJPATest . cat . breed . stringValue ( ) ) . fetch ( ) ) { "<AssertPlaceHolder>" ; } } get ( com . querydsl . sql . RelationalPath ) { return ( ( T ) ( beans . get ( path ) ) ) ; }
|
org . junit . Assert . assertEquals ( tuple . get ( com . querydsl . jpa . AbstractJPATest . cat . breed ) . toString ( ) , tuple . get ( com . querydsl . jpa . AbstractJPATest . cat . breed . stringValue ( ) ) )
|
testReadlineWithSmallBuffer ( ) { java . lang . String myMessage = "{this<sp>is<sp>my<sp>message}\r\n" ; byte [ ] bytes = myMessage . getBytes ( Charsets . UTF_8 ) ; java . io . InputStream stream = new java . io . ByteArrayInputStream ( bytes ) ; com . twitter . hbc . common . DelimitedStreamReader r = new com . twitter . hbc . common . DelimitedStreamReader ( stream , com . google . common . base . Charsets . UTF_8 , ( ( myMessage . length ( ) ) / 3 ) ) ; java . lang . String msg = r . readLine ( ) ; "<AssertPlaceHolder>" ; } readLine ( ) { return readLine ( true ) ; }
|
org . junit . Assert . assertEquals ( msg , myMessage . trim ( ) )
|
testDeleteNull ( ) { initializeExpectedAddress ( 3 ) ; expect ( compute . getOptions ( ) ) . andReturn ( mockOptions ) ; expect ( compute . deleteAddress ( com . google . cloud . compute . deprecated . AddressTest . REGION_ADDRESS_ID ) ) . andReturn ( null ) ; replay ( compute ) ; initializeAddress ( ) ; "<AssertPlaceHolder>" ; } delete ( ) { boolean deleted = sink . delete ( ) ; if ( deleted ) { } else { } return deleted ; }
|
org . junit . Assert . assertNull ( address . delete ( ) )
|
getConceptAnswerByUuid_shouldFindObjectGivenValidUuid ( ) { java . lang . String uuid = "b1230431-2fe5-49fc-b535-ae42bc849747" ; org . openmrs . ConceptAnswer conceptAnswer = org . openmrs . api . context . Context . getConceptService ( ) . getConceptAnswerByUuid ( uuid ) ; "<AssertPlaceHolder>" ; } getConceptAnswerId ( ) { return conceptAnswerId ; }
|
org . junit . Assert . assertEquals ( 1 , ( ( int ) ( conceptAnswer . getConceptAnswerId ( ) ) ) )
|
testSetName_returnsCell ( ) { org . eclipse . rap . rwt . template . Cell < ? > cell = new org . eclipse . rap . rwt . template . TestCell ( template , "foo" ) ; org . eclipse . rap . rwt . template . Cell < ? > actualCell = cell . setName ( "bar" ) ; "<AssertPlaceHolder>" ; } setName ( java . lang . String ) { this . name = name ; }
|
org . junit . Assert . assertSame ( cell , actualCell )
|
smoke ( ) { java . io . FileReader fr = new java . io . FileReader ( ( ( ch . qos . cal10n . CAL10NTestConstants . TEST_CLASSES ) + "/parser/smoke.properties" ) ) ; ch . qos . cal10n . util . Parser parser = new ch . qos . cal10n . util . Parser ( fr , map ) ; parser . parseAndPopulate ( ) ; witness . put ( "K0" , "V0" ) ; witness . put ( "K1" , "V1" ) ; "<AssertPlaceHolder>" ; } parseAndPopulate ( ) { E ( ) ; }
|
org . junit . Assert . assertEquals ( witness , map )
|
testAnonymousConstraint ( ) { java . util . function . Function < org . jacop . IntVar [ ] , org . jacop . Constraint > listXeqY = ( org . jacop . IntVar [ ] list ) -> new org . jacop . Constraint ( list ) { @ java . lang . Override public void consistency ( org . jacop . Store store ) { do { store . propagationHasOccurred = false ; for ( int i = 0 ; i < ( list . length - 1 ) ; i ++ ) { org . jacop . IntVar x = list [ i ] ; org . jacop . IntVar y = list [ ( i + 1 ) ] ; x . domain . in ( store . level , x , y . domain ) ; y . domain . in ( store . level , y , x . domain ) ; } } while ( store . propagationHasOccurred ) ; } @ java . lang . Override public int getDefaultConsistencyPruningEvent ( ) { return IntDomain . ANY ; } } ; org . jacop . Store store = new org . jacop . Store ( ) ; int xLength = 3 ; int xSize = 2 ; org . jacop . IntVar [ ] x = getIntVars ( store , "vars" , xLength , xSize ) ; store . impose ( listXeqY . apply ( x ) ) ; store . print ( ) ; int noOfSolutions = noOfAllSolutions ( store , x ) ; "<AssertPlaceHolder>" ; } noOfAllSolutions ( org . jacop . core . Store , org . jacop . core . IntVar [ ] [ ] ) { org . jacop . SelectChoicePoint < org . jacop . core . IntVar > select = new org . jacop . SimpleSelect < org . jacop . core . IntVar > ( java . util . Arrays . stream ( variables ) . map ( Arrays :: stream ) . flatMap ( ( i ) -> i ) . toArray ( org . jacop . core . IntVar [ ] :: new ) , new org . jacop . MostConstrainedStatic < org . jacop . core . IntVar > ( ) , new org . jacop . IndomainMin < org . jacop . core . IntVar > ( ) ) ; org . jacop . DepthFirstSearch search = new org . jacop . DepthFirstSearch < org . jacop . core . IntVar > ( ) ; search . getSolutionListener ( ) . searchAll ( true ) ; search . getSolutionListener ( ) . recordSolutions ( true ) ; search . setAssignSolution ( true ) ; boolean result = search . labeling ( store , select ) ; return search . getSolutionListener ( ) . solutionsNo ( ) ; }
|
org . junit . Assert . assertThat ( noOfSolutions , org . hamcrest . CoreMatchers . is ( 2 ) )
|
findProblems ( ) { org . osgi . framework . ServiceReference < com . liferay . blade . api . Migration > sr = _context . getServiceReference ( com . liferay . blade . api . Migration . class ) ; com . liferay . blade . api . Migration m = _context . getService ( sr ) ; java . util . List < com . liferay . blade . api . Problem > problems = m . findProblems ( new java . io . File ( "jsptests/asset-categories-navigation/" ) , new com . liferay . blade . util . NullProgressMonitor ( ) ) ; "<AssertPlaceHolder>" ; boolean found = false ; for ( com . liferay . blade . api . Problem problem : problems ) { if ( problem . file . getName ( ) . endsWith ( "AssetCategoriesNavigationTagsTest.jsp" ) ) { if ( ( ( ( problem . lineNumber ) == 48 ) && ( ( problem . startOffset ) >= 1530 ) ) && ( ( problem . endOffset ) >= 1616 ) ) { found = true ; } } } if ( ! found ) { org . junit . Assert . fail ( ) ; } } size ( ) { return getWidget ( ) . rowCount ( ) ; }
|
org . junit . Assert . assertEquals ( "" , 1 , problems . size ( ) )
|
executeTestWithMultipleCommandsNotAllSuccessed ( ) { final com . ctrip . platform . dal . dao . DalHints hints = new com . ctrip . platform . dal . dao . DalHints ( ) ; java . util . List < com . ctrip . platform . dal . dao . DalCommand > commands = new java . util . ArrayList < com . ctrip . platform . dal . dao . DalCommand > ( ) ; commands . add ( new com . ctrip . platform . dal . dao . DalCommand ( ) { @ com . ctrip . platform . dal . dao . unittests . Override public boolean execute ( com . ctrip . platform . dal . dao . DalClient client ) throws java . sql . SQLException { java . lang . String sql = ( "DELETE<sp>FROM<sp>" + ( TABLE_NAME ) ) + "<sp>WHERE<sp>id<sp>=<sp>1" ; com . ctrip . platform . dal . dao . StatementParameters parameters = new com . ctrip . platform . dal . dao . StatementParameters ( ) ; client . update ( sql , parameters , hints ) ; return false ; } } ) ; commands . add ( new com . ctrip . platform . dal . dao . DalCommand ( ) { @ com . ctrip . platform . dal . dao . unittests . Override public boolean execute ( com . ctrip . platform . dal . dao . DalClient client ) throws java . sql . SQLException { java . lang . String sql = ( "DELETE<sp>FROM<sp>" + ( TABLE_NAME ) ) + "<sp>WHERE<sp>id<sp>=<sp>100" ; com . ctrip . platform . dal . dao . StatementParameters parameters = new com . ctrip . platform . dal . dao . StatementParameters ( ) ; return ( client . update ( sql , parameters , hints ) ) == 1 ; } } ) ; commands . add ( new com . ctrip . platform . dal . dao . DalCommand ( ) { @ com . ctrip . platform . dal . dao . unittests . Override public boolean execute ( com . ctrip . platform . dal . dao . DalClient client ) throws java . sql . SQLException { java . lang . String sql = ( "DELETE<sp>FROM<sp>" + ( TABLE_NAME ) ) + "<sp>WHERE<sp>id<sp>=<sp>3" ; com . ctrip . platform . dal . dao . StatementParameters parameters = new com . ctrip . platform . dal . dao . StatementParameters ( ) ; return ( client . update ( sql , parameters , hints ) ) == 1 ; } } ) ; client . execute ( commands , hints ) ; java . util . List < com . ctrip . platform . dal . dao . unitbase . ClientTestModel > models = this . queryModelsByIds ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return allKeys . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , models . size ( ) )
|
testShouldBeAbleToEnterTextIntoATextAreaBySettingItsValue ( ) { driver . get ( pages . javascriptPage ) ; org . openqa . selenium . WebElement textarea = driver . findElement ( org . openqa . selenium . By . id ( "keyUpArea" ) ) ; java . lang . String cheesy = "brie<sp>and<sp>cheddar" ; textarea . sendKeys ( cheesy ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return commandProcessor . getString ( "getAttribute" , new java . lang . String [ ] { attributeLocator } ) ; }
|
org . junit . Assert . assertThat ( textarea . getAttribute ( "value" ) , org . hamcrest . Matchers . equalTo ( cheesy ) )
|
testRemovePhotos ( ) { com . flickr4java . flickr . photosets . PhotosetsInterface iface = flickr . getPhotosetsInterface ( ) ; com . flickr4java . flickr . photosets . Photoset photoset = iface . create ( "test" , "A<sp>test<sp>photoset" , testProperties . getPhotoId ( ) ) ; com . flickr4java . flickr . photos . PhotoList < com . flickr4java . flickr . photos . Photo > photos = iface . getPhotos ( photoset . getId ( ) , 10 , 1 ) ; "<AssertPlaceHolder>" ; iface . removePhoto ( photoset . getId ( ) , testProperties . getPhotoId ( ) ) ; try { photos = iface . getPhotos ( photoset . getId ( ) , 10 , 1 ) ; } catch ( com . flickr4java . flickr . FlickrException e ) { } } getId ( ) { return id ; }
|
org . junit . Assert . assertNotNull ( photos )
|
testNotEqual ( ) { org . teiid . vdb . runtime . VDBKey key = new org . teiid . vdb . runtime . VDBKey ( "a" , 1 ) ; org . teiid . vdb . runtime . VDBKey key1 = new org . teiid . vdb . runtime . VDBKey ( "b" , 1 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == anObject ) { return true ; } if ( ( anObject != null ) && ( anObject instanceof org . teiid . internal . core . index . EntryResult ) ) { org . teiid . internal . core . index . EntryResult anEntryResult = ( ( org . teiid . internal . core . index . EntryResult ) ( anObject ) ) ; if ( ! ( java . util . Arrays . equals ( this . word , anEntryResult . word ) ) ) return false ; int length ; int [ ] refs ; int [ ] otherRefs ; if ( ( length = ( refs = this . fileRefs ) . length ) != ( ( otherRefs = anEntryResult . fileRefs ) . length ) ) return false ; for ( int i = 0 ; i < length ; i ++ ) { if ( ( refs [ i ] ) != ( otherRefs [ i ] ) ) return false ; } return true ; } return false ; }
|
org . junit . Assert . assertFalse ( key . equals ( key1 ) )
|
testEqualsWithSameInstance ( ) { java . util . Map < java . lang . String , java . lang . String > attributes = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; attributes . put ( "att123" , "val123" ) ; org . o3project . odenos . core . component . network . topology . Port port = new org . o3project . odenos . core . component . network . topology . Port ( "123" , "port_id123" , "node_id123" , "out_link123" , "in_link123" , attributes ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . o3project . odenos . remoteobject . event . EventSubscription ) ) { return false ; } org . o3project . odenos . remoteobject . event . EventSubscription eventSubscription = ( ( org . o3project . odenos . remoteobject . event . EventSubscription ) ( obj ) ) ; return this . subscriberId . equals ( eventSubscription . getSubscriberId ( ) ) ; }
|
org . junit . Assert . assertTrue ( port . equals ( port ) )
|
testCreateRootSchemaWithNoMetadataSchema ( ) { net . hydromatic . optiq . SchemaPlus rootSchema = net . hydromatic . optiq . tools . Frameworks . createRootSchema ( false ) ; "<AssertPlaceHolder>" ; } getSubSchemaNames ( ) { return net . hydromatic . optiq . impl . jdbc . ImmutableSet . of ( ) ; }
|
org . junit . Assert . assertThat ( rootSchema . getSubSchemaNames ( ) . size ( ) , org . hamcrest . CoreMatchers . equalTo ( 0 ) )
|
testTypeConversionClob ( ) { org . teiid . common . buffer . BufferManager bm = org . teiid . common . buffer . BufferManagerFactory . getStandaloneBufferManager ( ) ; java . lang . String str = "hello<sp>world" ; java . sql . Clob clob = ( ( java . sql . Clob ) ( org . teiid . dqp . internal . datamgr . ConnectorWorkItem . convertToRuntimeType ( bm , new org . teiid . core . types . InputStreamFactory ( ) { @ org . teiid . dqp . internal . datamgr . Override public java . io . InputStream getInputStream ( ) throws java . io . IOException { return new java . io . ByteArrayInputStream ( str . getBytes ( Streamable . CHARSET ) ) ; } } , DataTypeManager . DefaultDataClasses . CLOB , null ) ) ) ; "<AssertPlaceHolder>" ; } getSubString ( long , int ) { return this . reference . getSubString ( pos , len ) ; }
|
org . junit . Assert . assertEquals ( str , clob . getSubString ( 1 , str . length ( ) ) )
|
get_process_definition_returns_process_definition_given_in_constructor ( ) { org . bonitasoft . engine . execution . FlowNodeSelector selector = new org . bonitasoft . engine . execution . FlowNodeSelector ( definition , null ) ; "<AssertPlaceHolder>" ; } getProcessDefinition ( ) { return definition ; }
|
org . junit . Assert . assertEquals ( definition , selector . getProcessDefinition ( ) )
|
testGetActionParameterForNonAdmin ( ) { container . login ( userKey ) ; org . oscm . triggerservice . bean . VOTriggerProcessParameter result = triggerService . getActionParameter ( triggerProcessKeySubScribeToService , TriggerProcessParameterType . PRODUCT ) ; "<AssertPlaceHolder>" ; } getActionParameter ( long , org . oscm . types . enumtypes . TriggerProcessParameterType ) { throw new java . lang . UnsupportedOperationException ( ) ; }
|
org . junit . Assert . assertNotNull ( result )
|
roundHalfUp ( ) { int x = new java . math . BigDecimal ( "5.53" ) . setScale ( 0 , BigDecimal . ROUND_HALF_UP ) . intValue ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 6 , x )
|
testGetTouchStoneCombinationFilterParentValue ( ) { java . lang . String parentCombinationFilter = "parent_filter" ; hudson . matrix . MatrixProject parentProject = new hudson . matrix . MatrixProjectTest . MatrixProjectMock ( "parent" ) ; parentProject . setTouchStoneCombinationFilter ( parentCombinationFilter ) ; hudson . matrix . MatrixProject childProject1 = new hudson . matrix . MatrixProjectTest . MatrixProjectMock ( "child1" ) ; childProject1 . setCascadingProject ( parentProject ) ; "<AssertPlaceHolder>" ; } getTouchStoneCombinationFilter ( ) { return hudson . util . CascadingUtil . getStringProjectProperty ( this , hudson . matrix . MatrixProject . TOUCH_STONE_COMBINATION_FILTER_PROPERTY_NAME ) . getValue ( ) ; }
|
org . junit . Assert . assertEquals ( childProject1 . getTouchStoneCombinationFilter ( ) , parentCombinationFilter )
|
testIIOPNamingInvocation ( ) { final java . util . Properties prope = new java . util . Properties ( ) ; final javax . naming . InitialContext context = new javax . naming . InitialContext ( prope ) ; final java . lang . Object iiopObj = context . lookup ( ( ( "corbaname:iiop:" + ( managementClient . getMgmtAddress ( ) ) ) + ":3528#IIOPNamingBean" ) ) ; final org . jboss . as . test . integration . ejb . iiop . naming . IIOPNamingHome object = ( ( org . jboss . as . test . integration . ejb . iiop . naming . IIOPNamingHome ) ( javax . rmi . PortableRemoteObject . narrow ( iiopObj , org . jboss . as . test . integration . ejb . iiop . naming . IIOPNamingHome . class ) ) ) ; final org . jboss . as . test . integration . ejb . iiop . naming . IIOPRemote result = object . create ( ) ; "<AssertPlaceHolder>" ; } hello ( ) { return "hello" ; }
|
org . junit . Assert . assertEquals ( "hello" , result . hello ( ) )
|
cglibInterfaceProxy ( ) { final org . mule . runtime . api . message . Message muleMessageProxy = ( ( org . mule . runtime . api . message . Message ) ( net . sf . cglib . proxy . Enhancer . create ( org . mule . runtime . api . message . Message . class , ( ( net . sf . cglib . proxy . MethodInterceptor ) ( ( o , method , objects , methodProxy ) -> null ) ) ) ) ) ; final org . mule . runtime . api . metadata . DataType dataType = org . mule . runtime . api . metadata . DataType . fromObject ( muleMessageProxy ) ; "<AssertPlaceHolder>" ; } getType ( ) { return type ; }
|
org . junit . Assert . assertThat ( dataType . getType ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( org . mule . runtime . api . message . Message . class ) ) )
|
leftDelete ( ) { jetbrains . jetpad . projectional . testApp . model . IdExpr left = new jetbrains . jetpad . projectional . testApp . model . IdExpr ( ) ; plusExpr . left . set ( left ) ; jetbrains . jetpad . cell . action . CellActions . toFirstFocusable ( binExprMapper . getTarget ( ) . right ) . run ( ) ; del ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return new jetbrains . jetpad . projectional . demo . expr . mapper . Expression ( ) ; }
|
org . junit . Assert . assertSame ( left , container . expr . get ( ) )
|
testPopulateWithModelTranslator ( ) { D dto = ( ( D ) ( this . translator . populate ( this . modelTranslator , this . source , this . dest ) ) ) ; "<AssertPlaceHolder>" ; this . verifyOutput ( this . source , this . dest , true ) ; } populate ( org . candlepin . dto . ModelTranslator , org . candlepin . dto . manifest . v1 . ProductDTO , org . candlepin . model . dto . ProductData ) { if ( source == null ) { throw new java . lang . IllegalArgumentException ( "source<sp>is<sp>null" ) ; } if ( dest == null ) { throw new java . lang . IllegalArgumentException ( "dest<sp>is<sp>null" ) ; } dest . setCreated ( source . getCreated ( ) ) ; dest . setUpdated ( source . getUpdated ( ) ) ; dest . setUuid ( source . getUuid ( ) ) ; dest . setId ( source . getId ( ) ) ; dest . setName ( source . getName ( ) ) ; dest . setMultiplier ( source . getMultiplier ( ) ) ; dest . setAttributes ( source . getAttributes ( ) ) ; dest . setDependentProductIds ( source . getDependentProductIds ( ) ) ; dest . setLocked ( false ) ; java . util . Collection < org . candlepin . dto . manifest . v1 . ProductDTO . ProductContentDTO > productContentDTOs = source . getProductContent ( ) ; dest . setProductContent ( java . util . Collections . emptyList ( ) ) ; if ( ( modelTranslator != null ) && ( productContentDTOs != null ) ) { org . candlepin . dto . ObjectTranslator < org . candlepin . dto . manifest . v1 . ContentDTO , org . candlepin . model . dto . ContentData > contentDTOTranslator = modelTranslator . findTranslatorByClass ( org . candlepin . dto . manifest . v1 . ContentDTO . class , org . candlepin . model . dto . ContentData . class ) ; for ( org . candlepin . dto . manifest . v1 . ProductDTO . ProductContentDTO pcdto : productContentDTOs ) { if ( ( pcdto != null ) && ( ( pcdto . getContent ( ) ) != null ) ) { org . candlepin . model . dto . ContentData contentData = contentDTOTranslator . translate ( modelTranslator , pcdto . getContent ( ) ) ; dest . addContent ( contentData , pcdto . isEnabled ( ) ) ; } } } return dest ; }
|
org . junit . Assert . assertSame ( dto , this . dest )
|
testShared ( ) { System . out . println ( "testShared" ) ; uk . ac . susx . mlcl . lib . collect . SparseDoubleVector Q = uk . ac . susx . mlcl . lib . collect . SparseDoubleVector . from ( new double [ ] { 0 , 1 , 0 , 1 , 0 , 1 , 0 , 1 , 1 , 1 } ) ; uk . ac . susx . mlcl . lib . collect . SparseDoubleVector R = uk . ac . susx . mlcl . lib . collect . SparseDoubleVector . from ( new double [ ] { 1 , 0 , 1 , 0 , 1 , 0 , 1 , 1 , 1 , 0 } ) ; double expResult = 2.0 ; uk . ac . susx . mlcl . byblo . measures . impl . Jaccard INSTANCE = newInstance ( ) ; double result = INSTANCE . shared ( Q , R ) ; "<AssertPlaceHolder>" ; } shared ( uk . ac . susx . mlcl . lib . collect . SparseDoubleVector , uk . ac . susx . mlcl . lib . collect . SparseDoubleVector ) { return uk . ac . susx . mlcl . byblo . measures . Measures . dotProduct ( A , B ) ; }
|
org . junit . Assert . assertEquals ( expResult , result , 0.0 )
|
testCreateFactoryConfigWithAndWithoutLocation ( ) { org . osgi . service . cm . Configuration config = cm . createFactoryConfiguration ( "test" , "x" ) ; config . update ( ) ; try { org . osgi . service . cm . Configuration config2 = cm . getConfiguration ( config . getPid ( ) ) ; "<AssertPlaceHolder>" ; } finally { config . delete ( ) ; } } getPid ( ) { return getPid ( true ) ; }
|
org . junit . Assert . assertEquals ( config , config2 )
|
testIsModifyWithDifferentKey ( ) { target = new org . o3project . odenos . remoteobject . ObjectSettings ( ) ; target . setSetting ( "oldkey" , "val" ) ; org . o3project . odenos . remoteobject . ObjectSettings newSettings = new org . o3project . odenos . remoteobject . ObjectSettings ( ) ; newSettings . setSetting ( "newkey" , "val" ) ; "<AssertPlaceHolder>" ; } isModify ( org . o3project . odenos . remoteobject . ObjectProperty ) { java . util . Set < java . lang . String > oldKeySet = this . getKeys ( ) ; java . util . Set < java . lang . String > newKeySet = newProperty . getKeys ( ) ; if ( ! ( oldKeySet . equals ( newKeySet ) ) ) { return true ; } for ( java . util . Map . Entry < java . lang . String , java . lang . String > e : newProperty . property . entrySet ( ) ) { java . lang . String newValue = e . getValue ( ) ; java . lang . String oldValue = this . getProperty ( e . getKey ( ) ) ; if ( ! ( newValue . equals ( oldValue ) ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertTrue ( target . isModify ( newSettings ) )
|
testGetUserOperationLog_StartBeforeEnd ( ) { container . login ( "1" , org . oscm . operatorservice . bean . ROLE_PLATFORM_OPERATOR ) ; operationList . add ( "Add" ) ; callerRolles . add ( OrganizationRoleType . PLATFORM_OPERATOR ) ; byte [ ] result = operatorService . getUserOperationLog ( operationList , 200000 , 100000 ) ; "<AssertPlaceHolder>" ; verify ( auditLogMock ) . loadAuditLogs ( operationList , 100000 , 200000 ) ; } getUserOperationLog ( org . oscm . test . stubs . List , long , long ) { throw new java . lang . UnsupportedOperationException ( ) ; }
|
org . junit . Assert . assertNotNull ( result )
|
testImplicitJoinWithShortHandAliases ( ) { java . lang . String input = "SELECT<sp>*<sp>FROM<sp>users<sp>users,<sp>accounts<sp>accounts<sp>WHERE<sp>users.id<sp>=<sp>accounts.owner_id" ; java . lang . String expected = "SELECT<sp>*<sp>FROM<sp>users_v2<sp>users,<sp>accounts_v2<sp>accounts<sp>WHERE<sp>users.id<sp>=<sp>accounts.owner_id" ; "<AssertPlaceHolder>" ; } rewrite ( java . lang . String ) { rewriter . setTableMapping ( tableMappings ) ; return rewriter . rewrite ( query ) ; }
|
org . junit . Assert . assertEquals ( expected , rewrite ( input ) )
|
testMetaRegionMove ( ) { org . apache . hadoop . hbase . TableName tn = org . apache . hadoop . hbase . TableName . valueOf ( name . getMethodName ( ) ) ; org . apache . hadoop . hbase . client . Connection conn = org . apache . hadoop . hbase . client . TestSeparateClientZKCluster . TEST_UTIL . getConnection ( ) ; org . apache . hadoop . hbase . client . Admin admin = conn . getAdmin ( ) ; org . apache . hadoop . hbase . client . HTable table = ( ( org . apache . hadoop . hbase . client . HTable ) ( conn . getTable ( tn ) ) ) ; try { org . apache . hadoop . hbase . MiniHBaseCluster cluster = org . apache . hadoop . hbase . client . TestSeparateClientZKCluster . TEST_UTIL . getHBaseCluster ( ) ; org . apache . hadoop . hbase . client . ColumnFamilyDescriptorBuilder cfDescBuilder = org . apache . hadoop . hbase . client . ColumnFamilyDescriptorBuilder . newBuilder ( family ) ; org . apache . hadoop . hbase . client . TableDescriptorBuilder tableDescBuilder = org . apache . hadoop . hbase . client . TableDescriptorBuilder . newBuilder ( tn ) . setColumnFamily ( cfDescBuilder . build ( ) ) ; admin . createTable ( tableDescBuilder . build ( ) ) ; org . apache . hadoop . hbase . client . Put put = new org . apache . hadoop . hbase . client . Put ( row ) ; put . addColumn ( family , qualifier , value ) ; table . put ( put ) ; org . apache . hadoop . hbase . client . Get get = new org . apache . hadoop . hbase . client . Get ( row ) ; org . apache . hadoop . hbase . client . Result result = table . get ( get ) ; org . apache . hadoop . hbase . ServerName destServerName = null ; for ( org . apache . hadoop . hbase . util . JVMClusterUtil . RegionServerThread rst : cluster . getLiveRegionServerThreads ( ) ) { org . apache . hadoop . hbase . ServerName name = rst . getRegionServer ( ) . getServerName ( ) ; if ( ! ( name . equals ( cluster . getServerHoldingMeta ( ) ) ) ) { destServerName = name ; break ; } } admin . move ( RegionInfoBuilder . FIRST_META_REGIONINFO . getEncodedNameAsBytes ( ) , destServerName ) ; org . apache . hadoop . hbase . client . TestSeparateClientZKCluster . LOG . debug ( "Finished<sp>moving<sp>meta" ) ; org . apache . hadoop . hbase . client . RegionInfo region = table . getRegionLocator ( ) . getRegionLocation ( row ) . getRegion ( ) ; org . apache . hadoop . hbase . ServerName currentServer = cluster . getServerHoldingRegion ( tn , region . getRegionName ( ) ) ; for ( org . apache . hadoop . hbase . util . JVMClusterUtil . RegionServerThread rst : cluster . getLiveRegionServerThreads ( ) ) { org . apache . hadoop . hbase . ServerName name = rst . getRegionServer ( ) . getServerName ( ) ; if ( ! ( name . equals ( currentServer ) ) ) { destServerName = name ; break ; } } admin . move ( region . getEncodedNameAsBytes ( ) , destServerName ) ; org . apache . hadoop . hbase . client . TestSeparateClientZKCluster . LOG . debug ( "Finished<sp>moving<sp>user<sp>region" ) ; put = new org . apache . hadoop . hbase . client . Put ( row ) ; put . addColumn ( family , qualifier , newVal ) ; table . put ( put ) ; result = table . get ( get ) ; org . apache . hadoop . hbase . client . TestSeparateClientZKCluster . LOG . debug ( ( "Result:<sp>" + ( org . apache . hadoop . hbase . util . Bytes . toString ( result . getValue ( family , qualifier ) ) ) ) ) ; "<AssertPlaceHolder>" ; } finally { admin . close ( ) ; table . close ( ) ; } } getValue ( byte [ ] , byte [ ] ) { org . apache . hadoop . hbase . Cell kv = getColumnLatestCell ( family , qualifier ) ; if ( kv == null ) { return null ; } return org . apache . hadoop . hbase . CellUtil . cloneValue ( kv ) ; }
|
org . junit . Assert . assertArrayEquals ( newVal , result . getValue ( family , qualifier ) )
|
testPause ( ) { when ( playerProperties . getPause ( ) ) . thenCallRealMethod ( ) ; mpdPlayer . pause ( ) ; verify ( commandExecutor ) . sendCommand ( stringArgumentCaptor . capture ( ) ) ; "<AssertPlaceHolder>" ; } getPause ( ) { return getPropertyString ( org . bff . javampd . player . PlayerProperties . Command . PAUSE . getKey ( ) ) ; }
|
org . junit . Assert . assertEquals ( playerProperties . getPause ( ) , stringArgumentCaptor . getValue ( ) )
|
shouldNotFailSettingEmptyArrayIfEntityAlreadyHasAnEmptyArrayAsValue ( ) { org . neo4j . graphdb . Node node = org . neo4j . server . rest . domain . PropertySettingStrategyTest . db . createNode ( ) ; node . setProperty ( "arr" , new java . lang . String [ ] { } ) ; org . neo4j . server . rest . domain . PropertySettingStrategyTest . propSetter . setProperty ( node , "arr" , new java . util . ArrayList ( ) ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { if ( null == key ) { throw new java . lang . IllegalArgumentException ( "(null)<sp>property<sp>key<sp>is<sp>not<sp>allowed" ) ; } org . neo4j . kernel . api . KernelTransaction transaction = spi . kernelTransaction ( ) ; int propertyKey = transaction . tokenRead ( ) . propertyKey ( key ) ; if ( propertyKey == ( org . neo4j . internal . kernel . api . TokenRead . NO_TOKEN ) ) { throw new org . neo4j . graphdb . NotFoundException ( java . lang . String . format ( "No<sp>such<sp>property,<sp>'%s'." , key ) ) ; } org . neo4j . internal . kernel . api . RelationshipScanCursor relationships = transaction . ambientRelationshipCursor ( ) ; org . neo4j . internal . kernel . api . PropertyCursor properties = transaction . ambientPropertyCursor ( ) ; singleRelationship ( transaction , relationships ) ; relationships . properties ( properties ) ; while ( properties . next ( ) ) { if ( propertyKey == ( properties . propertyKey ( ) ) ) { org . neo4j . values . storable . Value value = properties . propertyValue ( ) ; if ( value == ( org . neo4j . values . storable . Values . NO_VALUE ) ) { throw new org . neo4j . graphdb . NotFoundException ( java . lang . String . format ( "No<sp>such<sp>property,<sp>'%s'." , key ) ) ; } return value . asObjectCopy ( ) ; } } throw new org . neo4j . graphdb . NotFoundException ( java . lang . String . format ( "No<sp>such<sp>property,<sp>'%s'." , key ) ) ; }
|
org . junit . Assert . assertThat ( node . getProperty ( "arr" ) , org . hamcrest . Matchers . is ( new java . lang . String [ ] { } ) )
|
testSetNull ( ) { net . openhft . lang . values . StringValue value = net . openhft . lang . model . DataValueClasses . newInstance ( net . openhft . lang . values . StringValue . class ) ; value . setValue ( null ) ; "<AssertPlaceHolder>" ; } newInstance ( java . lang . Class ) { net . openhft . lang . model . DataValueClassCache dataValueClassCache = net . openhft . lang . model . DataValueClasses . acquireCache ( interfaceClass ) ; return dataValueClassCache . newInstance ( interfaceClass ) ; }
|
org . junit . Assert . assertNull ( value . getValue ( ) )
|
testInitialCapacityAndGrowth ( ) { for ( int i = 0 ; i < 256 ; i ++ ) { com . carrotsearch . hppc . KTypeHashSet < KType > set = new com . carrotsearch . hppc . KTypeHashSet < KType > ( i ) ; for ( int j = 0 ; j < i ; j ++ ) { set . add ( com . carrotsearch . hppc . KTypeHashSetTest . cast ( j ) ) ; } "<AssertPlaceHolder>" ; } } size ( ) { if ( ( head ) <= ( tail ) ) return ( tail ) - ( head ) ; else return ( ( tail ) - ( head ) ) + ( buffer . length ) ; }
|
org . junit . Assert . assertEquals ( i , set . size ( ) )
|
testSetExpenseMetric ( ) { reachability . setExpenseMetric ( ( ( byte ) ( 0 ) ) ) ; result2 = reachability . expenseMetric ( ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; }
|
org . junit . Assert . assertThat ( result2 , org . hamcrest . CoreMatchers . is ( ( ( byte ) ( 0 ) ) ) )
|
testLSTMWithMerging ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; org . deeplearning4j . nn . conf . ComputationGraphConfiguration conf = new org . deeplearning4j . nn . conf . NeuralNetConfiguration . Builder ( ) . seed ( 12345 ) . optimizationAlgo ( OptimizationAlgorithm . STOCHASTIC_GRADIENT_DESCENT ) . dist ( new org . deeplearning4j . nn . conf . distribution . UniformDistribution ( 0.2 , 0.6 ) ) . updater ( new org . nd4j . linalg . learning . config . NoOp ( ) ) . graphBuilder ( ) . addInputs ( "input" ) . setOutputs ( "out" ) . addLayer ( "lstm1" , new org . deeplearning4j . gradientcheck . GravesLSTM . Builder ( ) . nIn ( 3 ) . nOut ( 4 ) . activation ( Activation . TANH ) . build ( ) , "input" ) . addLayer ( "lstm2" , new org . deeplearning4j . gradientcheck . GravesLSTM . Builder ( ) . nIn ( 4 ) . nOut ( 4 ) . activation ( Activation . TANH ) . build ( ) , "lstm1" ) . addLayer ( "dense1" , new org . deeplearning4j . gradientcheck . DenseLayer . Builder ( ) . nIn ( 4 ) . nOut ( 4 ) . activation ( Activation . SIGMOID ) . build ( ) , "lstm1" ) . addLayer ( "lstm3" , new org . deeplearning4j . gradientcheck . GravesLSTM . Builder ( ) . nIn ( 4 ) . nOut ( 4 ) . activation ( Activation . TANH ) . build ( ) , "dense1" ) . addVertex ( "merge" , new org . deeplearning4j . gradientcheck . MergeVertex ( ) , "lstm2" , "lstm3" ) . addLayer ( "out" , new org . deeplearning4j . gradientcheck . RnnOutputLayer . Builder ( ) . nIn ( 8 ) . nOut ( 3 ) . activation ( Activation . SOFTMAX ) . lossFunction ( LossFunctions . LossFunction . MCXENT ) . build ( ) , "merge" ) . inputPreProcessor ( "dense1" , new org . deeplearning4j . nn . conf . preprocessor . RnnToFeedForwardPreProcessor ( ) ) . inputPreProcessor ( "lstm3" , new org . deeplearning4j . nn . conf . preprocessor . FeedForwardToRnnPreProcessor ( ) ) . build ( ) ; org . deeplearning4j . nn . graph . ComputationGraph graph = new org . deeplearning4j . nn . graph . ComputationGraph ( conf ) ; graph . init ( ) ; java . util . Random r = new java . util . Random ( 12345 ) ; org . nd4j . linalg . api . ndarray . INDArray input = org . nd4j . linalg . factory . Nd4j . rand ( new int [ ] { 3 , 3 , 5 } ) ; org . nd4j . linalg . api . ndarray . INDArray labels = org . nd4j . linalg . factory . Nd4j . zeros ( 3 , 3 , 5 ) ; for ( int i = 0 ; i < 3 ; i ++ ) { for ( int j = 0 ; j < 5 ; j ++ ) { labels . putScalar ( new int [ ] { i , r . nextInt ( 3 ) , j } , 1.0 ) ; } } if ( org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . PRINT_RESULTS ) { System . out . println ( "testLSTMWithMerging()" ) ; for ( int j = 0 ; j < ( graph . getNumLayers ( ) ) ; j ++ ) System . out . println ( ( ( ( "Layer<sp>" + j ) + "<sp>#<sp>params:<sp>" ) + ( graph . getLayer ( j ) . numParams ( ) ) ) ) ; } boolean gradOK = org . deeplearning4j . gradientcheck . GradientCheckUtil . checkGradients ( graph , org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . DEFAULT_EPS , org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . DEFAULT_MAX_REL_ERROR , org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . DEFAULT_MIN_ABS_ERROR , org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . PRINT_RESULTS , org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . RETURN_ON_FIRST_FAILURE , new org . nd4j . linalg . api . ndarray . INDArray [ ] { input } , new org . nd4j . linalg . api . ndarray . INDArray [ ] { labels } ) ; java . lang . String msg = "testLSTMWithMerging()" ; "<AssertPlaceHolder>" ; org . deeplearning4j . TestUtils . testModelSerialization ( graph ) ; } checkGradients ( org . deeplearning4j . nn . multilayer . MultiLayerNetwork , double , double , double , boolean , boolean , org . nd4j . linalg . api . ndarray . INDArray , org . nd4j . linalg . api . ndarray . INDArray ) { return org . deeplearning4j . gradientcheck . GradientCheckUtil . checkGradients ( mln , epsilon , maxRelError , minAbsoluteError , print , exitOnFirstError , input , labels , null , null ) ; }
|
org . junit . Assert . assertTrue ( msg , gradOK )
|
nonAsciiLabel ( ) { "<AssertPlaceHolder>" ; } parse ( java . lang . String , java . util . List ) { int i = 0 ; int len = label . length ( ) ; while ( i < len ) { int st = i ; int last ; char c = label . charAt ( i ) ; if ( ( c == '(' ) || ( c == ')' ) ) { tokens . add ( java . lang . Character . toString ( c ) ) ; i ++ ; if ( c == ')' ) { st = i ; while ( ( i < len ) && ( org . openscience . cdk . renderer . generators . standard . AbbreviationLabel . isDigit ( ( c = label . charAt ( i ) ) ) ) ) { i ++ ; } if ( i > st ) tokens . add ( label . substring ( st , i ) ) ; } continue ; } if ( ( c == '/' ) || ( c == '' ) ) { tokens . add ( java . lang . Character . toString ( c ) ) ; i ++ ; continue ; } if ( ( last = org . openscience . cdk . renderer . generators . standard . AbbreviationLabel . findPrefix ( org . openscience . cdk . renderer . generators . standard . AbbreviationLabel . PREFIX_TRIE , label , i , ( - 1 ) ) ) > 0 ) { i += last - i ; } final int symSt = i ; if ( ( last = org . openscience . cdk . renderer . generators . standard . AbbreviationLabel . findPrefix ( org . openscience . cdk . renderer . generators . standard . AbbreviationLabel . SYMBOL_TRIE , label , i , ( - 1 ) ) ) > 0 ) { i += last - i ; while ( ( i < len ) && ( org . openscience . cdk . renderer . generators . standard . AbbreviationLabel . isDigit ( label . charAt ( i ) ) ) ) { i ++ ; } } else if ( ( i == st ) && ( st > 0 ) ) { c = org . openscience . cdk . renderer . generators . standard . AbbreviationLabel . norm ( label . charAt ( i ) ) ; if ( ( c == '-' ) || ( c == '+' ) ) { i ++ ; while ( ( i < len ) && ( org . openscience . cdk . renderer . generators . standard . AbbreviationLabel . isDigit ( label . charAt ( i ) ) ) ) { i ++ ; } if ( i < len ) { return org . openscience . cdk . renderer . generators . standard . AbbreviationLabel . failParse ( label , tokens ) ; } } } if ( ( i == st ) || ( i == symSt ) ) { return org . openscience . cdk . renderer . generators . standard . AbbreviationLabel . failParse ( label , tokens ) ; } tokens . add ( label . substring ( st , i ) ) ; } return true ; }
|
org . junit . Assert . assertFalse ( org . openscience . cdk . renderer . generators . standard . AbbreviationLabel . parse ( "" , new java . util . ArrayList < java . lang . String > ( ) ) )
|
makeFailureListFutureNullTest ( ) { org . threadly . concurrent . future . ListenableFuture < java . util . List < org . threadly . concurrent . future . ListenableFuture < ? > > > f = org . threadly . concurrent . future . FutureUtils . makeFailureListFuture ( null ) ; "<AssertPlaceHolder>" ; } isDone ( ) { return true ; }
|
org . junit . Assert . assertTrue ( f . isDone ( ) )
|
equal ( ) { org . apache . hadoop . hive . accumulo . predicate . compare . Equal equalObj = new org . apache . hadoop . hive . accumulo . predicate . compare . Equal ( intCompare ) ; byte [ ] val = getBytes ( 10 ) ; "<AssertPlaceHolder>" ; } accept ( org . apache . hadoop . fs . Path ) { java . lang . String dirName = path . getName ( ) ; return ( dirName . startsWith ( "date=" ) ) && ( ( dirName . compareTo ( org . apache . hadoop . hive . metastore . HiveProtoEventsCleanerTask . expiredDatePtn ) ) <= 0 ) ; }
|
org . junit . Assert . assertTrue ( equalObj . accept ( val ) )
|
should_haveErrors_PropertyValidation ( ) { result . addAllPropertyValidationExceptions ( templatePropertyExceptions ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { for ( ch . puzzle . itc . mobiliar . business . generator . control . GenerationUnitGenerationResult result : generationResults ) { if ( ! ( result . isSuccess ( ) ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertTrue ( result . hasErrors ( ) )
|
testGetWikiPage ( ) { System . out . println ( "getWikiPage" ) ; kg . apc . jmeter . vizualizers . AggregateReportGui instance = new kg . apc . jmeter . vizualizers . AggregateReportGui ( ) ; java . lang . String result = instance . getWikiPage ( ) ; "<AssertPlaceHolder>" ; } getWikiPage ( ) { return "ResponseCodesPerSecond" ; }
|
org . junit . Assert . assertNotNull ( result )
|
givenUserInDB_WhenFindUserByStatusWithQueryAnnotationNative_ThenReturnActiveUser ( ) { com . baeldung . domain . user . User user = new com . baeldung . domain . user . User ( ) ; user . setName ( USER_NAME_ADAM ) ; user . setEmail ( USER_EMAIL ) ; user . setStatus ( ACTIVE_STATUS ) ; userRepository . save ( user ) ; com . baeldung . domain . user . User userByStatus = userRepository . findUserByStatusNative ( ACTIVE_STATUS ) ; "<AssertPlaceHolder>" . isEqualTo ( USER_NAME_ADAM ) ; } getName ( ) { return name ; }
|
org . junit . Assert . assertThat ( userByStatus . getName ( ) )
|
testExecute_fromVar ( ) { System . out . println ( "execute<sp>1" ) ; org . apache . jmeter . samplers . SampleResult previousResult = null ; org . apache . jmeter . samplers . Sampler currentSampler = null ; org . apache . jmeter . threads . JMeterContextService . getContext ( ) . getVariables ( ) . put ( "varName" , "test<sp>string<sp>123" ) ; java . util . Collection < org . apache . jmeter . engine . util . CompoundVariable > parameters = new java . util . ArrayList < org . apache . jmeter . engine . util . CompoundVariable > ( ) ; parameters . add ( new org . apache . jmeter . engine . util . CompoundVariable ( "${varName}" ) ) ; kg . apc . jmeter . functions . StrLen instance = new kg . apc . jmeter . functions . StrLen ( ) ; instance . setParameters ( parameters ) ; java . lang . String expResult = "15" ; java . lang . String result = instance . execute ( previousResult , currentSampler ) ; "<AssertPlaceHolder>" ; } execute ( org . apache . jmeter . samplers . SampleResult , org . apache . jmeter . samplers . Sampler ) { java . lang . String tstName = values [ 0 ] . execute ( ) ; java . lang . String concName = tstName + "_concurrency" ; if ( justStarted ) { org . apache . jmeter . util . JMeterUtils . setProperty ( concName , java . lang . String . valueOf ( values [ 1 ] . execute ( ) ) ) ; justStarted = false ; } int limit = Integer . MAX_VALUE ; if ( ( values . length ) > 2 ) { try { limit = java . lang . Integer . parseInt ( values [ 2 ] . execute ( ) ) ; } catch ( java . lang . NumberFormatException exc ) { kg . apc . jmeter . timers . functions . TSTFeedback . log . debug ( "Failed<sp>to<sp>parse<sp>value<sp>for<sp>limit,<sp>defaulting<sp>to<sp>infinity" , exc ) ; } } double spare = 0.1 ; if ( ( values . length ) > 3 ) { try { spare = java . lang . Double . parseDouble ( values [ 3 ] . execute ( ) ) ; } catch ( java . lang . NumberFormatException exc ) { kg . apc . jmeter . timers . functions . TSTFeedback . log . debug ( "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" , exc ) ; spare = 1 ; } } int con = java . lang . Integer . parseInt ( org . apache . jmeter . util . JMeterUtils . getPropDefault ( concName , "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 2 ) ) ; int delayed = java . lang . Integer . parseInt ( org . apache . jmeter . util . JMeterUtils . getPropDefault ( ( tstName + "_cntDelayed" ) , "0" ) ) ; int sent = java . lang . Integer . parseInt ( org . apache . jmeter . util . JMeterUtils . getPropDefault ( ( tstName + "_cntSent" ) , "0" ) ) ; float rps = java . lang . Float . parseFloat ( org . apache . jmeter . util . JMeterUtils . getPropDefault ( ( tstName + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 4 ) , "0" ) ) ; int needed = con ; if ( rps <= 0 ) { } else if ( delayed > 0 ) { needed = decreaseNeeded ( spare , con , delayed , needed ) ; } else if ( sent < rps ) { needed = ( ( int ) ( java . lang . Math . ceil ( ( con * ( 2 - ( sent / rps ) ) ) ) ) ) ; } if ( ( needed != con ) && ( kg . apc . jmeter . timers . functions . TSTFeedback . log . isDebugEnabled ( ) ) ) { kg . apc . jmeter . timers . functions . TSTFeedback . log . debug ( ( ( ( ( ( ( ( ( ( ( ( ( "Need<sp>to<sp>change<sp>" + concName ) + ":<sp>" ) + con ) + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 5 ) + needed ) + "<sp>(" ) + sent ) + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 3 ) + rps ) + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 3 ) + delayed ) + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 0 ) ) ; } if ( needed <= 0 ) { kg . apc . jmeter . timers . functions . TSTFeedback . log . warn ( ( "Got<sp>concurrency<sp>less<sp>than<sp>zero:<sp>" + needed ) ) ; needed = 1 ; } if ( needed > limit ) { kg . apc . jmeter . timers . functions . TSTFeedback . log . warn ( ( "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 1 + needed ) ) ; needed = limit ; } org . apache . jmeter . util . JMeterUtils . setProperty ( concName , java . lang . String . valueOf ( needed ) ) ; org . apache . jmeter . util . JMeterUtils . setProperty ( ( tstName + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 4 ) , "0" ) ; return java . lang . String . valueOf ( needed ) ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.