input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
toStringNullParamList ( ) { java . lang . String mn = "methodName" ; java . lang . String min = "methodInterfaceName" ; java . util . List < java . lang . String > pl = null ; java . lang . String output = ( ( ( "method<sp>:<sp>" + mn ) + "<sp>interface<sp>:<sp>" ) + min ) + "<sp>parameters<sp>:<sp>null" ; com . ibm . ws . security . authorization . jacc . MethodInfo mi = new com . ibm . ws . security . authorization . jacc . MethodInfo ( mn , min , pl ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "ClassA:<sp>" + ( getValue ( ) ) ; }
org . junit . Assert . assertEquals ( output , mi . toString ( ) )
testZoomFit ( ) { org . eclipse . gef . cloudio . internal . ui . TagCloud cloud = new org . eclipse . gef . cloudio . internal . ui . TagCloud ( composite , ( ( org . eclipse . swt . SWT . V_SCROLL ) | ( org . eclipse . swt . SWT . H_SCROLL ) ) ) ; cloud . setWords ( java . util . Arrays . asList ( getWord ( ) ) , null ) ; cloud . zoomReset ( ) ; double zoom = cloud . getZoom ( ) ; cloud . zoomFit ( ) ; "<AssertPlaceHolder>" ; } getZoom ( ) { checkWidget ( ) ; return currentZoom ; }
org . junit . Assert . assertTrue ( ( ( cloud . getZoom ( ) ) < zoom ) )
testWithoutParent ( ) { final N parent1 = org . mockito . Mockito . spy ( getBuilderInstance ( ) . build ( ) ) ; final N parent2 = org . mockito . Mockito . spy ( getBuilderInstance ( ) . build ( ) ) ; final B builder = getBuilderInstance ( ) ; builder . withParent ( parent1 ) . withParent ( parent2 ) ; builder . withoutParent ( parent2 ) ; final N child = builder . build ( ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( parent1 ) . addChild ( child ) ; org . mockito . Mockito . verifyNoMoreInteractions ( parent1 ) ; org . mockito . Mockito . verifyNoMoreInteractions ( parent2 ) ; } getAllParents ( ) { final java . util . List < org . apache . oozie . fluentjob . api . action . Node > allParents = new java . util . ArrayList ( parentsWithoutConditions ) ; for ( final org . apache . oozie . fluentjob . api . action . Node . NodeWithCondition parentWithCondition : parentsWithConditions ) { allParents . add ( parentWithCondition . getNode ( ) ) ; } return java . util . Collections . unmodifiableList ( allParents ) ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( parent1 ) , child . getAllParents ( ) )
testSetAtom_IAtom ( ) { org . openscience . cdk . interfaces . ILonePair lp = ( ( org . openscience . cdk . interfaces . ILonePair ) ( newChemObject ( ) ) ) ; org . openscience . cdk . interfaces . IAtom atom = lp . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "N" ) ; lp . setAtom ( atom ) ; "<AssertPlaceHolder>" ; } getAtom ( ) { return this . atom ; }
org . junit . Assert . assertEquals ( atom , lp . getAtom ( ) )
should_not_send_any_email_when_there_are_no_users ( ) { com . autentia . tnt . bean . ContractExpirationNotificationBean sut = new com . autentia . tnt . bean . ContractExpirationNotificationBean ( mailService ) ; int userCount = sut . checkExpirationDate ( ) ; "<AssertPlaceHolder>" ; } checkExpirationDate ( ) { authenticateAs ( com . autentia . tnt . util . ConfigurationUtil . getDefault ( ) . getAdminUser ( ) ) ; java . util . Date today = java . util . Date . from ( java . time . LocalDate . now ( ) . atStartOfDay ( java . time . ZoneId . systemDefault ( ) ) . toInstant ( ) ) ; java . util . Date inThreeMonths = java . util . Date . from ( java . time . LocalDate . now ( ) . plusMonths ( 3 ) . atStartOfDay ( java . time . ZoneId . systemDefault ( ) ) . toInstant ( ) ) ; com . autentia . tnt . dao . search . UserSearch search = new com . autentia . tnt . dao . search . UserSearch ( ) ; search . setActive ( true ) ; search . setStartEndContractDate ( today ) ; search . setEndEndContractDate ( inThreeMonths ) ; java . util . List < com . autentia . tnt . businessobject . User > users = com . autentia . tnt . manager . admin . UserManager . getDefault ( ) . getAllEntities ( search , null ) ; search . reset ( ) ; search . setActive ( true ) ; search . setStartEndTestPeriodDate ( today ) ; search . setEndEndTestPeriodDate ( inThreeMonths ) ; users . addAll ( com . autentia . tnt . manager . admin . UserManager . getDefault ( ) . getAllEntities ( search , null ) ) ; com . autentia . tnt . bean . ContractExpirationNotificationBean . log . info ( ( "Number<sp>of<sp>users<sp>with<sp>contract<sp>or<sp>probation<sp>to<sp>be<sp>expired:<sp>" + ( users . size ( ) ) ) ) ; if ( ! ( users . isEmpty ( ) ) ) { java . lang . String emailSubject = com . autentia . tnt . util . ConfigurationUtil . getDefault ( ) . getMailNotificationContractSubject ( ) ; java . lang . StringBuilder emailContent = new java . lang . StringBuilder ( ) ; for ( com . autentia . tnt . businessobject . User user : users ) { emailContent . append ( ( ( ( ( ( "\nUserId:<sp>" + ( user . getId ( ) ) ) + ",<sp>Nombre:<sp>" ) + ( user . getName ( ) ) ) + ",<sp>Email:<sp>" ) + ( user . getEmail ( ) ) ) ) ; } com . autentia . tnt . bean . ContractExpirationNotificationBean . log . info ( ( "Email<sp>content:<sp>" + emailContent ) ) ; for ( java . lang . String recipient : com . autentia . tnt . util . ConfigurationUtil . getDefault ( ) . getMailNotificationContractSendTo ( ) ) { mailService . send ( recipient , emailSubject , emailContent . toString ( ) ) ; com . autentia . tnt . bean . ContractExpirationNotificationBean . log . info ( ( "Email<sp>sent<sp>to:<sp>" + recipient ) ) ; } } return users . size ( ) ; }
org . junit . Assert . assertThat ( userCount , is ( 0 ) )
testIsEmptyListNullable ( ) { com . streamsets . pipeline . stage . processor . expression . ExpressionProcessorConfig expressionProcessorConfig ; com . streamsets . pipeline . sdk . ProcessorRunner runner ; java . util . Map < java . lang . String , com . streamsets . pipeline . api . Field > map = new java . util . LinkedHashMap ( ) ; map . put ( "a" , com . streamsets . pipeline . api . Field . create ( 123 ) ) ; com . streamsets . pipeline . api . Record record = com . streamsets . pipeline . sdk . RecordCreator . create ( "s" , "s:1" ) ; record . set ( com . streamsets . pipeline . api . Field . create ( map ) ) ; expressionProcessorConfig = new com . streamsets . pipeline . stage . processor . expression . ExpressionProcessorConfig ( ) ; expressionProcessorConfig . expression = "${isEmptyList(NULL)}" ; expressionProcessorConfig . fieldToSet = "/setme" ; runner = new com . streamsets . pipeline . sdk . ProcessorRunner . Builder ( com . streamsets . pipeline . stage . processor . expression . ExpressionDProcessor . class ) . addConfiguration ( "expressionProcessorConfigs" , com . google . common . collect . ImmutableList . of ( expressionProcessorConfig ) ) . addOutputLane ( "a" ) . setOnRecordError ( OnRecordError . TO_ERROR ) . build ( ) ; runner . runInit ( ) ; try { runner . runProcess ( com . google . common . collect . ImmutableList . of ( record ) ) ; "<AssertPlaceHolder>" ; } finally { runner . runDestroy ( ) ; } } getErrorRecords ( ) { return errorRecords ; }
org . junit . Assert . assertEquals ( 0 , runner . getErrorRecords ( ) . size ( ) )
testJavaPathBatAndEmpty ( ) { org . junit . Assume . assumeTrue ( com . dslplatform . compiler . client . Utils . isWindows ( ) ) ; context . put ( JavaPath . INSTANCE , ( ( com . dslplatform . compiler . client . parameters . JavaPathTest . fakeJavaPath ) + "/bat-and-empty" ) ) ; "<AssertPlaceHolder>" ; } check ( com . dslplatform . compiler . client . parameters . Context ) { if ( context . contains ( com . dslplatform . compiler . client . parameters . JavaPath . INSTANCE ) ) { final java . lang . String path = context . get ( com . dslplatform . compiler . client . parameters . JavaPath . INSTANCE ) ; final com . dslplatform . compiler . client . parameters . Either < java . lang . String > javac = com . dslplatform . compiler . client . parameters . Utils . findCommand ( context , path , "javac" , "Usage:<sp>javac" ) ; if ( ! ( javac . isSuccess ( ) ) ) { context . error ( "java<sp>parameter<sp>is<sp>set,<sp>but<sp>Java<sp>compiler<sp>not<sp>found/doesn't<sp>work.<sp>Please<sp>check<sp>specified<sp>java<sp>parameter." ) ; context . error ( ( "Trying<sp>to<sp>find<sp>javac<sp>in<sp>" + path ) ) ; return false ; } final com . dslplatform . compiler . client . parameters . Either < java . lang . String > jar = com . dslplatform . compiler . client . parameters . Utils . findCommand ( context , path , "jar" , "Usage:<sp>jar" ) ; if ( ! ( jar . isSuccess ( ) ) ) { context . error ( "java<sp>parameter<sp>is<sp>set,<sp>but<sp>Java<sp>archive<sp>tool<sp>not<sp>found/doesn't<sp>work.<sp>Please<sp>check<sp>specified<sp>java<sp>parameter." ) ; context . error ( ( "Trying<sp>to<sp>find<sp>jar<sp>in<sp>" + path ) ) ; return false ; } context . cache ( ( ( com . dslplatform . compiler . client . parameters . JavaPath . CACHE_FILE_PREFIX ) + "javac" ) , javac . get ( ) ) ; context . cache ( ( ( com . dslplatform . compiler . client . parameters . JavaPath . CACHE_FILE_PREFIX ) + "jar" ) , jar . get ( ) ) ; } return true ; }
org . junit . Assert . assertTrue ( JavaPath . INSTANCE . check ( context ) )
testUsername ( ) { java . lang . String username = com . crm . util . AuthServiceUtil . getUsername ( com . crm . util . AuthServiceUtil . getToken ( "testuser1" ) ) ; "<AssertPlaceHolder>" ; } getToken ( java . lang . String ) { return com . crm . util . AuthServiceUtil . generateToken ( username ) ; }
org . junit . Assert . assertEquals ( "testuser1" , username )
testCanCompleteWhenAllPagesIsCompleted ( ) { when ( page1 . isCompleted ( ) ) . thenReturn ( true ) ; when ( page2 . isCompleted ( ) ) . thenReturn ( true ) ; when ( page3 . isCompleted ( ) ) . thenReturn ( true ) ; wizard . addPage ( page1 ) ; wizard . addPage ( page2 ) ; wizard . addPage ( page3 ) ; "<AssertPlaceHolder>" ; } canComplete ( ) { for ( org . eclipse . che . ide . api . wizard . WizardPage < T > page : wizardPages . asIterable ( ) ) { if ( ! ( page . isCompleted ( ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertEquals ( true , wizard . canComplete ( ) )
getTotalLength ( ) { java . lang . Object expected = net . time4j . Duration . ofClockUnits ( 0 , 61 , 4 ) . getTotalLength ( ) ; java . lang . Object items = net . time4j . Duration . ofPositive ( ) . seconds ( 4 ) . minutes ( 61 ) . build ( ) . getTotalLength ( ) ; "<AssertPlaceHolder>" ; } getTotalLength ( ) { return this . items ; }
org . junit . Assert . assertThat ( items , org . hamcrest . CoreMatchers . is ( expected ) )
test_get_cache_entry_type ( ) { javax . management . openmbean . CompositeType compositeType = caffeine . getCacheEntryType ( ) ; "<AssertPlaceHolder>" ; } keySet ( ) { return this . metaDataMap . keySet ( ) ; }
org . junit . Assert . assertEquals ( 7 , compositeType . keySet ( ) . size ( ) )
testUnionFindMSColoringStream ( ) { org . neo4j . graphdb . Result result = org . neo4j . graphalgo . algo . EmptyGraphIntegrationTest . db . execute ( ( ( "CALL<sp>algo.unionFind.mscoloring.stream('',<sp>'',{graph:'" + ( graphImpl ) ) + "'})" ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return ( offset ) < ( nodeCount ) ; }
org . junit . Assert . assertFalse ( result . hasNext ( ) )
testImagePreProcessingScaler ( ) { org . nd4j . linalg . dataset . ImagePreProcessingScaler imagePreProcessingScaler = new org . nd4j . linalg . dataset . ImagePreProcessingScaler ( 0 , 1 ) ; SUT . write ( imagePreProcessingScaler , tmpFile ) ; org . nd4j . linalg . dataset . ImagePreProcessingScaler restored = SUT . restore ( tmpFile ) ; "<AssertPlaceHolder>" ; } restore ( org . nd4j . linalg . dataset . api . preprocessor . serializer . InputStream ) { org . nd4j . linalg . dataset . api . preprocessor . serializer . DataInputStream dis = new org . nd4j . linalg . dataset . api . preprocessor . serializer . DataInputStream ( stream ) ; boolean fitLabels = dis . readBoolean ( ) ; double targetMin = dis . readDouble ( ) ; double targetMax = dis . readDouble ( ) ; org . nd4j . linalg . dataset . api . preprocessor . NormalizerMinMaxScaler result = new org . nd4j . linalg . dataset . api . preprocessor . NormalizerMinMaxScaler ( targetMin , targetMax ) ; result . fitLabel ( fitLabels ) ; result . setFeatureStats ( org . nd4j . linalg . factory . Nd4j . read ( dis ) , org . nd4j . linalg . factory . Nd4j . read ( dis ) ) ; if ( fitLabels ) { result . setLabelStats ( org . nd4j . linalg . factory . Nd4j . read ( dis ) , org . nd4j . linalg . factory . Nd4j . read ( dis ) ) ; } return result ; }
org . junit . Assert . assertEquals ( imagePreProcessingScaler , restored )
toUserGroups ( ) { java . util . List < org . oscm . internal . usergroupmgmt . POUserGroup > poUserGroups = preparePOUserGroups ( 2 ) ; java . util . List < org . oscm . domobjects . UserGroup > userGroups = org . oscm . internal . assembler . POUserGroupAssembler . toUserGroups ( poUserGroups ) ; "<AssertPlaceHolder>" ; verifyPOWithDO ( poUserGroups . get ( 0 ) , userGroups . get ( 0 ) ) ; verifyPOWithDO ( poUserGroups . get ( 1 ) , userGroups . get ( 1 ) ) ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , userGroups . size ( ) )
shouldCreateContextPayloadWithEnvelope ( ) { final uk . gov . justice . services . messaging . JsonEnvelope jsonEnvelope = mock ( uk . gov . justice . services . messaging . JsonEnvelope . class ) ; final uk . gov . justice . services . core . interceptor . ContextPayload contextPayload = uk . gov . justice . services . core . interceptor . DefaultContextPayload . contextPayloadWith ( jsonEnvelope ) ; "<AssertPlaceHolder>" ; } getEnvelope ( ) { return envelope ; }
org . junit . Assert . assertThat ( contextPayload . getEnvelope ( ) , org . hamcrest . core . Is . is ( java . util . Optional . of ( jsonEnvelope ) ) )
testMapManufacuringFacilityToDTSMultipleAdr ( ) { java . util . Map < java . lang . String , java . lang . Object > betriebsstaetteMap = getManufacturingFacility ( 3L , "First" ) ; ma . glasnost . orika . test . community . issue25 . modelA . ManufacturingFacility manufacturingFacility = ( ( ma . glasnost . orika . test . community . issue25 . modelA . ManufacturingFacility ) ( betriebsstaetteMap . get ( BaseManufacturingFacilityTest . MANUFACTURINGFACILITY_KEY ) ) ) ; ma . glasnost . orika . test . community . issue25 . modelB . ManufacturingFacilityDTS manufacturingFacilityDTS = ( ( ma . glasnost . orika . test . community . issue25 . modelB . ManufacturingFacilityDTS ) ( betriebsstaetteMap . get ( BaseManufacturingFacilityTest . MANUFACTURINGFACILITYDTS_KEY ) ) ) ; addAddressToManufacturingFacility ( betriebsstaetteMap , 10L , "StreetA" , 815L , "This<sp>is<sp>a<sp>comment.<sp>10" , 'D' ) ; addAddressToManufacturingFacility ( betriebsstaetteMap , 11L , "StreetB" , 816L , "This<sp>is<sp>a<sp>comment.<sp>11" , 'E' ) ; addAddressToManufacturingFacility ( betriebsstaetteMap , 12L , "StreetC" , 817L , "This<sp>is<sp>a<sp>comment.<sp>12" , 'F' ) ; ma . glasnost . orika . test . community . issue25 . modelB . ManufacturingFacilityDTS betriebsstaetteDTSMapped = mapper . map ( manufacturingFacility , ma . glasnost . orika . test . community . issue25 . modelB . ManufacturingFacilityDTS . class ) ; ma . glasnost . orika . test . community . issue25 . modelA . ManufacturingFacility betriebsstaetteMappedBack = mapper . map ( betriebsstaetteDTSMapped , ma . glasnost . orika . test . community . issue25 . modelA . ManufacturingFacility . class ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; ma . glasnost . orika . examples . Example2TestCase . Property other = ( ( ma . glasnost . orika . examples . Example2TestCase . Property ) ( obj ) ) ; if ( ( key ) == null ) { if ( ( other . key ) != null ) return false ; } else if ( ! ( key . equals ( other . key ) ) ) return false ; if ( ( value ) == null ) { if ( ( other . value ) != null ) return false ; } else if ( ! ( value . equals ( other . value ) ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( manufacturingFacility . equals ( betriebsstaetteMappedBack ) )
testSubscriberEndpointComplexFilter ( ) { org . ow2 . chameleon . pubsubhubbub . test . hub . TestSubscriber subscriber ; org . ow2 . chameleon . pubsubhubbub . test . hub . TestPublisher publisher ; waitForIt ( org . ow2 . chameleon . pubsubhubbub . test . hub . WAIT_TIME ) ; publisher = new org . ow2 . chameleon . pubsubhubbub . test . hub . TestPublisher ( "/rss" , "subscriber1" , "/call1" ) ; publisher . createRSSTopic ( ) ; createEndpoints ( ) ; publisher . registerPublisher ( ) ; publisher . addRSSFeed ( testEndpoints . get ( 0 ) , org . ow2 . chameleon . pubsubhubbub . test . hub . FEED_TITLE_NEW ) ; waitForIt ( org . ow2 . chameleon . pubsubhubbub . test . hub . WAIT_TIME ) ; publisher . sendUpdateToHub ( ) ; publisher . addRSSFeed ( testEndpoints . get ( 1 ) , org . ow2 . chameleon . pubsubhubbub . test . hub . FEED_TITLE_NEW ) ; waitForIt ( org . ow2 . chameleon . pubsubhubbub . test . hub . WAIT_TIME ) ; publisher . sendUpdateToHub ( ) ; publisher . addRSSFeed ( testEndpoints . get ( 2 ) , org . ow2 . chameleon . pubsubhubbub . test . hub . FEED_TITLE_NEW ) ; waitForIt ( org . ow2 . chameleon . pubsubhubbub . test . hub . WAIT_TIME ) ; publisher . sendUpdateToHub ( ) ; subscriber = new org . ow2 . chameleon . pubsubhubbub . test . hub . TestSubscriber ( "/sub1" , "(|(endpoint.id=0)(endpoint.id=2))" , "sub1" ) ; subscriber . start ( ) ; waitForIt ( org . ow2 . chameleon . pubsubhubbub . test . hub . WAIT_TIME ) ; java . util . List < org . ow2 . chameleon . pubsubhubbub . test . hub . EndpointTitle > expectUpdates = new java . util . ArrayList < org . ow2 . chameleon . pubsubhubbub . test . hub . EndpointTitle > ( ) ; expectUpdates . add ( new org . ow2 . chameleon . pubsubhubbub . test . hub . EndpointTitle ( testEndpoints . get ( 0 ) , HUB_SUBSCRIPTION_UPDATE_ENDPOINT_ADDED ) ) ; expectUpdates . add ( new org . ow2 . chameleon . pubsubhubbub . test . hub . EndpointTitle ( testEndpoints . get ( 2 ) , HUB_SUBSCRIPTION_UPDATE_ENDPOINT_ADDED ) ) ; "<AssertPlaceHolder>" ; subscriber . stop ( ) ; publisher . stop ( ) ; } checkUpdates ( java . util . List ) { if ( new java . util . HashSet < org . ow2 . chameleon . pubsubhubbub . test . hub . AbstactHubTest . EndpointTitle > ( postParameters ) . equals ( new java . util . HashSet < org . ow2 . chameleon . pubsubhubbub . test . hub . AbstactHubTest . EndpointTitle > ( expectUpdates ) ) ) { return true ; } return false ; }
org . junit . Assert . assertTrue ( subscriber . checkUpdates ( expectUpdates ) )
testFetchByPrimaryKeyExisting ( ) { com . liferay . social . kernel . model . SocialActivityCounter newSocialActivityCounter = addSocialActivityCounter ( ) ; com . liferay . social . kernel . model . SocialActivityCounter existingSocialActivityCounter = _persistence . fetchByPrimaryKey ( newSocialActivityCounter . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingSocialActivityCounter , newSocialActivityCounter )
countNodesOverPartitions ( ) { org . neo4j . kernel . api . impl . schema . reader . PartitionedIndexReader indexReader = createPartitionedReaderFromReaders ( ) ; when ( indexReader1 . countIndexedNodes ( 1 , new int [ ] { org . neo4j . kernel . api . impl . schema . reader . PartitionedIndexReaderTest . PROP_KEY } , org . neo4j . values . storable . Values . of ( "a" ) ) ) . thenReturn ( 1L ) ; when ( indexReader2 . countIndexedNodes ( 1 , new int [ ] { org . neo4j . kernel . api . impl . schema . reader . PartitionedIndexReaderTest . PROP_KEY } , org . neo4j . values . storable . Values . of ( "a" ) ) ) . thenReturn ( 2L ) ; when ( indexReader3 . countIndexedNodes ( 1 , new int [ ] { org . neo4j . kernel . api . impl . schema . reader . PartitionedIndexReaderTest . PROP_KEY } , org . neo4j . values . storable . Values . of ( "a" ) ) ) . thenReturn ( 3L ) ; "<AssertPlaceHolder>" ; } countIndexedNodes ( long , int [ ] , org . neo4j . values . storable . Value [ ] ) { return 0 ; }
org . junit . Assert . assertEquals ( 6 , indexReader . countIndexedNodes ( 1 , new int [ ] { org . neo4j . kernel . api . impl . schema . reader . PartitionedIndexReaderTest . PROP_KEY } , org . neo4j . values . storable . Values . of ( "a" ) ) )
testEmptyCarousel ( ) { com . adobe . cq . wcm . core . components . models . Carousel carousel = new com . adobe . cq . wcm . core . components . internal . models . v1 . CarouselImpl ( ) ; java . util . List < com . adobe . cq . wcm . core . components . models . ListItem > items = carousel . getItems ( ) ; "<AssertPlaceHolder>" ; } getItems ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertTrue ( "" , ( ( items == null ) || ( ( items . size ( ) ) == 0 ) ) )
testZSS664 ( ) { getTo ( "/issue/664-page-up-down.zul" ) ; org . zkoss . zss . test . selenium . entity . SpreadsheetWidget spreadsheet = getSpreadsheet ( ) ; org . zkoss . zss . test . selenium . entity . SheetCtrlWidget sheetCtrl = spreadsheet . getSheetCtrl ( ) ; org . zkoss . zss . test . selenium . entity . EditorWidget inlineEditor = sheetCtrl . getInlineEditor ( ) ; spreadsheet . focus ( ) ; waitUntilProcessEnd ( org . zkoss . zss . test . selenium . Setup . getTimeoutL0 ( ) ) ; click ( sheetCtrl . getCell ( "C6" ) ) ; waitUntilProcessEnd ( org . zkoss . zss . test . selenium . Setup . getTimeoutL0 ( ) ) ; inlineEditor . toWebElement ( ) . sendKeys ( Keys . PAGE_DOWN ) ; waitUntilProcessEnd ( org . zkoss . zss . test . selenium . Setup . getTimeoutL0 ( ) ) ; inlineEditor . toWebElement ( ) . sendKeys ( Keys . PAGE_UP ) ; waitUntilProcessEnd ( org . zkoss . zss . test . selenium . Setup . getTimeoutL0 ( ) ) ; click ( jq ( "@button:eq(0)" ) ) ; waitUntilProcessEnd ( org . zkoss . zss . test . selenium . Setup . getTimeoutL0 ( ) ) ; org . zkoss . zss . test . selenium . entity . JQuery result = jq ( "$result" ) ; waitUntil ( 1 , org . openqa . selenium . support . ui . ExpectedConditions . visibilityOf ( result . toWebElement ( ) ) ) ; final java . lang . String focusCell = result . text ( ) ; waitUntilProcessEnd ( org . zkoss . zss . test . selenium . Setup . getTimeoutL0 ( ) ) ; inlineEditor . toWebElement ( ) . sendKeys ( Keys . PAGE_DOWN ) ; waitUntilProcessEnd ( org . zkoss . zss . test . selenium . Setup . getTimeoutL0 ( ) ) ; inlineEditor . toWebElement ( ) . sendKeys ( Keys . PAGE_UP ) ; waitUntilProcessEnd ( org . zkoss . zss . test . selenium . Setup . getTimeoutL0 ( ) ) ; click ( jq ( "@button:eq(0)" ) ) ; waitUntil ( 1 , org . openqa . selenium . support . ui . ExpectedConditions . visibilityOf ( result . toWebElement ( ) ) ) ; "<AssertPlaceHolder>" ; } text ( ) { java . lang . String editText = "=SUM(10)" ; org . zkoss . zss . model . sys . input . InputResult result = org . zkoss . zss . model . InputEngineTest . inputEngine . parseInput ( editText , "@" , org . zkoss . zss . model . InputEngineTest . inputParseContext ) ; org . junit . Assert . assertEquals ( CellType . STRING , result . getType ( ) ) ; org . junit . Assert . assertTrue ( ( ( result . getValue ( ) ) instanceof java . lang . String ) ) ; org . junit . Assert . assertEquals ( editText , result . getValue ( ) . toString ( ) ) ; }
org . junit . Assert . assertEquals ( focusCell , result . text ( ) )
testRecurrenceStartsMondayRepeatsWednesday ( ) { java . util . Calendar calendar = java . util . Calendar . getInstance ( ) ; calendar . set ( Calendar . DAY_OF_WEEK , Calendar . MONDAY ) ; _calendarBooking . setStartTime ( calendar . getTimeInMillis ( ) ) ; _calendarBooking . setRecurrence ( "RRULE:FREQ=WEEKLY;COUNT=2;INTERVAL=1;BYDAY=WE" ) ; com . liferay . calendar . util . CalendarBookingIterator calendarBookingIterator = new com . liferay . calendar . util . CalendarBookingIterator ( _calendarBooking ) ; int count = 0 ; while ( calendarBookingIterator . hasNext ( ) ) { calendarBookingIterator . next ( ) ; count ++ ; } "<AssertPlaceHolder>" ; } next ( ) { com . liferay . message . boards . model . MBMessage message = _messages . get ( _from ) ; ( _from ) ++ ; return message ; }
org . junit . Assert . assertEquals ( 2 , count )
testStringToHexArray ( ) { java . lang . String hex = "019f314a" ; byte [ ] hexArray = eu . stratosphere . util . StringUtils . hexStringToByte ( hex ) ; byte [ ] expectedArray = new byte [ ] { 1 , - 97 , 49 , 74 } ; "<AssertPlaceHolder>" ; } hexStringToByte ( java . lang . String ) { final byte [ ] bts = new byte [ ( hex . length ( ) ) / 2 ] ; for ( int i = 0 ; i < ( bts . length ) ; i ++ ) { bts [ i ] = ( ( byte ) ( java . lang . Integer . parseInt ( hex . substring ( ( 2 * i ) , ( ( 2 * i ) + 2 ) ) , 16 ) ) ) ; } return bts ; }
org . junit . Assert . assertArrayEquals ( expectedArray , hexArray )
manageOperationsProcess_VSERVER_STOPPING ( ) { doReturn ( VServerStatus . STOPPED ) . when ( vServerProcessor . vserverComm ) . getVServerStatus ( paramHandler ) ; org . oscm . app . iaas . data . FlowState result = vServerProcessor . manageOperationsProcess ( "controllerId" , "instanceId" , paramHandler , FlowState . VSERVER_STOPPING , null ) ; "<AssertPlaceHolder>" ; } manageOperationsProcess ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState , org . oscm . app . iaas . data . FlowState ) { org . oscm . app . iaas . data . FlowState newState = newStateParam ; switch ( flowState ) { case VSERVER_START_REQUESTED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTING , paramHandler ) ) { if ( vserverComm . startVServer ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTING ; } } break ; case VSERVER_STARTING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTED , paramHandler ) ) { if ( VServerStatus . RUNNING . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTED ; } } break ; case VSERVER_STARTED : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } break ; case VSERVER_STOP_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STOPPING , paramHandler ) ) { java . lang . String status = vserverComm . getVServerStatus ( paramHandler ) ; if ( VServerStatus . RUNNING . equals ( status ) ) { vserverComm . stopVServer ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVER_STOPPING ; } } break ; case VSERVER_STOPPING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STOPPED , paramHandler ) ) { java . lang . String status = vserverComm . getVServerStatus ( paramHandler ) ; if ( VServerStatus . STOPPED . equals ( status ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STOPPED ; } } break ; case VSERVER_STOPPED : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } break ; default : } return newState ; }
org . junit . Assert . assertEquals ( FlowState . VSERVER_STOPPED , result )
hasDataWithZeroSampleCountReturnsFalse ( ) { com . rackspacecloud . blueflood . types . BluefloodCounterRollup rollup = new com . rackspacecloud . blueflood . types . BluefloodCounterRollup ( ) . withCount ( 1 ) . withRate ( 1 ) . withSampleCount ( 0 ) ; "<AssertPlaceHolder>" ; } hasData ( ) { return ( sampleCount ) > 0 ; }
org . junit . Assert . assertFalse ( rollup . hasData ( ) )
testDynAnyTypeCode ( ) { java . lang . String msg ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynArray dynAny = null ; tc = orb . get_primitive_tc ( TCKind . tk_long ) ; tc = orb . create_array_tc ( Bound . value , tc ) ; dynAny = createDynAnyFromTypeCode ( tc ) ; msg = "Incorrect<sp>TypeCode<sp>retrieved<sp>from<sp>DynAny::type<sp>operation" ; "<AssertPlaceHolder>" ; } type ( ) { if ( ( org . jacorb . test . bugs . bug532 . ByteSequenceHelper . __typeCode ) == null ) { org . jacorb . test . bugs . bug532 . ByteSequenceHelper . __typeCode = org . jacorb . test . bugs . bug532 . org . omg . CORBA . ORB . init ( ) . get_primitive_tc ( org . omg . CORBA . TCKind . tk_octet ) ; org . jacorb . test . bugs . bug532 . ByteSequenceHelper . __typeCode = org . jacorb . test . bugs . bug532 . org . omg . CORBA . ORB . init ( ) . create_sequence_tc ( 0 , org . jacorb . test . bugs . bug532 . ByteSequenceHelper . __typeCode ) ; org . jacorb . test . bugs . bug532 . ByteSequenceHelper . __typeCode = org . jacorb . test . bugs . bug532 . org . omg . CORBA . ORB . init ( ) . create_alias_tc ( org . jacorb . test . bugs . bug532 . ByteSequenceHelper . id ( ) , "ByteSequence" , org . jacorb . test . bugs . bug532 . ByteSequenceHelper . __typeCode ) ; } return org . jacorb . test . bugs . bug532 . ByteSequenceHelper . __typeCode ; }
org . junit . Assert . assertTrue ( msg , dynAny . type ( ) . equal ( tc ) )
should_apply_comparator_LessThan ( ) { final java . lang . String name = "findByNameLessThan" ; final java . lang . String expected = "select<sp>e<sp>from<sp>Simple<sp>e<sp>" + "where<sp>e.name<sp><<sp>?1" ; java . lang . String result = org . apache . deltaspike . data . impl . builder . part . QueryRoot . create ( name , repo , prefix ( name ) ) . getJpqlQuery ( ) . trim ( ) ; "<AssertPlaceHolder>" ; } getJpqlQuery ( ) { return jpqlQuery ; }
org . junit . Assert . assertEquals ( expected , result )
testGetName ( ) { System . out . println ( "getName" ) ; fish . payara . nucleus . microprofile . config . source . EnvironmentConfigSource instance = new fish . payara . nucleus . microprofile . config . source . EnvironmentConfigSource ( ) ; java . lang . String expResult = "Environment" ; java . lang . String result = instance . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return OSGiSniffer . CONTAINER_NAME ; }
org . junit . Assert . assertEquals ( expResult , result )
serialize_bindingNotInVariableOrder ( ) { final org . eclipse . rdf4j . query . impl . MapBindingSet originalBindingSet = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; originalBindingSet . addBinding ( "x" , org . apache . rya . indexing . pcj . storage . accumulo . AccumuloPcjSerializerTest . VF . createIRI ( "http://a" ) ) ; originalBindingSet . addBinding ( "y" , org . apache . rya . indexing . pcj . storage . accumulo . AccumuloPcjSerializerTest . VF . createIRI ( "http://b" ) ) ; originalBindingSet . addBinding ( "z" , org . apache . rya . indexing . pcj . storage . accumulo . AccumuloPcjSerializerTest . VF . createIRI ( "http://d" ) ) ; final org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder varOrder = new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "x" , "y" ) ; org . apache . rya . indexing . pcj . storage . accumulo . BindingSetConverter < byte [ ] > converter = new org . apache . rya . indexing . pcj . storage . accumulo . AccumuloPcjSerializer ( ) ; byte [ ] serialized = converter . convert ( originalBindingSet , varOrder ) ; org . eclipse . rdf4j . query . BindingSet deserialized = converter . convert ( serialized , varOrder ) ; org . eclipse . rdf4j . query . impl . MapBindingSet expected = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; expected . addBinding ( "x" , org . apache . rya . indexing . pcj . storage . accumulo . AccumuloPcjSerializerTest . VF . createIRI ( "http://a" ) ) ; expected . addBinding ( "y" , org . apache . rya . indexing . pcj . storage . accumulo . AccumuloPcjSerializerTest . VF . createIRI ( "http://b" ) ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String , org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ) { requireNonNull ( bindingSetString ) ; requireNonNull ( varOrder ) ; if ( ( bindingSetString . isEmpty ( ) ) && ( varOrder . toString ( ) . isEmpty ( ) ) ) { return new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; } final java . lang . String [ ] bindingStrings = bindingSetString . split ( org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . BINDING_DELIM ) ; final java . lang . String [ ] varOrderArr = varOrder . toArray ( ) ; checkArgument ( ( ( varOrderArr . length ) == ( bindingStrings . length ) ) , "The<sp>number<sp>of<sp>Bindings<sp>must<sp>match<sp>the<sp>length<sp>of<sp>the<sp>VariableOrder." ) ; final org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet bindingSet = new org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet ( ) ; for ( int i = 0 ; i < ( bindingStrings . length ) ; i ++ ) { final java . lang . String bindingString = bindingStrings [ i ] ; if ( ! ( org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . NULL_VALUE_STRING . equals ( bindingString ) ) ) { final java . lang . String name = varOrderArr [ i ] ; final org . eclipse . rdf4j . model . Value value = org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . toValue ( bindingStrings [ i ] ) ; bindingSet . addBinding ( name , value ) ; } } return bindingSet ; }
org . junit . Assert . assertEquals ( expected , deserialized )
testSelectCompoundLongNames ( ) { createTestDataSet ( ) ; org . apache . cayenne . query . SelectQuery < org . apache . cayenne . testdo . testmap . CompoundPaintingLongNames > query = org . apache . cayenne . query . SelectQuery . query ( org . apache . cayenne . testdo . testmap . CompoundPaintingLongNames . class ) ; java . util . List < ? > objects = context . performQuery ( query ) ; "<AssertPlaceHolder>" ; } performQuery ( org . apache . cayenne . query . Query ) { selectExecuted [ 0 ] = true ; return super . performQuery ( query ) ; }
org . junit . Assert . assertNotNull ( objects )
getTomorrowMostActiveCardByProjectTest ( ) { io . lavagna . service . Card resultCard = statisticsService . getMostActiveCardByProject ( board . getProjectId ( ) , org . apache . commons . lang3 . time . DateUtils . addDays ( today , 1 ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNull ( resultCard )
testEmptyIterator ( ) { java . util . List < java . lang . Integer > empty = com . google . common . collect . Lists . newArrayList ( ) ; java . util . List < java . util . Iterator < java . lang . Integer > > iterators = com . google . common . collect . Lists . < java . util . Iterator < java . lang . Integer > > newArrayList ( empty . iterator ( ) ) ; brown . tracingplane . atomlayer . MergeIterator < java . lang . Integer > merged = new brown . tracingplane . atomlayer . MergeIterator < java . lang . Integer > ( iterators , brown . tracingplane . atomlayer . TestMergeIterator . integerComparator ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return ( ( nexta ) != null ) || ( ( nextb ) != null ) ; }
org . junit . Assert . assertFalse ( merged . hasNext ( ) )
randomKeyShouldReturnKeyWhenAvailableOnAnyNode ( ) { when ( clusterConnection3Mock . randomkey ( ) ) . thenReturn ( org . springframework . data . redis . connection . lettuce . LettuceClusterConnectionUnitTests . KEY_3_BYTES ) ; for ( int i = 0 ; i < 100 ; i ++ ) { "<AssertPlaceHolder>" ; } } randomKey ( ) { return delegate . randomKey ( ) ; }
org . junit . Assert . assertThat ( connection . randomKey ( ) , org . hamcrest . core . Is . is ( org . springframework . data . redis . connection . lettuce . LettuceClusterConnectionUnitTests . KEY_3_BYTES ) )
failsOnIllegalListProperty ( ) { org . neo4j . geoff . Subgraph geoff = new org . neo4j . geoff . Subgraph ( "(fib)<sp>{\"sequence\":<sp>[1,1.0,\"two\",3,5,8,13,21,35]}" ) ; java . util . Map < java . lang . String , org . neo4j . geoff . test . PropertyContainer > out = org . neo4j . geoff . Geoff . insertIntoNeo4j ( geoff , db , null ) ; org . neo4j . geoff . test . Transaction tx = db . beginTx ( ) ; try { "<AssertPlaceHolder>" ; tx . success ( ) ; } finally { tx . close ( ) ; } } insertIntoNeo4j ( org . neo4j . geoff . Subgraph , org . neo4j . graphdb . GraphDatabaseService , java . util . Map ) { org . neo4j . geoff . Neo4jGraphProxy graph = new org . neo4j . geoff . Neo4jGraphProxy ( graphDB ) ; if ( params != null ) { graph . inputParams ( new java . util . HashMap < java . lang . String , org . neo4j . graphdb . PropertyContainer > ( params ) ) ; } graph . insert ( subgraph ) ; return graph . outputParams ( ) ; }
org . junit . Assert . assertNotNull ( out )
testFullExecution ( ) { try ( com . dremio . service . coordinator . ClusterCoordinator clusterCoordinator = com . dremio . service . coordinator . local . LocalClusterCoordinator . newRunningCoordinator ( ) ; com . dremio . exec . server . SabotNode bit1 = new com . dremio . exec . server . SabotNode ( DEFAULT_SABOT_CONFIG , clusterCoordinator , CLASSPATH_SCAN_RESULT , true ) ; com . dremio . exec . client . DremioClient client = new com . dremio . exec . client . DremioClient ( DEFAULT_SABOT_CONFIG , clusterCoordinator ) ) { bit1 . run ( ) ; client . connect ( ) ; java . util . List < com . dremio . sabot . rpc . user . QueryDataBatch > results = client . runQuery ( com . dremio . exec . proto . UserBitShared . QueryType . PHYSICAL , com . google . common . io . Files . toString ( com . dremio . common . util . FileUtils . getResourceAsFile ( "/store/text/test.json" ) , Charsets . UTF_8 ) . replace ( "#{DATA_FILE}" , com . dremio . common . util . FileUtils . getResourceAsFile ( "/store/text/data/regions.csv" ) . toURI ( ) . toString ( ) ) ) ; int count = 0 ; com . dremio . exec . record . RecordBatchLoader loader = new com . dremio . exec . record . RecordBatchLoader ( bit1 . getContext ( ) . getAllocator ( ) ) ; for ( com . dremio . sabot . rpc . user . QueryDataBatch b : results ) { if ( ( b . getHeader ( ) . getRowCount ( ) ) != 0 ) { count += b . getHeader ( ) . getRowCount ( ) ; } loader . load ( b . getHeader ( ) . getDef ( ) , b . getData ( ) ) ; com . dremio . exec . util . VectorUtil . showVectorAccessibleContent ( loader ) ; loader . clear ( ) ; b . release ( ) ; } "<AssertPlaceHolder>" ; } } release ( ) { com . google . common . base . Preconditions . checkState ( ( ! ( closed ) ) , "Trying<sp>to<sp>release<sp>from<sp>a<sp>closed<sp>ticket:<sp>%s" , allocator . getName ( ) ) ; return ( childCount . decrementAndGet ( ) ) == 0 ; }
org . junit . Assert . assertEquals ( 5 , count )
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType context = new org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>EnrolmentStatusType<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
listenersWithoutHandlers ( ) { io . socket . emitter . Emitter emitter = new io . socket . emitter . Emitter ( ) ; "<AssertPlaceHolder>" ; } listeners ( java . lang . String ) { java . util . concurrent . ConcurrentLinkedQueue < io . socket . emitter . Emitter . Listener > callbacks = this . callbacks . get ( event ) ; return callbacks != null ? new java . util . ArrayList < io . socket . emitter . Emitter . Listener > ( callbacks ) : new java . util . ArrayList < io . socket . emitter . Emitter . Listener > ( 0 ) ; }
org . junit . Assert . assertThat ( emitter . listeners ( "foo" ) . toArray ( ) , org . hamcrest . CoreMatchers . is ( new java . lang . Object [ ] { } ) )
testNoMatch ( ) { java . util . List < org . eclipse . tycho . plugins . p2 . director . ProfileName > configuration = java . util . Arrays . asList ( org . eclipse . tycho . plugins . p2 . director . ProfileNameTest . SPECIFIC_LINUX_CONFIG ) ; java . lang . String name = org . eclipse . tycho . plugins . p2 . director . ProfileName . getNameForEnvironment ( org . eclipse . tycho . plugins . p2 . director . ProfileNameTest . WIN32_WIN32_X86_64 , configuration , org . eclipse . tycho . plugins . p2 . director . ProfileNameTest . DEFAULT_NAME ) ; "<AssertPlaceHolder>" ; } getNameForEnvironment ( org . eclipse . tycho . core . shared . TargetEnvironment , java . util . List , java . lang . String ) { if ( nameMap != null ) { for ( org . eclipse . tycho . plugins . p2 . director . ProfileName profileWithEnvironment : nameMap ) { if ( env . match ( profileWithEnvironment . getOs ( ) , profileWithEnvironment . getWs ( ) , profileWithEnvironment . getArch ( ) ) ) { return profileWithEnvironment . getName ( ) ; } } } return defaultName ; }
org . junit . Assert . assertEquals ( org . eclipse . tycho . plugins . p2 . director . ProfileNameTest . DEFAULT_NAME , name )
testCreate ( ) { com . streamsets . pipeline . api . impl . FloatTypeSupport ts = new com . streamsets . pipeline . api . impl . FloatTypeSupport ( ) ; java . lang . Float o = new java . lang . Float ( 1.2 ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Object ) { return clone ( value ) ; }
org . junit . Assert . assertSame ( o , ts . create ( o ) )
checkTest2 ( ) { com . navercorp . pinpoint . web . vo . Application application = new com . navercorp . pinpoint . web . vo . Application ( com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleCheckerTest . FROM_SERVICE_NAME , com . navercorp . pinpoint . common . trace . ServiceType . STAND_ALONE ) ; com . navercorp . pinpoint . web . alarm . collector . MapStatisticsCallerDataCollector dataCollector = new com . navercorp . pinpoint . web . alarm . collector . MapStatisticsCallerDataCollector ( com . navercorp . pinpoint . web . alarm . DataCollectorFactory . DataCollectorCategory . CALLER_STAT , application , com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleCheckerTest . dao , java . lang . System . currentTimeMillis ( ) , 300000 ) ; com . navercorp . pinpoint . web . alarm . vo . Rule rule = new com . navercorp . pinpoint . web . alarm . vo . Rule ( com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleCheckerTest . FROM_SERVICE_NAME , com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleCheckerTest . SERVICE_TYPE , CheckerCategory . ERROR_COUNT_TO_CALLEE . getName ( ) , 6 , "testGroup" , false , false , ( ( com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleCheckerTest . TO_SERVICE_NAME ) + 1 ) ) ; com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleeChecker checker = new com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleeChecker ( dataCollector , rule ) ; checker . check ( ) ; "<AssertPlaceHolder>" ; } isDetected ( ) { return detected ; }
org . junit . Assert . assertFalse ( checker . isDetected ( ) )
theLargest ( ) { int [ ] input = new int [ ] { 1 , 2 , 3 } ; chapter3 . selectionsort . JaegyuSelectionSort selection = new chapter3 . selectionsort . JaegyuSelectionSort ( ) ; "<AssertPlaceHolder>" ; } returnMaxIndex ( int [ ] , int ) { int maxIndex = 0 ; for ( int i = 1 ; i <= last ; i ++ ) { if ( ( input [ i ] ) > ( input [ maxIndex ] ) ) maxIndex = i ; } return maxIndex ; }
org . junit . Assert . assertEquals ( 2 , selection . returnMaxIndex ( input , 2 ) )
comparator ( ) { "<AssertPlaceHolder>" ; } comparator ( ) { return null ; }
org . junit . Assert . assertNull ( this . list . comparator ( ) )
testShouldDetectorsBeBound ( ) { org . apache . ambari . server . ldap . service . ads . detectors . AttributeDetectorFactory f = org . apache . ambari . server . ldap . LdapModuleFunctionalTest . injector . getInstance ( org . apache . ambari . server . ldap . service . ads . detectors . AttributeDetectorFactory . class ) ; "<AssertPlaceHolder>" ; org . apache . ambari . server . ldap . LdapModuleFunctionalTest . LOG . info ( f . groupAttributeDetector ( ) . toString ( ) ) ; org . apache . ambari . server . ldap . LdapModuleFunctionalTest . LOG . info ( f . userAttributDetector ( ) . toString ( ) ) ; } getInstance ( org . apache . ambari . view . ViewContext ) { if ( ! ( org . apache . ambari . view . pig . persistence . utils . StorageUtil . viewSingletonObjects . containsKey ( context . getInstanceName ( ) ) ) ) org . apache . ambari . view . pig . persistence . utils . StorageUtil . viewSingletonObjects . put ( context . getInstanceName ( ) , new org . apache . ambari . view . pig . persistence . utils . StorageUtil ( context ) ) ; return org . apache . ambari . view . pig . persistence . utils . StorageUtil . viewSingletonObjects . get ( context . getInstanceName ( ) ) ; }
org . junit . Assert . assertNotNull ( f )
testStopPipeline ( ) { com . streamsets . datacollector . execution . runner . common . ProductionPipeline pipeline = createProductionPipeline ( DeliveryGuarantee . AT_LEAST_ONCE , false , com . streamsets . datacollector . execution . runner . common . TestProductionPipeline . PipelineType . DEFAULT ) ; pipeline . stop ( ) ; "<AssertPlaceHolder>" ; } wasStopped ( ) { return pipelineRunner . wasStopped ( ) ; }
org . junit . Assert . assertTrue ( pipeline . wasStopped ( ) )
add_all_none_existing ( ) { final java . util . List < com . groupon . lex . metrics . timeseries . TimeSeriesCollection > tsdata = create_tsdata_ ( 4 ) . collect ( java . util . stream . Collectors . toList ( ) ) ; final java . util . Set < com . groupon . lex . metrics . timeseries . TimeSeriesCollection > result = new java . util . HashSet ( ) ; final com . groupon . lex . metrics . history . TSData impl = new com . groupon . lex . metrics . history . xdr . TSDataTest . TSDataMock ( ) { @ com . groupon . lex . metrics . history . xdr . Override public boolean add ( com . groupon . lex . metrics . timeseries . TimeSeriesCollection ts ) { return result . add ( ts ) ; } } ; "<AssertPlaceHolder>" ; } addAll ( java . util . Collection ) { if ( e . isEmpty ( ) ) return false ; final java . util . concurrent . locks . ReentrantReadWriteLock . WriteLock lock = guard . writeLock ( ) ; lock . lock ( ) ; try { org . joda . time . DateTime ts = e . iterator ( ) . next ( ) . getTimestamp ( ) ; return getAppendFileForWriting ( ts ) . getTsdata ( ) . addAll ( e ) ; } catch ( java . io . IOException ex ) { throw new java . lang . RuntimeException ( ex ) ; } finally { lock . unlock ( ) ; } }
org . junit . Assert . assertTrue ( impl . addAll ( tsdata ) )
testBase64OutputStream ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( 2048 ) ; for ( int i = 0 ; i < 128 ; i ++ ) { sb . append ( "0123456789ABCDEF" ) ; } java . lang . String input = sb . toString ( ) ; java . lang . String output = roundtripUsingOutputStream ( input ) ; "<AssertPlaceHolder>" ; } roundtripUsingOutputStream ( java . lang . String ) { java . io . ByteArrayOutputStream out2 = new java . io . ByteArrayOutputStream ( ) ; org . apache . james . mime4j . codec . Base64OutputStream outb64 = new org . apache . james . mime4j . codec . Base64OutputStream ( out2 , 76 ) ; org . apache . james . mime4j . util . ContentUtil . copy ( org . apache . james . mime4j . io . InputStreams . create ( input , Charsets . ISO_8859_1 ) , outb64 ) ; outb64 . flush ( ) ; outb64 . close ( ) ; java . io . InputStream is = new org . apache . james . mime4j . codec . Base64InputStream ( org . apache . james . mime4j . io . InputStreams . create ( out2 . toByteArray ( ) ) ) ; byte [ ] buf = org . apache . james . mime4j . util . ContentUtil . buffer ( is ) ; return org . apache . james . mime4j . util . ContentUtil . toAsciiString ( buf ) ; }
org . junit . Assert . assertEquals ( input , output )
getEffectiveResourcePermissions_emptyAsSystemResource ( ) { authenticateSystemResource ( ) ; final com . acciente . oacc . Resource accessorResource = generateUnauthenticatableResource ( ) ; final com . acciente . oacc . Resource accessedResource = generateUnauthenticatableResource ( ) ; final java . util . Set < com . acciente . oacc . ResourcePermission > resourcePermissions = accessControlContext . getEffectiveResourcePermissions ( accessorResource , accessedResource ) ; "<AssertPlaceHolder>" ; } getEffectiveResourcePermissions ( com . acciente . oacc . Resource , com . acciente . oacc . Resource ) { com . acciente . oacc . sql . internal . persister . SQLConnection connection = null ; __assertAuthenticated ( ) ; __assertResourceSpecified ( accessorResource ) ; __assertResourceSpecified ( accessedResource ) ; try { connection = __getConnection ( ) ; accessorResource = __resolveResource ( connection , accessorResource ) ; accessedResource = __resolveResource ( connection , accessedResource ) ; __assertQueryAuthorization ( connection , accessorResource ) ; return __getEffectiveResourcePermissions ( connection , accessorResource , accessedResource ) ; } finally { __closeConnection ( connection ) ; } }
org . junit . Assert . assertThat ( resourcePermissions . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) )
testSection33DuplicateUpdated ( ) { org . apache . abdera . i18n . iri . IRI uri = org . apache . abdera . test . parser . stax . FeedValidatorTest . baseURI . resolve ( "3.3/duplicate-updated.xml" ) ; org . apache . abdera . model . Document < org . apache . abdera . model . Feed > doc = parse ( uri ) ; java . util . Date d = org . apache . abdera . model . AtomDate . parse ( "2003-12-13T18:30:02Z" ) ; for ( org . apache . abdera . model . Entry entry : doc . getRoot ( ) . getEntries ( ) ) { java . util . Date date = entry . getUpdated ( ) ; "<AssertPlaceHolder>" ; } } getUpdated ( ) { return updated ; }
org . junit . Assert . assertEquals ( d , date )
testOperationExistsAfterAddRecordFromRecord ( ) { final kieker . analysisteetime . model . analysismodel . type . TypeModel typeModel = this . factory . createTypeModel ( ) ; final kieker . analysisteetime . model . TypeModelAssembler typeModelAssembler = new kieker . analysisteetime . model . TypeModelAssembler ( typeModel , new kieker . analysisteetime . signature . JavaComponentSignatureExtractor ( ) , new kieker . analysisteetime . signature . JavaOperationSignatureExtractor ( ) ) ; typeModelAssembler . addRecord ( this . beforeOperationEvent1 ) ; typeModelAssembler . addRecord ( this . beforeOperationEvent2 ) ; typeModelAssembler . addRecord ( this . beforeOperationEvent3 ) ; final java . util . List < java . lang . String > actualList = typeModel . getComponentTypes ( ) . get ( kieker . test . analysisteetime . ArchitectureModelAssemblerTest . EXAMPLE_CLASS_SIGNATURE_1 ) . getProvidedOperations ( ) . values ( ) . stream ( ) . map ( ( c ) -> c . getSignature ( ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; final java . util . List < java . lang . String > expectedList = java . util . Arrays . asList ( kieker . test . analysisteetime . ArchitectureModelAssemblerTest . EXAMPLE_OPERATION_SIGNATURE_1 , kieker . test . analysisteetime . ArchitectureModelAssemblerTest . EXAMPLE_OPERATION_SIGNATURE_2 ) ; java . util . Collections . sort ( actualList ) ; java . util . Collections . sort ( expectedList ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( o instanceof kieker . analysisteetime . util . ComposedKey ) ) { return false ; } final kieker . analysisteetime . util . ComposedKey < ? , ? > p = ( ( kieker . analysisteetime . util . ComposedKey < ? , ? > ) ( o ) ) ; return ( com . google . common . base . Objects . equal ( p . first , this . first ) ) && ( com . google . common . base . Objects . equal ( p . second , this . second ) ) ; }
org . junit . Assert . assertTrue ( actualList . equals ( expectedList ) )
emptyListReturnedWhenProvidersLookupThrowsException ( ) { org . xwiki . component . manager . ComponentManager cm = org . mockito . Mockito . mock ( org . xwiki . component . manager . ComponentManager . class ) ; when ( cm . getInstanceList ( org . phenotips . data . PatientContactProvider . class ) ) . thenThrow ( new org . xwiki . component . manager . ComponentLookupException ( "failed" ) ) ; this . mocker . registerComponent ( org . xwiki . component . manager . ComponentManager . class , "wiki" , cm ) ; java . util . List < org . phenotips . data . PatientContactProvider > result = this . mocker . getComponentUnderTest ( ) . get ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return this . properties . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( result . isEmpty ( ) )
testSecondarySource ( ) { when ( sl2 . load ( "source" ) ) . thenReturn ( s2 ) ; org . eluder . coveralls . maven . plugin . domain . Source source = creaMultiSourceLoader ( ) . load ( "source" ) ; "<AssertPlaceHolder>" ; } load ( java . lang . String ) { for ( org . eluder . coveralls . maven . plugin . source . SourceLoader sourceLoader : sourceLoaders ) { org . eluder . coveralls . maven . plugin . domain . Source source = sourceLoader . load ( sourceFile ) ; if ( source != null ) { return source ; } } throw new java . io . IOException ( ( "No<sp>source<sp>found<sp>for<sp>" + sourceFile ) ) ; }
org . junit . Assert . assertSame ( s2 , source )
shouldFinishEmptyOK ( ) { final java . lang . String script = "" ; final java . lang . String expected = script ; robot . prepareAndStart ( script ) . await ( ) ; robot . finish ( ) . await ( ) ; "<AssertPlaceHolder>" ; } getObservedScript ( ) { return ( progress ) != null ? progress . getObservedScript ( ) : null ; }
org . junit . Assert . assertEquals ( expected , robot . getObservedScript ( ) )
runTest ( ) { boolean result = checkNoError ( "Social_Forums_Topics_For_A_Forum" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )
generatorWithNElementsRunsTheTestNtimes ( ) { de . schauderhaft . rules . parameterized . Generator < java . lang . Integer > g = de . schauderhaft . rules . parameterized . GeneratorFactory . list ( 1 , 2 , 3 , 4 ) ; de . schauderhaft . rules . parameterized . GeneratorFactoryTest . CountingStatement probe = new de . schauderhaft . rules . parameterized . GeneratorFactoryTest . CountingStatement ( ) ; g . apply ( probe , null ) . evaluate ( ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { for ( T v : values ) { try { test . evaluate ( ) ; } catch ( java . lang . Throwable t ) { errorCollector . addError ( new java . lang . AssertionError ( ( "For<sp>value:<sp>" + v ) , t ) ) ; } } errorCollector . verify ( ) ; }
org . junit . Assert . assertThat ( probe . count , org . hamcrest . CoreMatchers . equalTo ( 4 ) )
addLong ( ) { long expected = 42 ; final java . lang . String column = "answer" ; java . lang . Object actual = this . cut . addColumn ( 0 , column , expected ) . getColumnValue ( column ) ; "<AssertPlaceHolder>" ; } getColumnValue ( java . lang . String ) { final com . airhacks . enhydrator . in . Column column = this . columnByName . get ( columnName ) ; if ( ( column == null ) || ( column . isNullValue ( ) ) ) { return null ; } return column . getValue ( ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) )
testIsColumnCreationEnabledToActiveDecisionTableWhenPresenterHasActiveDecisionTable ( ) { doReturn ( true ) . when ( presenter ) . hasActiveDecisionTable ( ) ; doReturn ( true ) . when ( presenter ) . isColumnCreationEnabled ( any ( ) ) ; final boolean isColumnCreationEnabled = presenter . isColumnCreationEnabledToActiveDecisionTable ( ) ; "<AssertPlaceHolder>" ; } isColumnCreationEnabledToActiveDecisionTable ( ) { return ( hasActiveDecisionTable ( ) ) && ( isColumnCreationEnabled ( getActiveDecisionTable ( ) ) ) ; }
org . junit . Assert . assertTrue ( isColumnCreationEnabled )
testAlternatives ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( bean )
testBuildWithOrderBy ( ) { org . lnu . is . domain . admin . unit . type . AdminUnitType context = new org . lnu . is . domain . admin . unit . type . AdminUnitType ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "abbrName" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>AdminUnitType<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>ORDER<sp>BY<sp>e.name<sp>ASC,<sp>e.abbrName<sp>DESC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . admin . unit . type . AdminUnitType > 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 ( expected , actualQuery )
testName ( ) { com . avanza . astrix . context . AstrixConfigurer configurer = new com . avanza . astrix . context . AstrixConfigurer ( ) ; configurer . set ( AstrixSettings . BEAN_BIND_ATTEMPT_INTERVAL , 500 ) ; configurer . set ( AstrixSettings . SERVICE_REGISTRY_URI , lunch . tests . LunchIntegrationTest . serviceRegistry . getServiceUri ( ) ) ; com . avanza . astrix . context . AstrixContext astrix = autoClosables . add ( configurer . configure ( ) ) ; lunch . api . LunchService lunchService = astrix . waitForBean ( lunch . api . LunchService . class , 15000 ) ; lunchService . addLunchRestaurant ( new lunch . api . LunchRestaurant ( "McDonalds" , "Fast<sp>Food" ) ) ; "<AssertPlaceHolder>" ; } getLunchRestaurant ( java . lang . String ) { return this . gigaSpace . readById ( lunch . api . LunchRestaurant . class , name ) ; }
org . junit . Assert . assertNotNull ( lunchService . getLunchRestaurant ( "McDonalds" ) )
shouldPreventDifferencesInIdentifierAndName ( ) { for ( amidst . mojangapi . minecraftinterface . RecognisedVersion recognisedVersion : amidst . mojangapi . minecraftinterface . RecognisedVersion . values ( ) ) { if ( recognisedVersion . isKnown ( ) ) { java . lang . String expectedIdentifier = amidst . mojangapi . minecraftinterface . RecognisedVersion . createEnumIdentifier ( recognisedVersion . getName ( ) ) ; java . lang . String actualIdentifier = recognisedVersion . name ( ) ; "<AssertPlaceHolder>" ; } } } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( expectedIdentifier , actualIdentifier )
shouldReturnHBaseKeySerialisationMultipleCQPropertiesEntity ( ) { final uk . gov . gchq . gaffer . data . element . Entity entity = new uk . gov . gchq . gaffer . data . element . Entity . Builder ( ) . group ( TestGroups . ENTITY ) . vertex ( "3" ) . property ( HBasePropertyNames . COLUMN_QUALIFIER , 100 ) . build ( ) ; final byte [ ] columnQualifier = serialisation . getColumnQualifier ( entity ) ; final uk . gov . gchq . gaffer . data . element . Properties properties = serialisation . getPropertiesFromColumnQualifier ( TestGroups . ENTITY , columnQualifier ) ; "<AssertPlaceHolder>" ; } get ( K ) { return multiMap . get ( key ) ; }
org . junit . Assert . assertEquals ( 100 , properties . get ( HBasePropertyNames . COLUMN_QUALIFIER ) )
testGetDevices ( ) { java . util . List < se . vidstige . jadb . test . integration . JadbDevice > actual = jadb . getDevices ( ) ; "<AssertPlaceHolder>" ; } getDevices ( ) { try ( se . vidstige . jadb . Transport transport = createTransport ( ) ) { transport . send ( "host:devices" ) ; transport . verifyResponse ( ) ; java . lang . String body = transport . readString ( ) ; return parseDevices ( body ) ; } }
org . junit . Assert . assertNotNull ( actual )
testCall_WithOneArgument ( ) { java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; java . lang . System . setOut ( new java . io . PrintStream ( out ) ) ; this . fun . call ( null , new com . googlecode . aviator . runtime . type . AviatorString ( "hello" ) ) ; out . flush ( ) ; out . close ( ) ; byte [ ] data = out . toByteArray ( ) ; "<AssertPlaceHolder>" ; } toByteArray ( ) { if ( ( index ) > 65535 ) { throw new java . lang . RuntimeException ( "Class<sp>file<sp>too<sp>large!" ) ; } int size = 24 + ( 2 * ( interfaceCount ) ) ; int nbFields = 0 ; com . googlecode . aviator . asm . FieldWriter fb = firstField ; while ( fb != null ) { ++ nbFields ; size += fb . getSize ( ) ; fb = ( ( com . googlecode . aviator . asm . FieldWriter ) ( fb . fv ) ) ; } int nbMethods = 0 ; com . googlecode . aviator . asm . MethodWriter mb = firstMethod ; while ( mb != null ) { ++ nbMethods ; size += mb . getSize ( ) ; mb = ( ( com . googlecode . aviator . asm . MethodWriter ) ( mb . mv ) ) ; } int attributeCount = 0 ; if ( ( bootstrapMethods ) != null ) { ++ attributeCount ; size += 8 + ( bootstrapMethods . length ) ; newUTF8 ( "BootstrapMethods" ) ; } if ( ( ClassReader . SIGNATURES ) && ( ( signature ) != 0 ) ) { ++ attributeCount ; size += 8 ; newUTF8 ( "SourceFile" 0 ) ; } if ( ( sourceFile ) != 0 ) { ++ attributeCount ; size += 8 ; newUTF8 ( "SourceFile" ) ; } if ( ( sourceDebug ) != null ) { ++ attributeCount ; size += ( sourceDebug . length ) + 4 ; newUTF8 ( "SourceDebugExtension" ) ; } if ( ( enclosingMethodOwner ) != 0 ) { ++ attributeCount ; size += 10 ; newUTF8 ( "EnclosingMethod" ) ; } if ( ( ( access ) & ( Opcodes . ACC_DEPRECATED ) ) != 0 ) { ++ attributeCount ; size += 6 ; newUTF8 ( "Deprecated" ) ; } if ( ( ( access ) & ( Opcodes . ACC_SYNTHETIC ) ) != 0 ) { if ( ( ( ( version ) & 65535 ) < ( Opcodes . V1_5 ) ) || ( ( ( access ) & ( com . googlecode . aviator . asm . ClassWriter . ACC_SYNTHETIC_ATTRIBUTE ) ) != 0 ) ) { ++ attributeCount ; size += 6 ; newUTF8 ( "Synthetic" ) ; } } if ( ( innerClasses ) != null ) { ++ attributeCount ; size += 8 + ( innerClasses . length ) ; newUTF8 ( "InnerClasses" ) ; } if ( ( ClassReader . ANNOTATIONS ) && ( ( anns ) != null ) ) { ++ attributeCount ; size += 8 + ( anns . getSize ( ) ) ; newUTF8 ( "RuntimeVisibleAnnotations" ) ; } if ( ( ClassReader . ANNOTATIONS ) && ( ( ianns ) != null ) ) { ++ attributeCount ; size += 8 + ( ianns . getSize ( ) ) ; newUTF8 ( "RuntimeInvisibleAnnotations" ) ; } if ( ( attrs ) != null ) { attributeCount += attrs . getCount ( ) ; size += attrs . getSize ( this , null , 0 , ( - 1 ) , ( - 1 ) ) ; } size += pool . length ; com . googlecode . aviator . asm . ByteVector out = new com . googlecode . aviator . asm . ByteVector ( size ) ; out . putInt ( - 889275714 ) . putInt ( version ) ; out . putShort ( index ) . putByteArray ( pool . data , 0 , pool . length ) ; int mask = ( ( Opcodes . ACC_DEPRECATED ) | ( com . googlecode . aviator . asm . ClassWriter . ACC_SYNTHETIC_ATTRIBUTE ) ) | ( ( ( access ) & ( com . googlecode . aviator . asm . ClassWriter . ACC_SYNTHETIC_ATTRIBUTE ) ) / ( com . googlecode . aviator . asm . ClassWriter . TO_ACC_SYNTHETIC ) ) ; out . putShort ( ( ( access ) & ( ~ mask ) ) ) . putShort ( name ) . putShort ( superName ) ; out . putShort ( interfaceCount ) ; for ( int i = 0 ; i < ( interfaceCount ) ; ++ i ) { out . putShort ( interfaces [ i ] ) ; } out . putShort ( nbFields ) ; fb = firstField ; while ( fb != null ) { fb . put ( out ) ; fb = ( ( com . googlecode . aviator . asm . FieldWriter ) ( fb . fv ) ) ; } out . putShort ( nbMethods ) ; mb = firstMethod ; while ( mb != null ) { mb . put ( out ) ; mb = ( ( com . googlecode . aviator . asm . MethodWriter ) ( mb . mv ) ) ; } out . putShort ( attributeCount ) ; if ( ( bootstrapMethods ) != null ) { out . putShort ( newUTF8 ( "BootstrapMethods" ) ) ; out . putInt ( ( ( bootstrapMethods . length ) + 2 ) ) . putShort ( bootstrapMethodsCount ) ; out . putByteArray ( bootstrapMethods . data , 0 , bootstrapMethods . length ) ; } if ( ( ClassReader . SIGNATURES ) && ( ( signature ) != 0 ) ) { out . putShort ( newUTF8 ( "SourceFile" 0 ) ) . putInt
org . junit . Assert . assertEquals ( "hello" , new java . lang . String ( data ) )
testEncodeEmpty1 ( ) { final java . nio . ByteBuffer result = codec . encode ( org . eclipse . kapua . client . gateway . Payload . of ( java . util . Collections . emptyMap ( ) ) , null ) ; "<AssertPlaceHolder>" ; } of ( java . util . Map ) { java . util . Objects . requireNonNull ( values ) ; return new org . eclipse . kapua . client . gateway . Payload ( java . time . Instant . now ( ) , values , true ) ; }
org . junit . Assert . assertNotNull ( result )
testFailDoubleBind ( ) { javax . naming . InitialContext ic = new org . evosuite . runtime . mock . javax . naming . MockInitialContext ( ) ; java . lang . String name = "global/service/AClass" ; java . lang . Object obj = ic . lookup ( name ) ; "<AssertPlaceHolder>" ; org . evosuite . runtime . mock . javax . naming . MockInitialContextTest . AnInterface k = new org . evosuite . runtime . mock . javax . naming . MockInitialContextTest . AClass ( ) ; ic . bind ( name , k ) ; try { ic . bind ( name , k ) ; org . junit . Assert . fail ( ) ; } catch ( javax . naming . NamingException e ) { } } lookup ( java . lang . String ) { if ( name == null ) { throw new org . evosuite . runtime . mock . javax . naming . NamingException ( "Null<sp>name" ) ; } org . evosuite . runtime . javaee . TestDataJavaEE . getInstance ( ) . accessLookUpContextName ( name ) ; org . evosuite . runtime . mock . javax . naming . Binding b = bindings . get ( name ) ; if ( b == null ) { return null ; } else { return b . getObject ( ) ; } }
org . junit . Assert . assertNull ( obj )
testGetLocation ( ) { java . lang . String response = org . apache . commons . io . IOUtils . toString ( org . codice . ddf . spatial . geocoder . geonames . GeoNamesWebServiceTest . class . getClassLoader ( ) . getResourceAsStream ( "getLocationTestResponse.json" ) ) ; prepareWebClient ( response ) ; org . codice . ddf . spatial . geocoding . GeoEntry result = webServiceSpy . query ( "Phoenix" , 0 ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertThat ( result . getName ( ) , org . hamcrest . Matchers . is ( "Phoenix" ) )
encryptProperty ( ) { com . ulisesbocchio . jasyptspringboot . encryptor . SimpleAsymmetricConfig config = new com . ulisesbocchio . jasyptspringboot . encryptor . SimpleAsymmetricConfig ( ) ; config . setKeyFormat ( demo . PEM ) ; config . setPrivateKey ( java . lang . System . getProperty ( "jasypt.encryptor.privateKeyString" ) ) ; config . setPublicKey ( ( "-----BEGIN<sp>PUBLIC<sp>KEY-----\n" + ( ( ( ( ( ( ( "nIUa0jkYsznCKeygcflnNa4mrVf7XKXLhSwtY+kCe3diPk+0QPfEsfF9/aK6pWBU\n" 1 + "VNB6jHsMip0b0qOrPvVTSJ/x0offjKARogA2tjGjyr3rUtwg9woMBqv/iyENR0GB\n" ) + "nIUa0jkYsznCKeygcflnNa4mrVf7XKXLhSwtY+kCe3diPk+0QPfEsfF9/aK6pWBU\n" ) + "FcrE8P2k2sF/8mo8dFJU1t6zQGPspHkNAgR6MLU8SjPZxnMS6EG722MdYhvSYAKs\n" ) + "nIUa0jkYsznCKeygcflnNa4mrVf7XKXLhSwtY+kCe3diPk+0QPfEsfF9/aK6pWBU\n" 0 ) + "IVKtai3lnUxAayEV45Z61rNTOusNJf+icGhZxjqhAeoWjMxOCVmVC2GKa9sisqBg\n" ) + "kQIDAQAB\n" ) + "-----END<sp>PUBLIC<sp>KEY-----\n" ) ) ) ; org . jasypt . encryption . StringEncryptor encryptor = new com . ulisesbocchio . jasyptspringboot . encryptor . SimpleAsymmetricStringEncryptor ( config ) ; java . lang . String message = "chupacabras" ; java . lang . String encrypted = encryptor . encrypt ( message ) ; System . out . printf ( "Encrypted<sp>message<sp>%s\n" , encrypted ) ; java . lang . String decrypted = encryptor . decrypt ( encrypted ) ; "<AssertPlaceHolder>" ; System . out . println ( ) ; }
org . junit . Assert . assertEquals ( message , decrypted )
string_ends_with_any_apache_commons ( ) { boolean endsWithAnchorOrQ = org . apache . commons . lang3 . StringUtils . endsWithAny ( "http://www.leveluplunch.com" , new java . lang . String [ ] { "#" , "?" } ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertFalse ( endsWithAnchorOrQ )
create_new_set_java ( ) { java . util . Set < java . lang . String > newSet = new java . util . HashSet < java . lang . String > ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( newSet )
list_tail ( ) { ws . prova . kernel2 . ProvaKnowledgeBase kb = new ws . prova . reference2 . ProvaKnowledgeBaseImpl ( ) ; ws . prova . kernel2 . ProvaResultSet resultSet = new ws . prova . reference2 . ProvaResultSetImpl ( ) ; ws . prova . parser2 . ProvaParserImpl parser = new ws . prova . parser2 . ProvaParserImpl ( "rules/reloaded/list_tail.prova" , new java . lang . Object [ ] { } ) ; try { java . util . List < ws . prova . kernel2 . ProvaRule > rules = parser . parse ( kb , resultSet , "rules/reloaded/list_tail.prova" ) ; int [ ] numSolutions = new int [ ] { 1 } ; int i = 0 ; for ( ws . prova . kernel2 . ProvaRule rule : rules ) { if ( ( rule . getHead ( ) ) == null ) { ws . prova . kernel2 . ProvaResolutionInferenceEngine engine = new ws . prova . reference2 . ProvaResolutionInferenceEngineImpl ( kb , rule ) ; engine . run ( ) ; "<AssertPlaceHolder>" ; resultSet . getSolutions ( ) . clear ( ) ; } } } catch ( ws . prova . parser2 . ProvaParsingException e ) { e . printStackTrace ( ) ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } } getSolutions ( ) { return solutions ; }
org . junit . Assert . assertEquals ( numSolutions [ ( i ++ ) ] , resultSet . getSolutions ( ) . size ( ) )
testGetAndereBetrokkenheidJuridischGeenOuder ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Relatie relatie = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Relatie ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortRelatie . FAMILIERECHTELIJKE_BETREKKING ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . Betrokkenheid ouder = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Betrokkenheid ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortBetrokkenheid . OUDER , relatie ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon ouderPersoon = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortPersoon . INGESCHREVENE ) ; voegAnummerToeAanPersoon ( ouderPersoon , "1234567890" ) ; ouderPersoon . addBetrokkenheid ( ouder ) ; relatie . addBetrokkenheid ( ouder ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . RelatieDecorator relatieDecorator = nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . RelatieDecorator . decorate ( relatie ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . BetrokkenheidDecorator andereBetrokkenheidDecorator = relatieDecorator . getAndereBetrokkenheid ( nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . BetrokkenheidDecorator . decorate ( ouder ) ) ; "<AssertPlaceHolder>" ; } decorate ( nl . bzk . algemeenbrp . dal . domein . brp . entity . Betrokkenheid ) { final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . BetrokkenheidDecorator result ; if ( betrokkenheid == null ) { result = null ; } else { result = new nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . BetrokkenheidDecorator ( nl . bzk . algemeenbrp . dal . domein . brp . entity . Entiteit . convertToPojo ( betrokkenheid ) ) ; } return result ; }
org . junit . Assert . assertNull ( andereBetrokkenheidDecorator )
testPositionSearchWithVarLengthArrayWithNullValueAtTheStart3 ( ) { java . lang . String [ ] strArr = new java . lang . String [ 5 ] ; strArr [ 0 ] = null ; strArr [ 1 ] = "ereref" ; strArr [ 2 ] = "random" ; strArr [ 3 ] = null ; strArr [ 4 ] = "ran" ; org . apache . phoenix . schema . types . PhoenixArray arr = org . apache . phoenix . schema . types . PArrayDataType . instantiatePhoenixArray ( PVarchar . INSTANCE , strArr ) ; byte [ ] bytes = PVarcharArray . INSTANCE . toBytes ( arr ) ; org . apache . hadoop . hbase . io . ImmutableBytesWritable ptr = new org . apache . hadoop . hbase . io . ImmutableBytesWritable ( bytes ) ; org . apache . phoenix . schema . types . PArrayDataTypeDecoder . positionAtArrayElement ( ptr , 4 , PVarchar . INSTANCE , PVarchar . INSTANCE . getByteSize ( ) ) ; int offset = ptr . getOffset ( ) ; int length = ptr . getLength ( ) ; byte [ ] bs = ptr . get ( ) ; byte [ ] res = new byte [ length ] ; java . lang . System . arraycopy ( bs , offset , res , 0 , length ) ; "<AssertPlaceHolder>" ; } toString ( org . apache . hadoop . hbase . Cell ) { return ( ( kv . toString ( ) ) + "/value=" ) + ( org . apache . hadoop . hbase . util . Bytes . toStringBinary ( kv . getValueArray ( ) , kv . getValueOffset ( ) , kv . getValueLength ( ) ) ) ; }
org . junit . Assert . assertEquals ( "ran" , org . apache . hadoop . hbase . util . Bytes . toString ( res ) )
setDecimalType ( ) { org . eclipse . smarthome . core . library . items . NumberItem item = new org . eclipse . smarthome . core . library . items . NumberItem ( org . eclipse . smarthome . core . library . items . NumberItemTest . ITEM_NAME ) ; org . eclipse . smarthome . core . types . State decimal = new org . eclipse . smarthome . core . library . types . DecimalType ( "23" ) ; item . setState ( decimal ) ; "<AssertPlaceHolder>" ; } getState ( ) { return state ; }
org . junit . Assert . assertEquals ( decimal , item . getState ( ) )
testParseSimpleWithDecimalsTrunc ( ) { java . lang . String source = ( "{1" + ( getDecimalCharacter ( ) ) ) + "2323}" ; org . apache . commons . math4 . geometry . euclidean . oned . Vector1D expected = new org . apache . commons . math4 . geometry . euclidean . oned . Cartesian1D ( 1.2323 ) ; org . apache . commons . math4 . geometry . euclidean . oned . Vector1D actual = vector1DFormat . parse ( source ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { java . text . ParsePosition parsePosition = new java . text . ParsePosition ( 0 ) ; org . apache . commons . math4 . geometry . euclidean . twod . Vector2D result = parse ( source , parsePosition ) ; if ( ( parsePosition . getIndex ( ) ) == 0 ) { throw new org . apache . commons . math4 . exception . MathParseException ( source , parsePosition . getErrorIndex ( ) , org . apache . commons . math4 . geometry . euclidean . twod . Vector2D . class ) ; } return result ; }
org . junit . Assert . assertEquals ( expected , actual )
testMath76 ( ) { fr . inria . main . evolution . AstorMain main1 = new fr . inria . main . evolution . AstorMain ( ) ; java . lang . String dep = new java . io . File ( "-maxtime" 0 ) . getAbsolutePath ( ) ; java . io . File out = new java . io . File ( fr . inria . astor . core . setup . ConfigurationProperties . getProperty ( "workingDirectory" ) ) ; java . lang . String [ ] args = new java . lang . String [ ] { "/target/classes" 6 , dep , "/target/classes" 8 , "org.apache.commons.math.linear.SingularValueSolverTest" 4 , "/target/classes" 1 , "org.apache.commons.math.linear.SingularValueSolverTest" , "/target/classes" 5 , new java . io . File ( "/target/classes" 0 ) . getAbsolutePath ( ) , "-package" , "/target/classes" 9 , "org.apache.commons.math.linear.SingularValueSolverTest" 9 , "-maxtime" 1 , "/target/classes" 4 , "org.apache.commons.math.linear.SingularValueSolverTest" 5 , "-binjavafolder" , "/target/classes" , "org.apache.commons.math.linear.SingularValueSolverTest" 7 , "-maxtime" 3 , "/target/classes" 7 , "5" , "org.apache.commons.math.linear.SingularValueSolverTest" 0 , "org.apache.commons.math.linear.SingularValueSolverTest" 3 , "-out" , out . getAbsolutePath ( ) , "/target/classes" 2 , "org.apache.commons.math.linear.SingularValueSolverTest" 1 , "-maxtime" 2 , "org.apache.commons.math.linear.SingularValueSolverTest" 6 , "/target/classes" 3 , "org.apache.commons.math.linear.SingularValueSolverTest" 8 , "-stopfirst" , "org.apache.commons.math.linear.SingularValueSolverTest" 2 , "-maxtime" , "2" } ; System . out . println ( java . util . Arrays . toString ( args ) ) ; main1 . execute ( args ) ; java . util . List < fr . inria . astor . core . entities . ProgramVariant > solutions = main1 . getEngine ( ) . getSolutions ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { for ( java . lang . CharSequence part : parts ) { if ( ( part . length ( ) ) > 0 ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( solutions . isEmpty ( ) )
testCreateCategory ( ) { try { java . lang . Integer categoryId = runFlowAndGetPayload ( "create-category" ) ; "<AssertPlaceHolder>" ; upsertOnTestRunMessage ( "categoryId" , categoryId ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( org . mule . modules . tests . ConnectorTestUtils . getStackTrace ( e ) ) ; } }
org . junit . Assert . assertTrue ( ( categoryId != null ) )
testArg2 ( ) { java . lang . String templates = "foo(a,,)<sp>::=<sp><<<sp>>>\n" ; writeFile ( tmpdir , "t.stg" , templates ) ; org . stringtemplate . v4 . STGroupFile group ; org . stringtemplate . v4 . misc . ErrorBuffer errors = new org . stringtemplate . v4 . misc . ErrorBuffer ( ) ; group = new org . stringtemplate . v4 . STGroupFile ( ( ( ( tmpdir ) + "/" ) + "t.stg" ) ) ; group . setListener ( errors ) ; group . load ( ) ; java . lang . String expected = "[t.stg<sp>1:6:<sp>missing<sp>ID<sp>at<sp>',',<sp>" + ( "t.stg<sp>1:7:<sp>missing<sp>ID<sp>at<sp>')',<sp>" + "t.stg<sp>1:7:<sp>redefinition<sp>of<sp>parameter<sp><missing<sp>ID>]" ) ; java . lang . String result = errors . errors . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( getClass ( ) . getSimpleName ( ) ) + "{" ) + "self=" ) + ( scope . st ) ) + ",<sp>start=" ) + ( outputStartChar ) ) + ",<sp>stop=" ) + ( outputStopChar ) ) + '}' ; }
org . junit . Assert . assertEquals ( expected , result )
testConflictScopeOrdering ( ) { for ( org . eclipse . aether . util . graph . transformer . JavaScopeSelectorTest . Scope scope1 : org . eclipse . aether . util . graph . transformer . JavaScopeSelectorTest . Scope . values ( ) ) { for ( org . eclipse . aether . util . graph . transformer . JavaScopeSelectorTest . Scope scope2 : org . eclipse . aether . util . graph . transformer . JavaScopeSelectorTest . Scope . values ( ) ) { org . eclipse . aether . graph . DependencyNode root = parseResource ( "dueling-scopes.txt" , scope1 . toString ( ) , scope2 . toString ( ) ) ; java . lang . String expected = ( ( scope1 . compareTo ( scope2 ) ) >= 0 ) ? scope1 . toString ( ) : scope2 . toString ( ) ; java . lang . String msg = java . lang . String . format ( ( "expected<sp>\'%s\'<sp>to<sp>win\n" + ( parser . dump ( root ) ) ) , expected ) ; "<AssertPlaceHolder>" ; msg += "\ntransformed:\n" + ( parser . dump ( root ) ) ; expectScope ( msg , expected , root , 0 , 0 ) ; } } } dump ( org . eclipse . aether . graph . DependencyNode ) { java . lang . StringBuilder ret = new java . lang . StringBuilder ( ) ; java . util . List < org . eclipse . aether . internal . test . util . DependencyGraphParser . NodeEntry > entries = new java . util . ArrayList < org . eclipse . aether . internal . test . util . DependencyGraphParser . NodeEntry > ( ) ; addNode ( root , 0 , entries ) ; for ( org . eclipse . aether . internal . test . util . DependencyGraphParser . NodeEntry nodeEntry : entries ) { char [ ] level = new char [ ( nodeEntry . getLevel ( ) ) * 3 ] ; java . util . Arrays . fill ( level , '<sp>' ) ; if ( ( level . length ) != 0 ) { level [ ( ( level . length ) - 3 ) ] = '+' ; level [ ( ( level . length ) - 2 ) ] = '-' ; } java . lang . String definition = nodeEntry . getDefinition ( ) ; ret . append ( level ) . append ( definition ) . append ( "\n" ) ; } return ret . toString ( ) ; }
org . junit . Assert . assertSame ( root , transform ( root ) )
testMethodWithClassTypeParameterizedReturn ( ) { io . vertx . rxjava . codegen . testmodel . GenericRefedInterface < io . vertx . rxjava . codegen . testmodel . RefedInterface1 > refed = obj . methodWithClassTypeParameterizedReturn ( io . vertx . rxjava . codegen . testmodel . RefedInterface1 . class ) ; io . vertx . rxjava . codegen . testmodel . RefedInterface1 a = refed . getValue ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "foo" , a . getString ( ) )
shouldUseEncryptedPortIfSSL ( ) { com . couchbase . client . core . env . CoreEnvironment environment = mock ( com . couchbase . client . core . env . CoreEnvironment . class ) ; when ( environment . sslEnabled ( ) ) . thenReturn ( true ) ; when ( environment . bootstrapCarrierSslPort ( ) ) . thenReturn ( 12345 ) ; com . couchbase . client . core . ClusterFacade cluster = mock ( com . couchbase . client . core . ClusterFacade . class ) ; com . couchbase . client . core . config . loader . CarrierLoader loader = new com . couchbase . client . core . config . loader . CarrierLoader ( cluster , environment ) ; "<AssertPlaceHolder>" ; } bootstrapCarrierSslPort ( ) { return bootstrapCarrierSslPort ; }
org . junit . Assert . assertEquals ( environment . bootstrapCarrierSslPort ( ) , loader . port ( ) )
testSetDestSelectedDatabaseObject ( ) { net . sourceforge . squirrel_sql . plugins . dbcopy . DBCopyPlugin plugin = ( ( net . sourceforge . squirrel_sql . plugins . dbcopy . DBCopyPlugin ) ( super . classUnderTest ) ) ; plugin . setDestDatabaseObject ( mockDatabaseObjectInfo ) ; "<AssertPlaceHolder>" ; } getDestDatabaseObject ( ) { return destSelectedDatabaseObject ; }
org . junit . Assert . assertEquals ( mockDatabaseObjectInfo , plugin . getDestDatabaseObject ( ) )
testInstanceForMD5 ( ) { org . irods . jargon . core . checksum . LocalChecksumComputerFactory factory = new org . irods . jargon . core . checksum . LocalChecksumComputerFactoryImpl ( ) ; org . irods . jargon . core . checksum . MD5LocalChecksumComputerStrategy actual = ( ( org . irods . jargon . core . checksum . MD5LocalChecksumComputerStrategy ) ( factory . instance ( ChecksumEncodingEnum . MD5 ) ) ) ; "<AssertPlaceHolder>" ; } instance ( java . util . Map ) { org . irods . jargon . core . query . ExtensibleMetaDataMapping . log . debug ( "cacheing<sp>and<sp>returning<sp>fresh<sp>extensibleMetaDataMapping" ) ; java . util . Map < java . lang . String , java . lang . String > copiedExtensibleMappings = new java . util . HashMap < java . lang . String , java . lang . String > ( extensibleMappings ) ; return new org . irods . jargon . core . query . ExtensibleMetaDataMapping ( java . util . Collections . unmodifiableMap ( copiedExtensibleMappings ) ) ; }
org . junit . Assert . assertNotNull ( actual )
testGetFirstExplicitDataPacketTimeout ( ) { com . digi . xbee . api . models . XBeePacketsQueue xbeePacketsQueue = org . powermock . api . mockito . PowerMockito . spy ( new com . digi . xbee . api . models . XBeePacketsQueue ( 5 ) ) ; for ( int i = 0 ; i < 3 ; i ++ ) xbeePacketsQueue . addPacket ( org . mockito . Mockito . mock ( com . digi . xbee . api . packet . XBeePacket . class ) ) ; xbeePacketsQueue . addPacket ( com . digi . xbee . api . models . XBeePacketsQueueTest . mockedReceivePacket ) ; xbeePacketsQueue . addPacket ( com . digi . xbee . api . models . XBeePacketsQueueTest . mockedRx64Packet ) ; currentMillis = java . lang . System . currentTimeMillis ( ) ; org . powermock . api . mockito . PowerMockito . mockStatic ( com . digi . xbee . api . models . System . class ) ; org . powermock . api . mockito . PowerMockito . when ( java . lang . System . currentTimeMillis ( ) ) . thenReturn ( currentMillis ) ; org . powermock . api . mockito . PowerMockito . doAnswer ( new org . mockito . stubbing . Answer < java . lang . Object > ( ) { public java . lang . Object answer ( org . mockito . invocation . InvocationOnMock invocation ) throws com . digi . xbee . api . models . Exception { java . lang . Object [ ] args = invocation . getArguments ( ) ; int sleepTime = ( ( java . lang . Integer ) ( args [ 0 ] ) ) ; changeMillisToReturn ( sleepTime ) ; return null ; } } ) . when ( xbeePacketsQueue , com . digi . xbee . api . models . XBeePacketsQueueTest . METHOD_SLEEP , org . mockito . Mockito . anyInt ( ) ) ; com . digi . xbee . api . packet . XBeePacket xbeePacket = xbeePacketsQueue . getFirstExplicitDataPacket ( 5000 ) ; org . powermock . api . mockito . PowerMockito . verifyPrivate ( xbeePacketsQueue , org . mockito . Mockito . times ( 50 ) ) . invoke ( com . digi . xbee . api . models . XBeePacketsQueueTest . METHOD_SLEEP , 100 ) ; "<AssertPlaceHolder>" ; } getFirstExplicitDataPacket ( int ) { if ( timeout > 0 ) { com . digi . xbee . api . packet . XBeePacket xbeePacket = getFirstExplicitDataPacket ( 0 ) ; java . lang . Long deadLine = ( java . lang . System . currentTimeMillis ( ) ) + timeout ; while ( ( xbeePacket == null ) && ( deadLine > ( java . lang . System . currentTimeMillis ( ) ) ) ) { sleep ( 100 ) ; xbeePacket = getFirstExplicitDataPacket ( 0 ) ; } return xbeePacket ; } else { synchronized ( lock ) { for ( int i = 0 ; i < ( packetsList . size ( ) ) ; i ++ ) { com . digi . xbee . api . packet . XBeePacket xbeePacket = packetsList . get ( i ) ; if ( isExplicitDataPacket ( xbeePacket ) ) return packetsList . remove ( i ) ; } } } return null ; }
org . junit . Assert . assertNull ( xbeePacket )
testEncryptDecryptString ( ) { final java . lang . String plainPassword = "protect" ; final ddf . security . encryption . crypter . Crypter crypter = new ddf . security . encryption . crypter . Crypter ( ) ; final java . lang . String encryptedPassword = crypter . encrypt ( plainPassword ) ; final java . lang . String decryptedPassword = crypter . decrypt ( encryptedPassword ) ; "<AssertPlaceHolder>" ; } decrypt ( byte [ ] ) { if ( ( encryptedBytes == null ) || ( ( encryptedBytes . length ) < 1 ) ) { throw new ddf . security . encryption . crypter . Crypter . CrypterException ( "Bytes<sp>to<sp>decrypt<sp>cannot<sp>be<sp>null<sp>or<sp>empty." ) ; } if ( ( associatedData ) == null ) { throw new ddf . security . encryption . crypter . Crypter . CrypterException ( "Associated<sp>data<sp>cannot<sp>be<sp>null." ) ; } try { return aead . decrypt ( encryptedBytes , associatedData ) ; } catch ( java . security . GeneralSecurityException | java . lang . NullPointerException e ) { throw new ddf . security . encryption . crypter . Crypter . CrypterException ( "Problem<sp>decrypting." , e ) ; } }
org . junit . Assert . assertEquals ( plainPassword , decryptedPassword )
testReadBoolean ( ) { java . util . Properties properties = new java . util . Properties ( ) ; properties . setProperty ( "source.source_1.zookeeper" , "true" ) ; java . util . Properties globalProperties = new java . util . Properties ( ) ; final boolean connStr = com . olacabs . fabric . compute . util . ComponentPropertyReader . readBoolean ( properties , globalProperties , "zookeeper" , "source_1" , com . olacabs . fabric . model . common . ComponentMetadata . builder ( ) . namespace ( "global" ) . name ( "source" ) . id ( "1234" ) . type ( ComponentType . SOURCE ) . build ( ) ) ; "<AssertPlaceHolder>" ; } builder ( ) { return new com . olacabs . fabric . compute . pipeline . ComputationPipeline ( ) ; }
org . junit . Assert . assertEquals ( true , connStr )
testDavHandler ( ) { new eu . impact_project . resultsrepository . DavHandler ( folders ) ; new java . net . URL ( "http://localhost:9002/parent" ) . getContent ( ) ; new java . net . URL ( "http://localhost:9002/parent/child" ) . getContent ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testNegativeCacheClearedOnRefresh ( ) { conf . setLong ( CommonConfigurationKeys . HADOOP_SECURITY_GROUPS_NEGATIVE_CACHE_SECS , 100 ) ; final org . apache . hadoop . security . Groups groups = new org . apache . hadoop . security . Groups ( conf ) ; groups . cacheGroupsAdd ( java . util . Arrays . asList ( org . apache . hadoop . security . TestGroupsCaching . myGroups ) ) ; groups . refresh ( ) ; org . apache . hadoop . security . TestGroupsCaching . FakeGroupMapping . clearBlackList ( ) ; org . apache . hadoop . security . TestGroupsCaching . FakeGroupMapping . addToBlackList ( "dne" ) ; try { groups . getGroups ( "dne" ) ; org . junit . Assert . fail ( "Should<sp>have<sp>failed<sp>to<sp>find<sp>this<sp>group" ) ; } catch ( java . io . IOException e ) { } int startingRequestCount = org . apache . hadoop . security . TestGroupsCaching . FakeGroupMapping . getRequestCount ( ) ; groups . refresh ( ) ; org . apache . hadoop . security . TestGroupsCaching . FakeGroupMapping . addToBlackList ( "dne" ) ; try { java . util . List < java . lang . String > g = groups . getGroups ( "dne" ) ; org . junit . Assert . fail ( "Should<sp>have<sp>failed<sp>to<sp>find<sp>this<sp>group" ) ; } catch ( java . io . IOException e ) { } "<AssertPlaceHolder>" ; } fail ( java . lang . String ) { System . err . println ( message ) ; System . err . println ( "Try<sp>-help<sp>for<sp>more<sp>information" ) ; throw new java . lang . IllegalArgumentException ( message ) ; }
org . junit . Assert . assertEquals ( ( startingRequestCount + 1 ) , org . apache . hadoop . security . TestGroupsCaching . FakeGroupMapping . getRequestCount ( ) )
determineSegmentCount_regularConcurrency ( ) { int _segs = org . cache2k . core . InternalCache2kBuilder . determineSegmentCount ( false , 12 , false , 1000000 , 0 ) ; "<AssertPlaceHolder>" ; } determineSegmentCount ( boolean , int , boolean , long , int ) { int _segmentCount = 1 ; if ( _availableProcessors > 1 ) { _segmentCount = 2 ; if ( _boostConcurrency ) { _segmentCount = 2 << ( 31 - ( java . lang . Integer . numberOfLeadingZeros ( _availableProcessors ) ) ) ; } } if ( _segmentCountOverride > 0 ) { _segmentCount = 1 << ( 32 - ( java . lang . Integer . numberOfLeadingZeros ( ( _segmentCountOverride - 1 ) ) ) ) ; } else { int _maxSegments = _availableProcessors * 2 ; _segmentCount = java . lang . Math . min ( _segmentCount , _maxSegments ) ; } if ( ( _entryCapacity >= 0 ) && ( _entryCapacity < 1000 ) ) { _segmentCount = 1 ; } if ( _strictEviction ) { _segmentCount = 1 ; } return _segmentCount ; }
org . junit . Assert . assertEquals ( 2 , _segs )
testGettingOfSchemasByName ( ) { final de . hpi . isg . mdms . model . MetadataStore store1 = de . hpi . isg . mdms . domain . RDBMSMetadataStore . createNewInstance ( new de . hpi . isg . mdms . rdbms . SQLiteInterface ( connection ) ) ; final de . hpi . isg . mdms . model . targets . Schema schema1 = store1 . addSchema ( "pdb" , null , new de . hpi . isg . mdms . model . location . DefaultLocation ( ) ) ; final de . hpi . isg . mdms . model . targets . Schema schema2 = store1 . addSchema ( "pdb" , null , new de . hpi . isg . mdms . model . location . DefaultLocation ( ) ) ; de . hpi . isg . mdms . rdbms . HashSet < de . hpi . isg . mdms . model . targets . Schema > schemas = new de . hpi . isg . mdms . rdbms . HashSet ( ) ; schemas . add ( schema1 ) ; schemas . add ( schema2 ) ; "<AssertPlaceHolder>" ; } getSchemasByName ( java . lang . String ) { return null ; }
org . junit . Assert . assertEquals ( schemas , new de . hpi . isg . mdms . rdbms . HashSet ( store1 . getSchemasByName ( "pdb" ) ) )
hasSubscriptionOwnerRole_SUBSCRIPTION_MANAGER ( ) { org . oscm . domobjects . PlatformUser user = createUserWithRole ( UserRoleType . SUBSCRIPTION_MANAGER ) ; "<AssertPlaceHolder>" ; } hasSubscriptionOwnerRole ( ) { for ( org . oscm . domobjects . RoleAssignment roleAssignment : assignedRoles ) { if ( ( ( ( roleAssignment . getRole ( ) . getRoleName ( ) ) == ( org . oscm . internal . types . enumtypes . UserRoleType . ORGANIZATION_ADMIN ) ) || ( ( roleAssignment . getRole ( ) . getRoleName ( ) ) == ( org . oscm . internal . types . enumtypes . UserRoleType . SUBSCRIPTION_MANAGER ) ) ) || ( ( roleAssignment . getRole ( ) . getRoleName ( ) ) == ( org . oscm . internal . types . enumtypes . UserRoleType . UNIT_ADMINISTRATOR ) ) ) return true ; } return false ; }
org . junit . Assert . assertTrue ( user . hasSubscriptionOwnerRole ( ) )
restServiceIsDeployed ( ) { final java . lang . String read = org . apache . commons . io . IOUtils . toString ( new java . net . URL ( ( ( url . toExternalForm ( ) ) + "api/rest/foo" ) ) . openStream ( ) ) ; "<AssertPlaceHolder>" ; } toString ( java . lang . ClassLoader ) { if ( classLoader == null ) { return "null" ; } else { return ( ( classLoader . getClass ( ) . getSimpleName ( ) ) + "@" ) + ( java . lang . System . identityHashCode ( classLoader ) ) ; } }
org . junit . Assert . assertEquals ( "foo" , read )
testForVarCharArrayForWithTwoelementsElementArrayWithIndex ( ) { java . lang . String [ ] strArr = new java . lang . String [ 2 ] ; strArr [ 0 ] = "abx" ; strArr [ 1 ] = "ereref" ; org . apache . phoenix . schema . types . PhoenixArray arr = org . apache . phoenix . schema . types . PArrayDataType . instantiatePhoenixArray ( PVarchar . INSTANCE , strArr ) ; byte [ ] bytes = PVarcharArray . INSTANCE . toBytes ( arr ) ; org . apache . hadoop . hbase . io . ImmutableBytesWritable ptr = new org . apache . hadoop . hbase . io . ImmutableBytesWritable ( bytes ) ; org . apache . phoenix . schema . types . PArrayDataTypeDecoder . positionAtArrayElement ( ptr , 1 , PVarchar . INSTANCE , PVarchar . INSTANCE . getByteSize ( ) ) ; int offset = ptr . getOffset ( ) ; int length = ptr . getLength ( ) ; byte [ ] bs = ptr . get ( ) ; byte [ ] res = new byte [ length ] ; java . lang . System . arraycopy ( bs , offset , res , 0 , length ) ; "<AssertPlaceHolder>" ; } toString ( org . apache . hadoop . hbase . Cell ) { return ( ( kv . toString ( ) ) + "/value=" ) + ( org . apache . hadoop . hbase . util . Bytes . toStringBinary ( kv . getValueArray ( ) , kv . getValueOffset ( ) , kv . getValueLength ( ) ) ) ; }
org . junit . Assert . assertEquals ( "ereref" , org . apache . hadoop . hbase . util . Bytes . toString ( res ) )
testShowColumn_withFixedColumns_scrolledToLeft ( ) { org . eclipse . swt . widgets . Tree tree = createFixedColumnsTree ( ) ; int numColumns = 4 ; int columnWidth = 100 ; tree . setSize ( ( columnWidth * ( numColumns - 1 ) ) , 100 ) ; org . eclipse . swt . widgets . Tree_Test . createColumns ( tree , numColumns , columnWidth ) ; org . eclipse . swt . internal . widgets . ITreeAdapter adapter = org . eclipse . swt . widgets . Tree_Test . getTreeAdapter ( tree ) ; adapter . setScrollLeft ( 100 ) ; tree . showColumn ( tree . getColumn ( 2 ) ) ; "<AssertPlaceHolder>" ; } getScrollLeft ( ) { return scrollLeft ; }
org . junit . Assert . assertEquals ( 0 , adapter . getScrollLeft ( ) )
testMaskNoConflict ( ) { com . cloudera . flume . handlers . debug . MemorySinkSource mem = new com . cloudera . flume . handlers . debug . MemorySinkSource ( ) ; com . cloudera . flume . core . EventSink s1 = new com . cloudera . flume . handlers . endtoend . ValueDecorator < com . cloudera . flume . core . EventSink > ( mem , "duped" , "second" ) ; com . cloudera . flume . core . EventSink s2 = new com . cloudera . flume . core . MaskDecorator < com . cloudera . flume . core . EventSink > ( s1 , "duped" ) ; com . cloudera . flume . core . EventSink snk = new com . cloudera . flume . handlers . endtoend . ValueDecorator < com . cloudera . flume . core . EventSink > ( s2 , "duped" , "first" ) ; snk . open ( ) ; com . cloudera . flume . core . Event e = new com . cloudera . flume . core . EventImpl ( "foo" . getBytes ( ) ) ; snk . append ( e ) ; snk . close ( ) ; com . cloudera . flume . core . Event e2 = mem . next ( ) ; "<AssertPlaceHolder>" ; } readString ( com . cloudera . flume . core . Event , java . lang . String ) { com . cloudera . flume . core . Attributes . Type t = com . cloudera . flume . core . Attributes . map . get ( attr ) ; com . google . common . base . Preconditions . checkArgument ( ( ( t == ( com . cloudera . flume . core . Attributes . Type . STRING ) ) || ( t == null ) ) ) ; byte [ ] bytes = e . get ( attr ) ; if ( bytes == null ) return null ; return new java . lang . String ( bytes ) ; }
org . junit . Assert . assertEquals ( "second" , com . cloudera . flume . core . Attributes . readString ( e2 , "duped" ) )
testRunSqlite1 ( ) { sqlite . kripton209 . model1 . BindApp1DataSource ds = sqlite . kripton209 . model1 . BindApp1DataSource . getInstance ( ) ; ds . execute ( new sqlite . kripton209 . model1 . BindApp1DataSource . Transaction ( ) { @ sqlite . kripton209 . Override public com . abubusoft . kripton . android . sqlite . TransactionResult onExecute ( sqlite . kripton209 . model1 . BindApp1DaoFactory daoFactory ) { sqlite . kripton209 . model1 . Device device = new sqlite . kripton209 . model1 . Device ( ) ; device . name = "device-test" ; daoFactory . getDeviceDao ( ) . insert ( device ) ; sqlite . kripton209 . model1 . User user = new sqlite . kripton209 . model1 . User ( ) ; user . userName = "user-test" ; daoFactory . getUserDao ( ) . insert ( user ) ; sqlite . kripton209 . model1 . UserDevice userDevice = new sqlite . kripton209 . model1 . UserDevice ( 0 , user . id , device . id ) ; daoFactory . getUserDeviceDao ( ) . insert ( userDevice ) ; java . util . List < sqlite . kripton209 . model1 . Device > devices = daoFactory . getDeviceDao ( ) . getUserDevices ( user . id ) ; "<AssertPlaceHolder>" ; return com . abubusoft . kripton . android . sqlite . TransactionResult . ROLLBACK ; } } ) ; } size ( ) { return names . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( devices . size ( ) ) == 1 ) )
generateId_should_not_overwrite_existing_id ( ) { org . springframework . data . simpledb . core . domain . SimpleDbSampleEntity object = new org . springframework . data . simpledb . core . domain . SimpleDbSampleEntity ( ) ; object . setItemName ( "gigi" ) ; org . springframework . data . simpledb . core . entity . EntityWrapper < org . springframework . data . simpledb . core . domain . SimpleDbSampleEntity , java . lang . String > sdbEntity = new org . springframework . data . simpledb . core . entity . EntityWrapper < org . springframework . data . simpledb . core . domain . SimpleDbSampleEntity , java . lang . String > ( org . springframework . data . simpledb . core . domain . SimpleDbSampleEntity . entityInformation ( ) , object ) ; sdbEntity . generateIdIfNotSet ( ) ; "<AssertPlaceHolder>" ; } getItemName ( ) { return itemName ; }
org . junit . Assert . assertEquals ( "gigi" , object . getItemName ( ) )
testFromJson ( ) { com . fasterxml . jackson . databind . JsonNode jsonNode = com . fasterxml . jackson . databind . node . JsonNodeFactory . withExactBigDecimals ( false ) . textNode ( new java . text . SimpleDateFormat ( com . redhat . lightblue . util . Constants . DATE_FORMAT_STR ) . format ( new java . util . Date ( ) ) ) ; java . lang . Object fromJson = dateType . fromJson ( jsonNode ) ; "<AssertPlaceHolder>" ; } fromJson ( com . fasterxml . jackson . databind . JsonNode ) { if ( node instanceof com . fasterxml . jackson . databind . node . ObjectNode ) { com . fasterxml . jackson . databind . node . ObjectNode onode = ( ( com . fasterxml . jackson . databind . node . ObjectNode ) ( node ) ) ; java . lang . String firstField = onode . fieldNames ( ) . next ( ) ; if ( ( com . redhat . lightblue . query . UnaryLogicalOperator . fromString ( firstField ) ) != null ) { return com . redhat . lightblue . query . UnaryLogicalExpression . fromJson ( onode ) ; } else if ( ( com . redhat . lightblue . query . NaryLogicalOperator . fromString ( firstField ) ) != null ) { return com . redhat . lightblue . query . NaryLogicalExpression . fromJson ( onode ) ; } else { return com . redhat . lightblue . query . ComparisonExpression . fromJson ( onode ) ; } } else { throw com . redhat . lightblue . util . Error . get ( QueryConstants . ERR_INVALID_QUERY , node . toString ( ) ) ; } }
org . junit . Assert . assertTrue ( ( fromJson instanceof java . util . Date ) )
main ( ) { System . out . println ( "Wasssssup" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testIterator ( ) { org . pb . x12 . Loop loop = new org . pb . x12 . Loop ( new org . pb . x12 . Context ( '~' , '*' , ':' ) , "ST" ) ; "<AssertPlaceHolder>" ; } iterator ( ) { return segments . iterator ( ) ; }
org . junit . Assert . assertNotNull ( loop . iterator ( ) )
tripleHash_4Test ( ) { long hash = greycat . utility . HashHelper . tripleHash ( ( ( byte ) ( 2 ) ) , 1 , ( - 1 ) , 3 , CoreConstants . END_OF_TIME ) ; "<AssertPlaceHolder>" ; } tripleHash ( byte , long , long , long , long ) { if ( max <= 0 ) { throw new java . lang . IllegalArgumentException ( "Max<sp>must<sp>be<sp>><sp>0" ) ; } long v1 = greycat . utility . HashHelper . PRIME5 ; long v2 = ( v1 * ( greycat . utility . HashHelper . PRIME2 ) ) + ( greycat . utility . HashHelper . len ) ; long v3 = v2 * ( greycat . utility . HashHelper . PRIME3 ) ; long v4 = v3 * ( greycat . utility . HashHelper . PRIME4 ) ; long crc ; v1 = ( ( v1 << 13 ) | ( v1 > > > 51 ) ) + p1 ; v2 = ( ( v2 << 11 ) | ( v2 > > > 53 ) ) + p2 ; v3 = ( ( v3 << 17 ) | ( v3 > > > 47 ) ) + p3 ; v4 = ( ( v4 << 19 ) | ( v4 > > > 45 ) ) + p0 ; v1 += ( v1 << 17 ) | ( v1 > > > 47 ) ; v2 += ( v2 << 19 ) | ( v2 > > > 45 ) ; v3 += ( v3 << 13 ) | ( v3 > > > 51 ) ; v4 += ( v4 << 11 ) | ( v4 > > > 53 ) ; v1 *= greycat . utility . HashHelper . PRIME1 ; v2 *= greycat . utility . HashHelper . PRIME1 ; v3 *= greycat . utility . HashHelper . PRIME1 ; v4 *= greycat . utility . HashHelper . PRIME1 ; v1 += p1 ; v2 += p2 ; v3 += p3 ; v4 += greycat . utility . HashHelper . PRIME5 ; v1 *= greycat . utility . HashHelper . PRIME2 ; v2 *= greycat . utility . HashHelper . PRIME2 ; v3 *= greycat . utility . HashHelper . PRIME2 ; v4 *= greycat . utility . HashHelper . PRIME2 ; v1 += ( v1 << 11 ) | ( v1 > > > 53 ) ; v2 += ( v2 << 17 ) | ( v2 > > > 47 ) ; v3 += ( v3 << 19 ) | ( v3 > > > 45 ) ; v4 += ( v4 << 13 ) | ( v4 > > > 51 ) ; v1 *= greycat . utility . HashHelper . PRIME3 ; v2 *= greycat . utility . HashHelper . PRIME3 ; v3 *= greycat . utility . HashHelper . PRIME3 ; v4 *= greycat . utility . HashHelper . PRIME3 ; crc = ( ( v1 + ( ( v2 << 3 ) | ( v2 > > > 61 ) ) ) + ( ( v3 << 6 ) | ( v3 > > > 58 ) ) ) + ( ( v4 << 9 ) | ( v4 > > > 55 ) ) ; crc ^= crc > > > 11 ; crc += ( ( greycat . utility . HashHelper . PRIME4 ) + ( greycat . utility . HashHelper . len ) ) * ( greycat . utility . HashHelper . PRIME1 ) ; crc ^= crc > > > 15 ; crc *= greycat . utility . HashHelper . PRIME2 ; crc ^= crc > > > 13 ; crc = ( crc < 0 ) ? crc * ( - 1 ) : crc ; crc = crc % max ; return crc ; }
org . junit . Assert . assertTrue ( ( hash < ( greycat . internal . CoreConstants . END_OF_TIME ) ) )