input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testBuildWithParametersWithOrderBy ( ) { java . lang . String name = "name" ; org . lnu . is . domain . asset . status . AssetStatus context = new org . lnu . is . domain . asset . status . AssetStatus ( ) ; context . setName ( name ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . ASC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>AssetStatus<sp>e<sp>WHERE<sp>(<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>)<sp>AND<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>ORDER<sp>BY<sp>e.name<sp>ASC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . asset . status . AssetStatus > 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 )
simpleInterceptorTestParentOk ( ) { org . apache . deltaspike . test . security . impl . authorization . secured . SecuredBean1 testBean = org . apache . deltaspike . core . api . provider . BeanProvider . getContextualReference ( org . apache . deltaspike . test . security . impl . authorization . secured . SecuredBean1 . class , false ) ; "<AssertPlaceHolder>" ; } someFineMethodFromParent ( ) { return "allfine" ; }
org . junit . Assert . assertEquals ( "allfine" , testBean . someFineMethodFromParent ( ) )
testRetrievingOfSchemaByName ( ) { final de . hpi . isg . mdms . model . MetadataStore store1 = new de . hpi . isg . mdms . model . DefaultMetadataStore ( ) ; final de . hpi . isg . mdms . model . targets . Schema dummySchema1 = de . hpi . isg . mdms . model . targets . DefaultSchema . buildAndRegister ( store1 , "PDB" , null , mock ( de . hpi . isg . mdms . model . location . Location . class ) ) ; store1 . getSchemas ( ) . add ( dummySchema1 ) ; "<AssertPlaceHolder>" ; } getSchemaByName ( java . lang . String ) { return null ; }
org . junit . Assert . assertEquals ( store1 . getSchemaByName ( "PDB" ) , dummySchema1 )
toolsTest ( ) { java . lang . String version = ipfs . version ( ) ; int major = java . lang . Integer . parseInt ( version . split ( "\\." ) [ 0 ] ) ; int minor = java . lang . Integer . parseInt ( version . split ( "\\." ) [ 1 ] ) ; "<AssertPlaceHolder>" ; io . ipfs . api . Map commands = ipfs . commands ( ) ; } version ( ) { io . ipfs . api . Map m = ( ( io . ipfs . api . Map ) ( retrieveAndParse ( "version" ) ) ) ; return ( ( java . lang . String ) ( m . get ( "Version" ) ) ) ; }
org . junit . Assert . assertTrue ( ( ( major >= 0 ) && ( minor >= 4 ) ) )
testShowViewShortcuts ( ) { java . lang . String [ ] showViewShortcutIds = org . eclipse . ui . PlatformUI . getWorkbench ( ) . getActiveWorkbenchWindow ( ) . getActivePage ( ) . getShowViewShortcuts ( ) ; java . lang . String [ ] expectedIds = new java . lang . String [ ] { org . eclipse . ui . IPageLayout . ID_OUTLINE , org . eclipse . ui . IPageLayout . ID_PROBLEM_VIEW , org . eclipse . ui . IPageLayout . ID_TASK_LIST , org . eclipse . search . ui . NewSearchUI . SEARCH_VIEW_ID , org . eclipse . ui . IPageLayout . ID_PROGRESS_VIEW , org . eclipse . ui . console . IConsoleConstants . ID_CONSOLE_VIEW } ; "<AssertPlaceHolder>" ; } getWorkbench ( ) { return org . eclipse . ui . PlatformUI . getWorkbench ( ) ; }
org . junit . Assert . assertArrayEquals ( expectedIds , showViewShortcutIds )
testSerializationDeserialization ( ) { org . simpleframework . xml . Serializer serializer = new org . simpleframework . xml . core . Persister ( ) ; de . uniluebeck . itm . nettyprotocols . isense . otap . ISenseOtapAutomatedProgrammingRequest request = new de . uniluebeck . itm . nettyprotocols . isense . otap . ISenseOtapAutomatedProgrammingRequest ( com . google . common . collect . Sets . newHashSet ( 1 , 2 , 3 ) , new byte [ ] { 1 , 2 , 3 } ) ; request . setAesKeyFromISenseAes128BitKey ( new com . coalesenses . tools . iSenseAes128BitKey ( new byte [ ] { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 } ) ) ; request . setMaxRerequests ( ( ( short ) ( 1 ) ) ) ; request . setOtapInitTimeout ( 2 ) ; request . setPresenceDetectTimeout ( 3 ) ; request . setProgrammingTimeout ( 4 ) ; request . setTimeoutMultiplier ( ( ( short ) ( 5 ) ) ) ; java . io . ByteArrayOutputStream outputStream = new java . io . ByteArrayOutputStream ( ) ; serializer . write ( request , outputStream ) ; java . io . ByteArrayInputStream inputStream = new java . io . ByteArrayInputStream ( outputStream . toByteArray ( ) ) ; de . uniluebeck . itm . nettyprotocols . isense . otap . ISenseOtapAutomatedProgrammingRequest requestRead = serializer . read ( de . uniluebeck . itm . nettyprotocols . isense . otap . ISenseOtapAutomatedProgrammingRequest . class , inputStream ) ; "<AssertPlaceHolder>" ; } setTimeoutMultiplier ( short ) { this . timeoutMultiplier = timeoutMultiplier ; }
org . junit . Assert . assertEquals ( request , requestRead )
testSearchBytes_02_SmallData ( ) { org . riversun . finbin . BinarySearcher bs = new org . riversun . finbin . BinarySearcher ( ) ; byte [ ] srcBytes = SMALL_SIZE_TEST_BYTES ; java . lang . String searchText = "world" ; byte [ ] searchBytes = getBytes ( searchText ) ; final int startIndex = 26 ; java . lang . Integer [ ] expectedArray = new java . lang . Integer [ ] { 43 , 62 } ; java . util . List < java . lang . Integer > resultList = bs . searchBytes ( srcBytes , searchBytes , startIndex ) ; java . lang . Integer [ ] resultArray = resultList . toArray ( new java . lang . Integer [ ] { } ) ; "<AssertPlaceHolder>" ; } searchBytes ( byte [ ] , byte [ ] , int ) { final int endIdx = ( srcBytes . length ) - 1 ; return searchBytes ( srcBytes , searchBytes , searchStartIndex , endIdx ) ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( expectedArray , resultArray ) )
testDropType ( ) { final org . codefamily . crabs . core . TypeDefinition typeDefinition = new org . codefamily . crabs . core . TypeDefinition ( this . indexDefinition , new org . codefamily . crabs . core . Identifier ( "BJHC_16779" ) ) ; typeDefinition . defineStringField ( new org . codefamily . crabs . core . Identifier ( "_string" ) ) ; typeDefinition . defineIntegerField ( new org . codefamily . crabs . core . Identifier ( "_integer" ) ) . asPrimaryField ( ) ; typeDefinition . defineLongField ( new org . codefamily . crabs . core . Identifier ( "_long" ) ) ; typeDefinition . defineFloatField ( new org . codefamily . crabs . core . Identifier ( "_float" ) ) ; typeDefinition . defineDoubleField ( new org . codefamily . crabs . core . Identifier ( "_double" ) ) ; typeDefinition . defineBooleanField ( new org . codefamily . crabs . core . Identifier ( "_boolean" ) ) ; typeDefinition . defineDateField ( new org . codefamily . crabs . core . Identifier ( "_date" ) , org . codefamily . crabs . Constants . PATTERN_YYYY_MM_DD_HH_MM_SS ) ; typeDefinition . publish ( ) ; if ( ! ( this . typeDefinitionManager . exists ( typeDefinition ) ) ) { this . typeDefinitionManager . createType ( typeDefinition ) ; } this . typeDefinitionManager . dropType ( typeDefinition ) ; "<AssertPlaceHolder>" ; } exists ( org . codefamily . crabs . core . Identifier ) { final class IndexExists implements org . codefamily . crabs . core . client . AdvancedClient . InternalIndicesRequestBuilder < org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsRequest , org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsResponse , org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsRequestBuilder , org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsAction , org . codefamily . crabs . core . Identifier > { @ org . codefamily . crabs . core . client . Override public final org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsAction buildAction ( ) { return org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsAction . INSTANCE ; } @ org . codefamily . crabs . core . client . Override public final org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsRequest buildRequest ( final org . elasticsearch . client . IndicesAdminClient adminClient , final org . codefamily . crabs . core . Identifier value ) throws org . codefamily . crabs . exception . CrabsException { org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsRequestBuilder builder = new org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsRequestBuilder ( adminClient , value . toString ( ) ) ; return builder . request ( ) ; } } final class Result { private boolean isExists ; } final Result result = new Result ( ) ; this . advancedClient . execute ( new IndexExists ( ) , new org . codefamily . crabs . core . client . AdvancedClient . ResponseCallback < org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsResponse > ( ) { @ java . lang . Override public final void callback ( final org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsResponse response ) throws org . codefamily . crabs . exception . CrabsException { result . isExists = response . isExists ( ) ; } } , indexIdentifier ) ; return result . isExists ; }
org . junit . Assert . assertFalse ( this . typeDefinitionManager . exists ( typeDefinition ) )
test_acceptObjectKey_whitspace ( java . lang . String , java . lang . String ) { org . joda . beans . ser . json . JsonInput input = new org . joda . beans . ser . json . JsonInput ( new java . io . StringReader ( ( text + "\"<sp>\t\n\r:" ) ) ) ; "<AssertPlaceHolder>" ; } acceptObjectKey ( org . joda . beans . ser . json . JsonEvent ) { ensureEvent ( event , JsonEvent . STRING ) ; return parseObjectKey ( ) ; }
org . junit . Assert . assertEquals ( input . acceptObjectKey ( JsonEvent . STRING ) , expected )
testCBuildFileSpecifiedXLS ( ) { net . casper . data . model . CBuilder builder = new net . casper . io . file . in . CBuildFromFile ( patientsXLS , "patientsXLS" , columnNames , columnOptionalReaders , PKs ) ; net . casper . data . model . CDataCacheContainer cdcc = new net . casper . data . model . CDataCacheContainer ( builder ) ; cdcc . getAll ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return list . size ( ) ; }
org . junit . Assert . assertEquals ( 4 , cdcc . size ( ) )
testSlotRequestCancellationUponFailingRequest ( ) { try ( org . apache . flink . runtime . jobmaster . slotpool . SlotPoolImpl slotPool = new org . apache . flink . runtime . jobmaster . slotpool . SlotPoolImpl ( jobId ) ) { final java . util . concurrent . CompletableFuture < org . apache . flink . runtime . messages . Acknowledge > requestSlotFuture = new java . util . concurrent . CompletableFuture ( ) ; final java . util . concurrent . CompletableFuture < org . apache . flink . runtime . clusterframework . types . AllocationID > cancelSlotFuture = new java . util . concurrent . CompletableFuture ( ) ; final java . util . concurrent . CompletableFuture < org . apache . flink . runtime . clusterframework . types . AllocationID > requestSlotFutureAllocationId = new java . util . concurrent . CompletableFuture ( ) ; resourceManagerGateway . setRequestSlotFuture ( requestSlotFuture ) ; resourceManagerGateway . setRequestSlotConsumer ( ( slotRequest ) -> requestSlotFutureAllocationId . complete ( slotRequest . getAllocationId ( ) ) ) ; resourceManagerGateway . setCancelSlotConsumer ( cancelSlotFuture :: complete ) ; final org . apache . flink . runtime . jobmanager . scheduler . ScheduledUnit scheduledUnit = new org . apache . flink . runtime . jobmanager . scheduler . ScheduledUnit ( new org . apache . flink . runtime . jobgraph . JobVertexID ( ) , null , null ) ; org . apache . flink . runtime . jobmaster . slotpool . SlotPoolTest . setupSlotPool ( slotPool , resourceManagerGateway , mainThreadExecutor ) ; org . apache . flink . runtime . jobmaster . slotpool . Scheduler scheduler = org . apache . flink . runtime . jobmaster . slotpool . SlotPoolTest . setupScheduler ( slotPool , mainThreadExecutor ) ; org . apache . flink . runtime . clusterframework . types . SlotProfile slotProfile = new org . apache . flink . runtime . clusterframework . types . SlotProfile ( org . apache . flink . runtime . clusterframework . types . ResourceProfile . UNKNOWN , java . util . Collections . emptyList ( ) , java . util . Collections . emptySet ( ) ) ; java . util . concurrent . CompletableFuture < org . apache . flink . runtime . jobmaster . LogicalSlot > slotFuture = scheduler . allocateSlot ( new org . apache . flink . runtime . jobmaster . SlotRequestId ( ) , scheduledUnit , slotProfile , true , timeout ) ; requestSlotFuture . completeExceptionally ( new org . apache . flink . util . FlinkException ( "Testing<sp>exception." ) ) ; try { slotFuture . get ( ) ; org . junit . Assert . fail ( "The<sp>slot<sp>future<sp>should<sp>not<sp>have<sp>been<sp>completed<sp>properly." ) ; } catch ( java . lang . Exception ignored ) { } "<AssertPlaceHolder>" ; } } get ( ) { return delegate . get ( ) ; }
org . junit . Assert . assertEquals ( requestSlotFutureAllocationId . get ( ) , cancelSlotFuture . get ( ) )
testPerformance0 ( ) { int compare = - 1 ; int compare2 = 0 ; long time = java . lang . System . nanoTime ( ) ; java . lang . String [ ] foo = null ; for ( int i = 0 ; i < 100000 ; i ++ ) { foo = org . eclipse . concierge . SplitStringTest . longTest . split ( "," ) ; compare = foo . length ; } long time1 = ( java . lang . System . nanoTime ( ) ) - time ; System . out . println ( ( "String.split:<sp>" + time1 ) ) ; time = java . lang . System . nanoTime ( ) ; for ( int i = 0 ; i < 100000 ; i ++ ) { foo = org . eclipse . concierge . Utils . splitString ( org . eclipse . concierge . SplitStringTest . longTest , ',' ) ; compare2 = foo . length ; } long time2 = ( java . lang . System . nanoTime ( ) ) - time ; "<AssertPlaceHolder>" ; System . out . println ( ( "Utils.splitString:<sp>" + time2 ) ) ; System . out . println ( ( "difference<sp>(abs):<sp>" + ( time2 - time1 ) ) ) ; System . out . println ( ( "difference<sp>(%):<sp>" + ( ( ( time2 - time1 ) / ( ( float ) ( java . lang . Math . max ( time1 , time2 ) ) ) ) * 100 ) ) ) ; } splitString ( java . lang . String , char , int ) { if ( ( values == null ) || ( ( values . length ( ) ) == 0 ) ) { return org . eclipse . concierge . Utils . EMPTY_STRING_ARRAY ; } final java . util . List < java . lang . String > tokens = new java . util . ArrayList < java . lang . String > ( ( ( values . length ( ) ) / 10 ) ) ; final char [ ] chars = values . toCharArray ( ) ; final int len = chars . length ; int openingQuote = - 1 ; int pointer = 0 ; int curr = 0 ; int matches = 0 ; while ( java . lang . Character . isWhitespace ( chars [ curr ] ) ) { curr ++ ; } pointer = curr ; do { if ( ( chars [ curr ] ) == '\\' ) { curr += 2 ; continue ; } else if ( ( chars [ curr ] ) == '"' ) { if ( openingQuote < 0 ) { openingQuote = curr ; } else { openingQuote = - 1 ; } curr ++ ; continue ; } else if ( ( ( chars [ curr ] ) == delimiter ) && ( openingQuote < 0 ) ) { matches ++ ; if ( matches > limit ) { break ; } int endPointer = curr - 1 ; while ( ( endPointer > 0 ) && ( java . lang . Character . isWhitespace ( chars [ endPointer ] ) ) ) { endPointer -- ; } final int count = ( endPointer - pointer ) + 1 ; if ( count > 0 ) { tokens . add ( new java . lang . String ( chars , pointer , count ) ) ; } curr ++ ; while ( ( curr < len ) && ( java . lang . Character . isWhitespace ( chars [ curr ] ) ) ) { curr ++ ; } pointer = curr ; continue ; } curr ++ ; } while ( curr < len ) ; if ( openingQuote > ( - 1 ) ) { throw new java . lang . IllegalArgumentException ( ( "Unmatched<sp>quotation<sp>mark<sp>at<sp>position<sp>" + openingQuote ) ) ; } int endPointer = len - 1 ; while ( ( endPointer > 0 ) && ( java . lang . Character . isWhitespace ( chars [ endPointer ] ) ) ) { endPointer -- ; } final int count = ( endPointer - pointer ) + 1 ; if ( count > 0 ) { tokens . add ( new java . lang . String ( chars , pointer , count ) ) ; } return tokens . toArray ( new java . lang . String [ tokens . size ( ) ] ) ; }
org . junit . Assert . assertEquals ( compare , compare2 )
unsubscribe ( ) { com . github . cjm0000000 . mmt . core . message . process . PassiveMsgProcessor api = context . getApplicationContext ( ) . getBean ( com . github . cjm0000000 . mmt . weixin . api . passive . SimpleWeiXinMsgProcessor . class ) ; java . lang . String recvMsg = "<xml><ToUserName><![CDATA[gh_de370ad657cf]]></ToUserName><FromUserName><![CDATA[ot9x4jpm4x_rBrqacQ8hzikL9D-M]]></FromUserName><CreateTime>1378090569</CreateTime><MsgType><![CDATA[event]]></MsgType><Event><![CDATA[unsubscribe]]></Event><EventKey><![CDATA[]]></EventKey></xml>" ; com . github . cjm0000000 . mmt . core . message . send . passive . TextMessage result = ( ( com . github . cjm0000000 . mmt . core . message . send . passive . TextMessage ) ( api . process ( MMT_TOKEN , com . github . cjm0000000 . mmt . core . parser . MmtXMLParser . fromXML ( recvMsg ) ) ) ) ; "<AssertPlaceHolder>" ; } fromXML ( java . io . InputStream ) { return com . github . cjm0000000 . mmt . core . parser . MmtXMLParser . fromXML ( is , null ) ; }
org . junit . Assert . assertEquals ( result , null )
executeWithOutputInterpreter ( ) { org . junit . Assume . assumeTrue ( SystemUtils . IS_OS_LINUX ) ; final com . cloud . utils . script . Script script = new com . cloud . utils . script . Script ( "/bin/bash" ) ; script . add ( "-c" ) ; script . add ( "echo<sp>'hello<sp>world!'" ) ; final java . lang . String value = script . execute ( new com . cloud . utils . script . OutputInterpreter ( ) { @ com . cloud . utils . Override public java . lang . String interpret ( final java . io . BufferedReader reader ) throws java . io . IOException { throw new java . lang . IllegalArgumentException ( ) ; } } ) ; "<AssertPlaceHolder>" ; } interpret ( java . io . BufferedReader ) { java . lang . String line = null ; while ( ( line = reader . readLine ( ) ) != null ) { this . paths . add ( line ) ; } return null ; }
org . junit . Assert . assertNotNull ( value )
testBasic1 ( ) { int size = 100000 ; java . util . Random r = new java . util . Random ( ) ; int [ ] ints = new int [ size ] ; tl . lin . data . array . ArrayListOfInts list = new tl . lin . data . array . ArrayListOfInts ( ) ; for ( int i = 0 ; i < size ; i ++ ) { int k = r . nextInt ( size ) ; list . add ( k ) ; ints [ i ] = k ; } for ( int i = 0 ; i < size ; i ++ ) { int v = list . get ( i ) ; "<AssertPlaceHolder>" ; } } get ( K ) { if ( key == null ) return getForNullKey ( ) ; int hash = tl . lin . data . map . HMapKL . hash ( key . hashCode ( ) ) ; for ( tl . lin . data . map . HMapKL . Entry < K > e = table [ tl . lin . data . map . HMapKL . indexFor ( hash , table . length ) ] ; e != null ; e = e . next ) { java . lang . Object k ; if ( ( ( e . hash ) == hash ) && ( ( ( k = e . key ) == key ) || ( key . equals ( k ) ) ) ) return e . value ; } return DEFAULT_VALUE ; }
org . junit . Assert . assertEquals ( ints [ i ] , v )
get24Hour_A$Calendar_0 ( ) { java . lang . Integer expected = 0 ; java . util . Calendar arg0 = java . util . Calendar . getInstance ( ) ; arg0 . set ( Calendar . HOUR_OF_DAY , expected ) ; java . lang . Integer actual = com . github . seratch . taskun . util . CalendarUtil . get24Hour ( arg0 ) ; "<AssertPlaceHolder>" ; } get24Hour ( java . util . Calendar ) { java . lang . Integer hour = calendar . get ( Calendar . HOUR_OF_DAY ) ; return hour ; }
org . junit . Assert . assertEquals ( expected , actual )
testGetAsObjectNull ( ) { java . lang . String in = null ; java . lang . String out = ( ( java . lang . String ) ( converter . getAsObject ( context , component , in ) ) ) ; "<AssertPlaceHolder>" ; } getAsObject ( javax . faces . context . FacesContext , javax . faces . component . UIComponent , java . lang . String ) { org . oscm . internal . vo . VOPaymentInfo retVal = null ; for ( org . oscm . internal . vo . VOPaymentInfo vopsp : accountingService . getPaymentInfos ( ) ) { if ( java . lang . Long . valueOf ( vopsp . getKey ( ) ) . toString ( ) . equals ( value ) ) { retVal = vopsp ; } } return retVal ; }
org . junit . Assert . assertEquals ( null , out )
testAccessorOfName ( ) { person . setName ( "FooBar" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( "FooBar" , person . getName ( ) )
testTruncatePlain ( ) { com . orientechnologies . orient . core . metadata . schema . OClass vcl = database . getMetadata ( ) . getSchema ( ) . createClass ( "A" ) ; database . getMetadata ( ) . getSchema ( ) . createClass ( "ab" , vcl ) ; com . orientechnologies . orient . core . record . impl . ODocument doc = new com . orientechnologies . orient . core . record . impl . ODocument ( "A" ) ; database . save ( doc ) ; doc = new com . orientechnologies . orient . core . record . impl . ODocument ( "ab" ) ; database . save ( doc ) ; java . lang . Number ret = database . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "truncate<sp>class<sp>A<sp>" ) ) . execute ( ) ; "<AssertPlaceHolder>" ; } intValue ( ) { return value ; }
org . junit . Assert . assertEquals ( ret . intValue ( ) , 1 )
testInvalidParameter ( ) { final net . violet . platform . api . actions . Action theAction = new net . violet . platform . api . actions . news . Update ( ) ; final net . violet . platform . api . callers . APICaller caller = getPublicApplicationAPICaller ( ) ; final java . util . Map < java . lang . String , java . lang . Object > theParams = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; theParams . put ( "news" , "JPFR" ) ; final net . violet . platform . api . actions . ActionParam theActionParam = new net . violet . platform . api . actions . ActionParam ( caller , theParams ) ; final java . lang . Object theResult = theAction . processRequest ( theActionParam ) ; "<AssertPlaceHolder>" ; } put ( K , T ) { this . mMap . put ( theRef , new net . violet . db . cache . CacheReference < K , T > ( theRef , theRecord , this . mReferenceQueue ) ) ; this . mLinkedMap . put ( theRef , theRecord ) ; }
org . junit . Assert . assertNotNull ( theResult )
givenParams_whenVavrMap_thenReturnJavaMap ( ) { io . vavr . collection . Map < java . lang . String , java . lang . String > vavrMap = io . vavr . collection . HashMap . of ( "1" , "a" , "2" , "b" , "3" , "c" ) ; java . util . Map < java . lang . String , java . lang . String > javaMap = vavrMap . toJavaMap ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( ( javaMap instanceof java . util . Map ) )
convertToModel_Null ( ) { org . oscm . ui . model . Marketplace model = umpb . convertToModel ( null ) ; "<AssertPlaceHolder>" ; } convertToModel ( org . oscm . internal . vo . VOMarketplace ) { if ( vmp == null ) { return null ; } org . oscm . ui . model . Marketplace mp = new org . oscm . ui . model . Marketplace ( ) ; mp . setClosed ( ( ! ( vmp . isOpen ( ) ) ) ) ; mp . setKey ( vmp . getKey ( ) ) ; mp . setMarketplaceId ( vmp . getMarketplaceId ( ) ) ; mp . setName ( vmp . getName ( ) ) ; mp . setOwningOrganizationId ( vmp . getOwningOrganizationId ( ) ) ; mp . setOriginalOrgId ( vmp . getOwningOrganizationId ( ) ) ; mp . setReviewEnabled ( vmp . isReviewEnabled ( ) ) ; mp . setSocialBookmarkEnabled ( vmp . isSocialBookmarkEnabled ( ) ) ; mp . setCategoriesEnabled ( vmp . isCategoriesEnabled ( ) ) ; mp . setTaggingEnabled ( vmp . isTaggingEnabled ( ) ) ; mp . setVersion ( vmp . getVersion ( ) ) ; mp . setEditDisabled ( false ) ; mp . setOrganizationSelectVisible ( isLoggedInAndPlatformOperator ( ) ) ; mp . setTenantSelectVisible ( ( ( isLoggedInAndPlatformOperator ( ) ) && ( ! ( menuBean . getApplicationBean ( ) . isInternalAuthMode ( ) ) ) ) ) ; mp . setPropertiesDisabled ( ( ! ( isMpOwner ( vmp ) ) ) ) ; mp . setRevenueSharesReadOnly ( ( ! ( isLoggedInAndPlatformOperator ( ) ) ) ) ; mp . setTenantId ( vmp . getTenantId ( ) ) ; return mp ; }
org . junit . Assert . assertNull ( model )
testAddConfigurationParameterToWriter ( ) { org . walkmod . commands . AddTransformationCommand command = new org . walkmod . commands . AddTransformationCommand ( "imports-cleaner" , "mychain" , false , null , null , null , null , false ) ; java . io . File aux = new java . io . File ( "src/test/resources/xmlparams" ) ; aux . mkdirs ( ) ; java . io . File xml = new java . io . File ( aux , "walkmod.xml" ) ; org . walkmod . conf . providers . XMLConfigurationProvider prov = new org . walkmod . conf . providers . XMLConfigurationProvider ( xml . getPath ( ) , false ) ; try { prov . createConfig ( ) ; org . walkmod . conf . entities . TransformationConfig transfCfg = command . buildTransformationCfg ( ) ; prov . addTransformationConfig ( "mychain" , null , transfCfg , false , null , null ) ; prov . setWriter ( "mychain" , "eclipse-writer" , null , false , null ) ; prov . addConfigurationParameter ( "testParam" , "hello" , "eclipse-writer" , null , null , null , false ) ; java . lang . String output = org . apache . commons . io . FileUtils . readFileToString ( xml ) ; System . out . println ( output ) ; "<AssertPlaceHolder>" ; } finally { org . apache . commons . io . FileUtils . deleteDirectory ( aux ) ; } } addConfigurationParameter ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , boolean ) { if ( ( param != null ) && ( value != null ) ) { org . walkmod . conf . providers . yml . AddConfigurationParameterYMLAction action = new org . walkmod . conf . providers . yml . AddConfigurationParameterYMLAction ( param , value , type , category , name , chain , this , recursive ) ; action . execute ( ) ; } }
org . junit . Assert . assertTrue ( ( ( output . contains ( "testParam" ) ) && ( output . contains ( "hello" ) ) ) )
canZoomOutIfGreaterThanMinValue ( ) { double scale = ( pipe . views . ZoomUITest . MIN_ZOOM ) + ( pipe . views . ZoomUITest . ZOOM_INCREMENT ) ; pipe . actions . gui . ZoomManager zoomUI = new pipe . actions . gui . ZoomUI ( scale , pipe . views . ZoomUITest . ZOOM_INCREMENT , pipe . views . ZoomUITest . MAX_ZOOM , pipe . views . ZoomUITest . MIN_ZOOM , null ) ; "<AssertPlaceHolder>" ; } canZoomOut ( ) { int newPercent = ( percent ) - ( pipe . constants . GUIConstants . ZOOM_DELTA ) ; return newPercent >= ( pipe . constants . GUIConstants . ZOOM_MIN ) ; }
org . junit . Assert . assertTrue ( zoomUI . canZoomOut ( ) )
testCreateDeURL ( ) { java . util . List < slash . navigation . base . Wgs84Position > positions = new java . util . ArrayList ( ) ; positions . add ( new slash . navigation . base . Wgs84Position ( 10.02571156 , 53.57497745 , null , 5.5 , null , "Hamburg,<sp>Germany" ) ) ; positions . add ( new slash . navigation . base . Wgs84Position ( 10.20026067 , 53.57662034 , null , 4.5 , null , "Stemwarde,<sp>Germany" ) ) ; positions . add ( new slash . navigation . base . Wgs84Position ( 10.35735078 , 53.59171021 , null , 3.5 , null , "Groensee,<sp>Germany" ) ) ; positions . add ( new slash . navigation . base . Wgs84Position ( 10.45696089 , 53.64781001 , null , 2.5 , null , "Linau,<sp>Germany" ) ) ; java . lang . String expected = "navigon://route/?target=coordinate//10.025711/53.574977&target=coordinate//10.200260/53.576620&target=coordinate//10.357350/53.591710&target=coordinate//10.456960/53.647810" ; java . lang . String actual = format . createURL ( positions , 0 , positions . size ( ) ) ; "<AssertPlaceHolder>" ; } createURL ( java . util . List , int , int ) { java . lang . StringBuilder buffer = new java . lang . StringBuilder ( ) ; buffer . append ( "navigon" ) ; java . lang . String mapName = trim ( slash . navigation . nmn . NmnUrlFormat . preferences . get ( "navigonUrlMapName" , null ) ) ; if ( mapName != null ) buffer . append ( mapName ) ; buffer . append ( "://route/?" ) ; for ( int i = startIndex ; i < endIndex ; i ++ ) { slash . navigation . base . Wgs84Position position = positions . get ( i ) ; java . lang . String longitude = formatDoubleAsString ( position . getLongitude ( ) , 6 ) ; java . lang . String latitude = formatDoubleAsString ( position . getLatitude ( ) , 6 ) ; if ( i > startIndex ) buffer . append ( "&" ) ; buffer . append ( "target=coordinate//" ) . append ( longitude ) . append ( "/" ) . append ( latitude ) ; } return buffer . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testPatientGets ( ) { java . lang . Integer code = 0 ; try { code = _setupTestPatient ( false ) ; _checkPatientIntoDb ( code ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkPatientIntoDb ( java . lang . Integer ) { org . isf . patient . model . Patient foundPatient ; foundPatient = ( ( org . isf . patient . model . Patient ) ( org . isf . patient . test . Tests . jpa . find ( org . isf . patient . model . Patient . class , code ) ) ) ; org . isf . patient . test . Tests . testPatient . check ( foundPatient ) ; return ; }
org . junit . Assert . assertEquals ( true , false )
testToc ( ) { java . io . File adocXML = java . nio . file . Paths . get ( "testres" , "toc" , candidate , ( ( candidate ) + ".xml" ) ) . toFile ( ) ; java . io . File expectedTOCFile = java . nio . file . Paths . get ( "testres" , "toc" , candidate , ( ( "toc" + ( candidate ) ) + ".xml" ) ) . toFile ( ) ; java . lang . String expectedTOC = new java . lang . String ( java . nio . file . Files . readAllBytes ( expectedTOCFile . toPath ( ) ) ) ; java . lang . String actualTOC = org . eclipse . n4js . doctools . EclipseHelpTOCGenerator . generateTOC ( adocXML , "" ) ; "<AssertPlaceHolder>" ; } generateTOC ( java . io . File , java . lang . String ) { java . io . FileInputStream fis = new java . io . FileInputStream ( file ) ; try { javax . xml . parsers . SAXParserFactory factory = javax . xml . parsers . SAXParserFactory . newInstance ( ) ; javax . xml . parsers . SAXParser parser = factory . newSAXParser ( ) ; org . xml . sax . XMLReader reader = parser . getXMLReader ( ) ; org . eclipse . n4js . doctools . EclipseHelpTOCGenerator handler = new org . eclipse . n4js . doctools . EclipseHelpTOCGenerator ( ) ; handler . dir = linkPrefix + ( file . getName ( ) . substring ( 0 , file . getName ( ) . indexOf ( ".xml" ) ) ) ; reader . setContentHandler ( handler ) ; reader . setEntityResolver ( new org . xml . sax . EntityResolver ( ) { @ org . eclipse . n4js . doctools . Override public org . xml . sax . InputSource resolveEntity ( java . lang . String publicId , java . lang . String systemId ) throws java . io . IOException , org . xml . sax . SAXException { return new org . xml . sax . InputSource ( new java . io . StringReader ( "" ) ) ; } } ) ; org . xml . sax . InputSource input = new org . xml . sax . InputSource ( fis ) ; reader . parse ( input ) ; return handler . getResult ( ) ; } finally { fis . close ( ) ; } }
org . junit . Assert . assertEquals ( expectedTOC , actualTOC )
testBerichtMetOverrulMetOverrulbareFouten1 ( ) { System . out . println ( "----<sp>testBerichtMetOverrulMetOverrulbareFouten1" ) ; nl . bzk . brp . business . dto . bijhouding . AbstractBijhoudingsBericht bericht = new nl . bzk . brp . business . dto . bijhouding . VerhuizingBericht ( ) ; nl . bzk . brp . business . dto . BerichtContext context = new nl . bzk . brp . business . dto . BerichtContext ( new nl . bzk . brp . business . dto . BerichtenIds ( 1L , 1L ) , 1 , new nl . bzk . brp . model . gedeeld . Partij ( ) , "ref" ) ; bericht . setOverruledMeldingen ( java . util . Arrays . asList ( new nl . bzk . brp . model . validatie . OverruleMelding ( MeldingCode . AUTH0001 . getNaam ( ) ) ) ) ; nl . bzk . brp . business . dto . BerichtResultaat resultaat = new nl . bzk . brp . business . dto . BerichtResultaat ( java . util . Arrays . asList ( new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . INFO , nl . bzk . brp . model . validatie . MeldingCode . BRAL0012 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . FOUT_OVERRULEBAAR , nl . bzk . brp . model . validatie . MeldingCode . AUTH0001 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . INFO , nl . bzk . brp . model . validatie . MeldingCode . BRAL2032 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . FOUT_OVERRULEBAAR , nl . bzk . brp . model . validatie . MeldingCode . AUTH0001 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . FOUT_OVERRULEBAAR , nl . bzk . brp . model . validatie . MeldingCode . AUTH0001 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . FOUT_OVERRULEBAAR , nl . bzk . brp . model . validatie . MeldingCode . BRAL2033 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . WAARSCHUWING , nl . bzk . brp . model . validatie . MeldingCode . ALG0001 ) ) ) ; bedrijfsregelValidatieStap . corrigeerVoorOverrulebareFouten ( bericht , context , resultaat ) ; "<AssertPlaceHolder>" ; } bevatVerwerkingStoppendeFouten ( ) { for ( nl . bzk . brp . model . validatie . Melding melding : getMeldingen ( ) ) { if ( ( ( melding . getSoort ( ) ) == ( nl . bzk . brp . model . algemeen . stamgegeven . ber . SoortMelding . DEBLOKKEERBAAR ) ) || ( ( melding . getSoort ( ) ) == ( nl . bzk . brp . model . algemeen . stamgegeven . ber . SoortMelding . FOUT ) ) ) { return true ; } } return false ; }
org . junit . Assert . assertEquals ( true , resultaat . bevatVerwerkingStoppendeFouten ( ) )
newsItem_withoutByLine_returnAuthorsFromInitialActors ( ) { dk . i2m . converge . core . content . NewsItem newsItem = getNewsItemWithoutByline ( ) ; final java . lang . String expectedAuthors = "Allan<sp>Lykke<sp>Christensen,<sp>Nikholai<sp>Mukalazi" ; java . lang . String actualAuthors = newsItem . getAuthors ( ) ; "<AssertPlaceHolder>" ; } getAuthors ( ) { if ( ! ( org . apache . commons . lang . StringUtils . isBlank ( getByLine ( ) ) ) ) { return getByLine ( ) ; } java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; dk . i2m . converge . core . content . Workflow workflow = getOutlet ( ) . getWorkflow ( ) ; dk . i2m . converge . core . security . UserRole authorRole = workflow . getStartState ( ) . getActorRole ( ) ; boolean firstActor = true ; for ( dk . i2m . converge . core . content . NewsItemActor actor : getActors ( ) ) { if ( actor . getRole ( ) . equals ( authorRole ) ) { if ( ! firstActor ) { sb . append ( ",<sp>" ) ; } else { firstActor = false ; } sb . append ( actor . getUser ( ) . getFullName ( ) ) ; } } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedAuthors , actualAuthors )
testCreateInstrumentationWithSingleClass ( ) { org . apache . hadoop . mapred . JobConf conf = new org . apache . hadoop . mapred . JobConf ( ) ; conf . set ( TTConfig . TT_INSTRUMENTATION , org . apache . hadoop . mapred . DummyTaskTrackerInstrumentation . class . getName ( ) ) ; org . apache . hadoop . mapred . TaskTracker tracker = new org . apache . hadoop . mapred . TaskTracker ( ) ; org . apache . hadoop . mapred . TaskTrackerInstrumentation inst = org . apache . hadoop . mapred . TaskTracker . createInstrumentation ( tracker , conf ) ; "<AssertPlaceHolder>" ; } getName ( ) { return this . name ; }
org . junit . Assert . assertEquals ( org . apache . hadoop . mapred . DummyTaskTrackerInstrumentation . class . getName ( ) , inst . getClass ( ) . getName ( ) )
biMapTest ( ) { net . openhft . chronicle . map . BiMapTest . BiMapEntryOperations < java . lang . Integer , java . lang . CharSequence > biMapOps1 = new net . openhft . chronicle . map . BiMapTest . BiMapEntryOperations < > ( ) ; net . openhft . chronicle . map . ChronicleMap < java . lang . Integer , java . lang . CharSequence > map1 = net . openhft . chronicle . map . ChronicleMapBuilder . of ( net . openhft . chronicle . map . Integer . class , net . openhft . chronicle . map . CharSequence . class ) . entries ( 100 ) . actualSegments ( 1 ) . averageValueSize ( 10 ) . entryOperations ( biMapOps1 ) . mapMethods ( new net . openhft . chronicle . map . BiMapTest . BiMapMethods ( ) ) . create ( ) ; net . openhft . chronicle . map . BiMapTest . BiMapEntryOperations < java . lang . CharSequence , java . lang . Integer > biMapOps2 = new net . openhft . chronicle . map . BiMapTest . BiMapEntryOperations < > ( ) ; net . openhft . chronicle . map . ChronicleMap < java . lang . CharSequence , java . lang . Integer > map2 = net . openhft . chronicle . map . ChronicleMapBuilder . of ( net . openhft . chronicle . map . CharSequence . class , net . openhft . chronicle . map . Integer . class ) . entries ( 100 ) . actualSegments ( 1 ) . averageKeySize ( 10 ) . entryOperations ( biMapOps2 ) . mapMethods ( new net . openhft . chronicle . map . BiMapTest . BiMapMethods ( ) ) . create ( ) ; biMapOps1 . setReverse ( map2 ) ; biMapOps2 . setReverse ( map1 ) ; map1 . put ( 1 , "1" ) ; net . openhft . chronicle . map . BiMapTest . verifyBiMapConsistent ( map1 , map2 ) ; map2 . remove ( "1" ) ; "<AssertPlaceHolder>" ; net . openhft . chronicle . map . BiMapTest . verifyBiMapConsistent ( map1 , map2 ) ; map1 . put ( 3 , "4" ) ; map2 . put ( "5" , 6 ) ; net . openhft . chronicle . map . BiMapTest . verifyBiMapConsistent ( map1 , map2 ) ; try ( net . openhft . chronicle . map . ExternalMapQueryContext < java . lang . CharSequence , java . lang . Integer , ? > q = map2 . queryContext ( "4" ) ) { q . updateLock ( ) . lock ( ) ; q . entry ( ) . doRemove ( ) ; } try { map1 . remove ( 3 ) ; throw new java . lang . AssertionError ( "expected<sp>IllegalStateException" ) ; } catch ( java . lang . IllegalStateException e ) { } try { map2 . put ( "4" , 6 ) ; throw new java . lang . AssertionError ( "expected<sp>IllegalArgumentException" ) ; } catch ( java . lang . IllegalArgumentException e ) { } map2 . put ( "4" , 3 ) ; net . openhft . chronicle . map . BiMapTest . verifyBiMapConsistent ( map1 , map2 ) ; map1 . clear ( ) ; net . openhft . chronicle . map . BiMapTest . verifyBiMapConsistent ( map1 , map2 ) ; java . util . concurrent . ForkJoinPool pool = new java . util . concurrent . ForkJoinPool ( 8 ) ; try { pool . submit ( ( ) -> { java . util . concurrent . ThreadLocalRandom . current ( ) . ints ( ) . limit ( 10000 ) . parallel ( ) . forEach ( ( i ) -> { int v = java . lang . Math . abs ( ( i % 10 ) ) ; if ( ( i & 1 ) == 0 ) { if ( ( i & 2 ) == 0 ) { map1 . putIfAbsent ( v , ( "" + v ) ) ; } else { map1 . remove ( v , ( "" + v ) ) ; } } else { if ( ( i & 2 ) == 0 ) { map2 . putIfAbsent ( ( "" + v ) , v ) ; } else { map2 . remove ( ( "" + v ) , v ) ; } } } ) ; } ) . get ( ) ; net . openhft . chronicle . map . BiMapTest . verifyBiMapConsistent ( map1 , map2 ) ; } finally { pool . shutdownNow ( ) ; } } isEmpty ( ) { return m . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( map2 . isEmpty ( ) )
testMessageWithIllegalParameterType ( ) { org . eclipse . swt . layout . GridLayout wrongParameter = new org . eclipse . swt . layout . GridLayout ( ) ; try { org . eclipse . rap . rwt . internal . protocol . JsonUtil . createJsonValue ( wrongParameter ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException exception ) { java . lang . String expected = "Parameter<sp>object<sp>can<sp>not<sp>be<sp>converted<sp>to<sp>JSON<sp>value" ; "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertTrue ( exception . getMessage ( ) . startsWith ( expected ) )
whenCleared_thenEmpty ( ) { org . apache . commons . text . StrBuilder strBuilder = new org . apache . commons . text . StrBuilder ( "example<sp>StrBuilder!" ) ; strBuilder . clear ( ) ; "<AssertPlaceHolder>" ; } clear ( ) { com . j256 . ormlite . table . TableUtils . clearTable ( com . baeldung . ormlite . ORMLiteIntegrationTest . connectionSource , com . baeldung . ormlite . Library . class ) ; com . j256 . ormlite . table . TableUtils . clearTable ( com . baeldung . ormlite . ORMLiteIntegrationTest . connectionSource , com . baeldung . ormlite . Book . class ) ; com . j256 . ormlite . table . TableUtils . clearTable ( com . baeldung . ormlite . ORMLiteIntegrationTest . connectionSource , com . baeldung . ormlite . Address . class ) ; }
org . junit . Assert . assertEquals ( new org . apache . commons . text . StrBuilder ( "" ) , strBuilder )
setURLStreamHandlerFactory ( ) { java . net . URLStreamHandlerFactory factory = createMock ( java . net . URLStreamHandlerFactory . class ) ; org . ops4j . pax . runner . handler . internal . URLUtils . setURLStreamHandlerFactory ( factory ) ; "<AssertPlaceHolder>" ; } getURLStreamHandlerFactory ( ) { java . net . URLStreamHandlerFactory factory = createMock ( java . net . URLStreamHandlerFactory . class ) ; java . net . URL . setURLStreamHandlerFactory ( factory ) ; org . junit . Assert . assertEquals ( "Factory" , factory , org . ops4j . pax . runner . handler . internal . URLUtils . getURLStreamHandlerFactory ( ) ) ; }
org . junit . Assert . assertEquals ( "Factory" , factory , org . ops4j . pax . runner . handler . internal . URLUtils . getURLStreamHandlerFactory ( ) )
testEqualsTargetIdxFalse ( ) { net . sf . extjwnl . data . Synset s = new net . sf . extjwnl . data . Synset ( dictionary , POS . NOUN , 1 ) ; net . sf . extjwnl . data . Pointer p = new net . sf . extjwnl . data . Pointer ( s , PointerType . ANTONYM , POS . NOUN , 10 , 0 ) ; net . sf . extjwnl . data . Pointer pp = new net . sf . extjwnl . data . Pointer ( s , PointerType . ANTONYM , POS . NOUN , 20 , 0 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return ( ( object instanceof net . sf . extjwnl . data . Synset ) && ( ( ( net . sf . extjwnl . data . Synset ) ( object ) ) . getPOS ( ) . equals ( getPOS ( ) ) ) ) && ( ( ( ( net . sf . extjwnl . data . Synset ) ( object ) ) . getOffset ( ) ) == ( getOffset ( ) ) ) ; }
org . junit . Assert . assertFalse ( p . equals ( pp ) )
shouldReturnTrueForUpperCaseUpperCaseLowerCaseAtIndexOne ( ) { boolean start = edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . isWordStart ( "AAa" , 1 ) ; "<AssertPlaceHolder>" ; } isWordStart ( java . lang . String , int ) { checkNotNull ( entityName ) ; int length = entityName . length ( ) ; checkElementIndex ( index , length ) ; edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType indexCharType = edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . getType ( entityName , index ) ; if ( ! ( indexCharType . isWordLetter ( ) ) ) { return false ; } if ( index == 0 ) { return true ; } edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType prevCharType = edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . getType ( entityName , ( index - 1 ) ) ; if ( prevCharType != indexCharType ) { return ! ( ( indexCharType == ( EntityNameCharType . LETTER ) ) && ( prevCharType == ( EntityNameCharType . UPPER_CASE_LETTER ) ) ) ; } if ( indexCharType == ( EntityNameCharType . UPPER_CASE_LETTER ) ) { boolean hasFollowingCharacter = index < ( length - 1 ) ; return hasFollowingCharacter && ( ( edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . getType ( entityName , ( index + 1 ) ) ) == ( EntityNameCharType . LETTER ) ) ; } return false ; }
org . junit . Assert . assertEquals ( true , start )
testNothingGetsSentWhenThereAreNoUploads ( ) { com . facebook . buck . event . listener . HttpArtifactCacheUploadListener listener = new com . facebook . buck . event . listener . HttpArtifactCacheUploadListener ( eventBus , com . facebook . buck . event . listener . HttpArtifactCacheUploadListenerTest . NUMBER_OF_THREADS ) ; listener . onBuildFinished ( createBuildFinishedEvent ( 2 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return allNodes . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , events . size ( ) )
testGetValue02 ( ) { javax . el . ELProcessor processor = new javax . el . ELProcessor ( ) ; java . lang . Object result = processor . getValue ( "1;2" , org . apache . el . parser . Integer . class ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . String , java . lang . Class ) { javax . el . ValueExpression ve = factory . createValueExpression ( context , javax . el . ELProcessor . bracket ( expression ) , expectedType ) ; return ve . getValue ( context ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 2 ) , result )
test ( ) { com . codeabovelab . dm . cluman . model . ApplicationImpl application = com . codeabovelab . dm . cluman . model . ApplicationImpl . builder ( ) . name ( java . util . UUID . randomUUID ( ) . toString ( ) ) . cluster ( "cluster" ) . creatingDate ( new java . util . Date ( ) ) . containers ( java . util . Arrays . asList ( "1" , "2" ) ) . build ( ) ; applicationService . addApplication ( application ) ; com . codeabovelab . dm . cluman . model . Application storedApp = applicationService . getApplication ( application . getCluster ( ) , application . getName ( ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( application , storedApp )
testCharSet ( ) { try { final java . lang . String content = this . parser . getTextFromFile ( com . github . jknack . antlr4ide . parser . CharSetTest . class ) ; final org . eclipse . xtext . parser . IParseResult parseResults = this . parser . parse ( content ) ; final boolean syntaxErrors = parseResults . hasSyntaxErrors ( ) ; "<AssertPlaceHolder>" ; } catch ( final java . lang . Throwable throwable ) { throw org . eclipse . xtext . xbase . lib . Exceptions . sneakyThrow ( throwable ) ; } } parse ( java . lang . CharSequence ) { final java . lang . String content = input . toString ( ) ; final java . io . StringReader stringReader = new java . io . StringReader ( content ) ; return this . parser . parse ( stringReader ) ; }
org . junit . Assert . assertFalse ( syntaxErrors )
test_createIndexFile_bean_nullFile ( ) { final boolean created = new org . talend . updates . runtime . nexus . component . ComponentIndexManager ( ) . createIndexFile ( null , ( ( org . talend . updates . runtime . nexus . component . ComponentIndexBean ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } createIndexFile ( java . io . File , java . util . List ) { throw new java . io . FileNotFoundException ( ) ; }
org . junit . Assert . assertFalse ( created )
testNamesWithIdenticalServiceNames ( ) { java . lang . String name1 = _metrics . name ( "serviceName" , "name" ) ; java . lang . String name2 = _metrics . name ( "serviceName" , "name" ) ; "<AssertPlaceHolder>" ; } name ( java . lang . String , java . lang . String ) { java . lang . String fullName = com . codahale . metrics . MetricRegistry . name ( _prefix , serviceName , name ) ; _names . add ( fullName ) ; return fullName ; }
org . junit . Assert . assertEquals ( name1 , name2 )
tesBerichtSyntaxException ( ) { final java . lang . String berichtOrigineel = org . apache . commons . io . IOUtils . toString ( nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBerichtTest . class . getResourceAsStream ( "verwerkToevalligeGebeurtenisVerzoekBerichtSyntaxException.xml" ) ) ; final nl . bzk . migratiebrp . bericht . model . sync . SyncBericht syncBericht = factory . getBericht ( berichtOrigineel ) ; "<AssertPlaceHolder>" ; } getBericht ( java . lang . String ) { try { final javax . xml . bind . JAXBElement < ? > element = NotificatieXml . SINGLETON . stringToElement ( berichtAlsString ) ; return maakBericht ( element . getValue ( ) ) ; } catch ( final javax . xml . bind . JAXBException e ) { nl . bzk . migratiebrp . bericht . model . notificatie . factory . NotificatieBerichtFactory . LOG . warn ( "Verwerken<sp>bericht<sp>mislukt" , e ) ; return new nl . bzk . migratiebrp . bericht . model . notificatie . impl . OngeldigBericht ( berichtAlsString , e . getMessage ( ) ) ; } }
org . junit . Assert . assertTrue ( ( syncBericht instanceof nl . bzk . migratiebrp . bericht . model . sync . impl . OngeldigBericht ) )
testRemoveAttribute_returnsFalseWhenUnbound ( ) { uiSession . setAttribute ( "name" , null ) ; httpSession . invalidate ( ) ; boolean result = uiSession . removeAttribute ( "name" ) ; "<AssertPlaceHolder>" ; } removeAttribute ( java . lang . String ) { java . lang . String oldValue = ( ( java . lang . String ) ( props . remove ( name ) ) ) ; if ( oldValue != null ) { notifyListeners ( name , oldValue , null ) ; persist ( ) ; } }
org . junit . Assert . assertFalse ( result )
testToStringWithBitrate ( ) { org . eclipse . kura . core . net . WifiAccessPointImpl ap = new org . eclipse . kura . core . net . WifiAccessPointImpl ( "ssid" ) ; java . util . ArrayList < java . lang . Long > bitrate = new java . util . ArrayList < java . lang . Long > ( ) ; bitrate . add ( ( ( long ) ( 1 ) ) ) ; bitrate . add ( ( ( long ) ( 2 ) ) ) ; ap . setBitrate ( bitrate ) ; java . lang . String expected = "ssid=ssid<sp>::<sp>frequency=0<sp>::<sp>mode=null<sp>::<sp>bitrate=1<sp>2<sp>::<sp>strength=0" ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( "]" 1 ) . append ( this . id ) . append ( "]" 0 ) . append ( this . topic ) . append ( ",<sp>qos=" ) . append ( this . qos ) . append ( ",<sp>retain=" ) . append ( this . retain ) . append ( ",<sp>createdOn=" ) . append ( this . createdOn ) . append ( ",<sp>publishedOn=" ) . append ( this . publishedOn ) . append ( ",<sp>publishedMessageId=" ) . append ( this . publishedMessageId ) . append ( ",<sp>confirmedOn=" ) . append ( this . confirmedOn ) . append ( ",<sp>payload=" ) . append ( java . util . Arrays . toString ( this . payload ) ) . append ( ",<sp>priority=" ) . append ( this . priority ) . append ( ",<sp>sessionId=" ) . append ( this . sessionId ) . append ( "]" 2 ) . append ( this . droppedOn ) . append ( "]" ) ; return builder . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , ap . toString ( ) )
parseInvalidErrorMessage ( ) { okhttp3 . Response response = new okhttp3 . Response . Builder ( ) . request ( new okhttp3 . Request . Builder ( ) . url ( "https://api.treasuredata.com/v3/server_status" ) . build ( ) ) . message ( "" ) . code ( HttpStatus . ACCEPTED_202 ) . protocol ( Protocol . HTTP_1_1 ) . body ( okhttp3 . ResponseBody . create ( okhttp3 . MediaType . parse ( "application/json" ) , "{invalid<sp>json<sp>response}" ) ) . build ( ) ; com . google . common . base . Optional < com . treasuredata . client . model . TDApiErrorMessage > err = com . treasuredata . client . TDRequestErrorHandler . extractErrorResponse ( response ) ; "<AssertPlaceHolder>" ; } extractErrorResponse ( okhttp3 . Response ) { com . google . common . base . Optional < java . lang . String > content = com . google . common . base . Optional . absent ( ) ; try { try { content = com . google . common . base . Optional . of ( response . body ( ) . string ( ) ) ; } catch ( java . io . IOException e ) { throw new com . treasuredata . client . TDClientException ( ErrorType . INVALID_JSON_RESPONSE , e ) ; } if ( ( ( content . isPresent ( ) ) && ( ( content . get ( ) . length ( ) ) > 0 ) ) && ( ( content . get ( ) . charAt ( 0 ) ) == '{' ) ) { return com . google . common . base . Optional . of ( TDHttpClient . defaultObjectMapper . readValue ( content . get ( ) , com . treasuredata . client . model . TDApiErrorMessage . class ) ) ; } else { return com . google . common . base . Optional . of ( new com . treasuredata . client . model . TDApiErrorMessage ( "error" , content . or ( "[empty]" ) , "error" ) ) ; } } catch ( java . io . IOException e ) { com . treasuredata . client . TDRequestErrorHandler . logger . warn ( "Failed<sp>to<sp>parse<sp>the<sp>error<sp>response<sp>{}:<sp>{}\n{}" , response . request ( ) . url ( ) , content . or ( "[empty]" ) , e . getMessage ( ) ) ; } return com . google . common . base . Optional . absent ( ) ; }
org . junit . Assert . assertFalse ( err . isPresent ( ) )
testCounter ( ) { brown . tracingplane . bdl . examples . ExampleBag eb1 = new brown . tracingplane . bdl . examples . ExampleBag ( ) ; eb1 . c = brown . tracingplane . bdl . SpecialTypes . Counter . newInstance ( ) ; eb1 . c . increment ( 174 ) ; brown . tracingplane . BaggageContext sourceBaggage = brown . tracingplane . bdl . examples . ExampleBag . setIn ( null , eb1 ) ; byte [ ] bytes = brown . tracingplane . impl . TestExampleBag . provider . serialize ( ( ( brown . tracingplane . impl . BDLContext ) ( sourceBaggage ) ) ) ; brown . tracingplane . BaggageContext b = brown . tracingplane . impl . TestExampleBag . provider . deserialize ( bytes , 0 , bytes . length ) ; "<AssertPlaceHolder>" ; } getFrom ( brown . tracingplane . BaggageContext ) { brown . tracingplane . bdl . Bag bag = brown . tracingplane . impl . BDLContextProvider . get ( baggage , brown . tracingplane . bdl . examples . ExampleBag . Handler . registration ( ) ) ; if ( bag instanceof brown . tracingplane . bdl . examples . ExampleBag ) { return ( ( brown . tracingplane . bdl . examples . ExampleBag ) ( bag ) ) ; } else if ( bag != null ) { brown . tracingplane . bdl . examples . ExampleBag . Handler . checkRegistration ( ) ; } return null ; }
org . junit . Assert . assertEquals ( 174 , brown . tracingplane . bdl . examples . ExampleBag . getFrom ( b ) . c . getValue ( ) )
decode_6 ( ) { final java . lang . String arg = "fooba" ; final java . lang . String exp = "Zm9vYmE=" ; "<AssertPlaceHolder>" ; } decode ( byte [ ] ) { if ( ( data . length ) == 0 ) { return data ; } int lastRealDataIndex = ( data . length ) - 1 ; while ( ( data [ lastRealDataIndex ] ) == ( org . erlide . util . Base64 . EQUAL_SIGN ) ) { lastRealDataIndex -- ; } final int padBytes = ( ( data . length ) - 1 ) - lastRealDataIndex ; final int byteLength = ( ( ( data . length ) * 6 ) / 8 ) - padBytes ; final byte [ ] result = new byte [ byteLength ] ; int dataIndex = 0 ; int resultIndex = 0 ; int allBits = 0 ; final int resultChunks = ( lastRealDataIndex + 1 ) / 4 ; for ( int i = 0 ; i < resultChunks ; i ++ ) { allBits = 0 ; for ( int j = 0 ; j < 4 ; j ++ ) { allBits = ( allBits << 6 ) | ( org . erlide . util . Base64 . decodeDigit ( data [ ( dataIndex ++ ) ] ) ) ; } for ( int j = resultIndex + 2 ; j >= resultIndex ; j -- ) { result [ j ] = ( ( byte ) ( allBits & 255 ) ) ; allBits = allBits > > > 8 ; } resultIndex += 3 ; } if ( padBytes == 1 ) { allBits = 0 ; for ( int j = 0 ; j < 3 ; j ++ ) { allBits = ( allBits << 6 ) | ( org . erlide . util . Base64 . decodeDigit ( data [ ( dataIndex ++ ) ] ) ) ; } allBits = allBits << 6 ; allBits = allBits > > > 8 ; for ( int j = resultIndex + 1 ; j >= resultIndex ; j -- ) { result [ j ] = ( ( byte ) ( allBits & 255 ) ) ; allBits = allBits > > > 8 ; } } else if ( padBytes == 2 ) { allBits = 0 ; for ( int j = 0 ; j < 2 ; j ++ ) { allBits = ( allBits << 6 ) | ( org . erlide . util . Base64 . decodeDigit ( data [ ( dataIndex ++ ) ] ) ) ; } allBits = allBits << 6 ; allBits = allBits << 6 ; allBits = allBits > > > 8 ; allBits = allBits > > > 8 ; result [ resultIndex ] = ( ( byte ) ( allBits & 255 ) ) ; } return result ; }
org . junit . Assert . assertEquals ( arg , new java . lang . String ( org . erlide . util . Base64 . decode ( exp . getBytes ( ) ) ) )
pullsFirstSoapHeader ( ) { java . util . List < org . apache . cxf . headers . Header > headers = new java . util . ArrayList ( ) ; org . w3c . dom . Element mockElement = addHeader ( headers , "local" ) ; javax . xml . ws . WebServiceContext mockServiceContext = createContextWithHeaders ( headers ) ; gov . hhs . fha . nhinc . async . AsyncMessageIdExtractor extractor = new gov . hhs . fha . nhinc . async . AsyncMessageIdExtractor ( ) ; org . w3c . dom . Element extractedElement = extractor . getSoapHeaderElement ( mockServiceContext , "local" ) ; "<AssertPlaceHolder>" ; } getSoapHeaderElement ( javax . xml . ws . WebServiceContext , java . lang . String ) { if ( context == null ) { return null ; } javax . xml . ws . handler . MessageContext mContext = context . getMessageContext ( ) ; if ( mContext == null ) { return null ; } return getSoapHeaderFromContext ( headerName , mContext ) ; }
org . junit . Assert . assertSame ( mockElement , extractedElement )
concurrentTestWriterReaderWithSameSpeed ( ) { final int totalTimes = 10000 ; final int writerCount = 20 ; final int readerCount = 20 ; com . geekhua . filequeue . Config config = new com . geekhua . filequeue . Config ( ) ; config . setBaseDir ( com . geekhua . filequeue . FileQueueImplTest . baseDir . getAbsolutePath ( ) ) ; final com . geekhua . filequeue . FileQueue < com . geekhua . filequeue . FileQueueImplTest . TestObject > fq = new com . geekhua . filequeue . FileQueueImpl < com . geekhua . filequeue . FileQueueImplTest . TestObject > ( config ) ; final java . util . Set < com . geekhua . filequeue . FileQueueImplTest . TestObject > results = java . util . Collections . synchronizedSet ( new java . util . TreeSet < com . geekhua . filequeue . FileQueueImplTest . TestObject > ( ) ) ; final java . util . Set < com . geekhua . filequeue . FileQueueImplTest . TestObject > expected = java . util . Collections . synchronizedSet ( new java . util . TreeSet < com . geekhua . filequeue . FileQueueImplTest . TestObject > ( ) ) ; final java . util . concurrent . CountDownLatch startLatch = new java . util . concurrent . CountDownLatch ( 1 ) ; final java . util . concurrent . CountDownLatch endLatch = new java . util . concurrent . CountDownLatch ( ( writerCount + readerCount ) ) ; for ( int i = 0 ; i < writerCount ; i ++ ) { final int threadNum = i ; java . lang . Thread writerThread = new java . lang . Thread ( new java . lang . Runnable ( ) { public void run ( ) { try { startLatch . await ( ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } for ( int j = 0 ; j < ( totalTimes / writerCount ) ; j ++ ) { try { com . geekhua . filequeue . FileQueueImplTest . TestObject m = new com . geekhua . filequeue . FileQueueImplTest . TestObject ( totalTimes , ( ( ( "t-" + threadNum ) + "-" ) + j ) , ( ( j % 2 ) == 0 ) , j ) ; fq . add ( m ) ; expected . add ( m ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } } endLatch . countDown ( ) ; } } ) ; writerThread . start ( ) ; } for ( int i = 0 ; i < readerCount ; i ++ ) { java . lang . Thread readerThread = new java . lang . Thread ( new java . lang . Runnable ( ) { public void run ( ) { try { startLatch . await ( ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } for ( int j = 0 ; j < ( totalTimes / readerCount ) ; j ++ ) { try { com . geekhua . filequeue . FileQueueImplTest . TestObject m = fq . get ( ) ; results . add ( m ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } } endLatch . countDown ( ) ; } } ) ; readerThread . start ( ) ; } startLatch . countDown ( ) ; endLatch . await ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; com . geekhua . filequeue . FileQueueImplTest . TestObject other = ( ( com . geekhua . filequeue . FileQueueImplTest . TestObject ) ( obj ) ) ; if ( ( count ) != ( other . count ) ) return false ; if ( ( enable ) != ( other . enable ) ) return false ; if ( ( name ) == null ) { if ( ( other . name ) != null ) return false ; } else if ( ! ( name . equals ( other . name ) ) ) return false ; if ( ( pos ) != ( other . pos ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( expected . equals ( results ) )
changePassword_shouldThrowExceptionIfOldPasswordIsNullAndChangingUserHaveNotPrivileges ( ) { executeDataSet ( org . openmrs . api . UserServiceTest . XML_FILENAME_WITH_DATA_FOR_CHANGE_PASSWORD_ACTION ) ; org . openmrs . User user6001 = userService . getUser ( 6001 ) ; "<AssertPlaceHolder>" ; java . lang . String oldPassword = null ; java . lang . String newPassword = "newPasswordString" ; org . openmrs . api . context . Context . authenticate ( user6001 . getUsername ( ) , "userServiceTest" ) ; expectedException . expect ( org . openmrs . api . APIException . class ) ; expectedException . expectMessage ( messages . getMessage ( "error.privilegesRequired" , new java . lang . Object [ ] { org . openmrs . util . PrivilegeConstants . EDIT_USER_PASSWORDS } , null ) ) ; userService . changePassword ( user6001 , oldPassword , newPassword ) ; } hasPrivilege ( java . lang . String ) { if ( RoleConstants . SUPERUSER . equals ( this . role ) ) { return true ; } if ( ( privileges ) != null ) { for ( org . openmrs . Privilege p : privileges ) { if ( p . getPrivilege ( ) . equalsIgnoreCase ( privilegeName ) ) { return true ; } } } return false ; }
org . junit . Assert . assertFalse ( user6001 . hasPrivilege ( PrivilegeConstants . EDIT_USER_PASSWORDS ) )
testConstructorInjectionPointSerializability ( org . jboss . weld . tests . injectionPoint . Consumer ) { javax . enterprise . inject . spi . InjectionPoint ip = consumer . getSheep ( ) . getIp ( ) ; "<AssertPlaceHolder>" ; org . jboss . weld . test . util . Utils . deserialize ( org . jboss . weld . test . util . Utils . serialize ( ip ) ) ; } getIp ( ) { return ip ; }
org . junit . Assert . assertNotNull ( ip )
getWrappedDriver_returnsParent ( ) { org . openqa . selenium . WebDriver driverMock = createNiceMock ( org . openqa . selenium . WebDriver . class ) ; org . openqa . selenium . WebDriver driver = com . vaadin . testbench . TestBench . createDriver ( driverMock ) ; org . openqa . selenium . WebDriver wrappedDriver = ( ( org . openqa . selenium . internal . WrapsDriver ) ( driver ) ) . getWrappedDriver ( ) ; "<AssertPlaceHolder>" ; } getWrappedDriver ( ) { return wrappedDriver ; }
org . junit . Assert . assertEquals ( driverMock , wrappedDriver )
encodeCollectionFormatQueryParam_null ( ) { javax . ws . rs . client . WebTarget target = mock ( javax . ws . rs . client . WebTarget . class ) ; com . oracle . bmc . http . internal . WrappedWebTarget wrapped = new com . oracle . bmc . http . internal . WrappedWebTarget ( target ) ; com . oracle . bmc . http . internal . WrappedWebTarget result = com . oracle . bmc . util . internal . HttpUtils . encodeCollectionFormatQueryParam ( wrapped , "unitTest" , null , CollectionFormatType . Multi ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verifyNoMoreInteractions ( target ) ; } encodeCollectionFormatQueryParam ( com . oracle . bmc . http . internal . WrappedWebTarget , java . lang . String , java . util . List , com . oracle . bmc . util . internal . CollectionFormatType ) { if ( org . apache . commons . lang3 . StringUtils . isBlank ( queryParamName ) ) { throw new java . lang . IllegalArgumentException ( "A<sp>non-blank<sp>queryParamName<sp>must<sp>be<sp>provided" ) ; } if ( ( values != null ) && ( ! ( values . isEmpty ( ) ) ) ) { final java . util . List < java . lang . Object > valuesToUse = new java . util . ArrayList ( ) ; for ( T v : values ) { if ( v == null ) { continue ; } if ( v instanceof java . lang . Enum ) { final java . lang . Object rawValue = com . oracle . bmc . util . internal . ReflectionUtils . invokeGetter ( v , "getValue" ) ; if ( rawValue != null ) { valuesToUse . add ( ( ( java . lang . String ) ( rawValue ) ) ) ; } else { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "Could<sp>not<sp>get<sp>the<sp>correct<sp>value<sp>for<sp>enum<sp>%s" , v . getClass ( ) . getCanonicalName ( ) ) ) ; } } else { valuesToUse . add ( v ) ; } } if ( valuesToUse . isEmpty ( ) ) { return target ; } if ( collectionFormatType == ( CollectionFormatType . CommaSeparated ) ) { target = target . queryParam ( queryParamName , com . oracle . bmc . util . internal . HttpUtils . attemptEncodeQueryParam ( org . apache . commons . lang3 . StringUtils . join ( valuesToUse , ',' ) ) ) ; } else if ( collectionFormatType == ( CollectionFormatType . PipeSeparated ) ) { target = target . queryParam ( queryParamName , com . oracle . bmc . util . internal . HttpUtils . attemptEncodeQueryParam ( org . apache . commons . lang3 . StringUtils . join ( valuesToUse , '|' ) ) ) ; } else if ( collectionFormatType == ( CollectionFormatType . SpaceSeparated ) ) { target = target . queryParam ( queryParamName , com . oracle . bmc . util . internal . HttpUtils . attemptEncodeQueryParam ( org . apache . commons . lang3 . StringUtils . join ( valuesToUse , '<sp>' ) ) ) ; } else if ( collectionFormatType == ( CollectionFormatType . TabSeparated ) ) { target = target . queryParam ( queryParamName , com . oracle . bmc . util . internal . HttpUtils . attemptEncodeQueryParam ( org . apache . commons . lang3 . StringUtils . join ( valuesToUse , '\t' ) ) ) ; } else if ( collectionFormatType == ( CollectionFormatType . Multi ) ) { final java . lang . Object [ ] encodedValuesToUse = new java . lang . Object [ valuesToUse . size ( ) ] ; for ( int i = 0 ; i < ( valuesToUse . size ( ) ) ; i ++ ) { encodedValuesToUse [ i ] = com . oracle . bmc . util . internal . HttpUtils . attemptEncodeQueryParam ( valuesToUse . get ( i ) ) ; } target = target . queryParam ( queryParamName , encodedValuesToUse ) ; } else { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "Unknown<sp>collection<sp>format<sp>type:<sp>%s" , collectionFormatType ) ) ; } } return target ; }
org . junit . Assert . assertTrue ( ( result == wrapped ) )
testQuickSortNaNs ( ) { final double [ ] t = new double [ ] { Double . NaN , 1 , 5 , 2 , 1 , 0 , 9 , 1 , Double . NaN , 2 , 4 , 6 , 8 , 9 , 10 , 12 , 1 , 7 } ; for ( int to = 1 ; to < ( t . length ) ; to ++ ) for ( int from = 0 ; from < to ; from ++ ) { final double [ ] a = t . clone ( ) ; it . unimi . dsi . fastutil . doubles . DoubleBigArrays . quickSort ( it . unimi . dsi . fastutil . doubles . DoubleBigArrays . wrap ( a ) , from , to ) ; for ( int i = to - 1 ; ( i -- ) != from ; ) "<AssertPlaceHolder>" ; } } clone ( ) { return it . unimi . dsi . fastutil . PriorityQueues . EMPTY_QUEUE ; }
org . junit . Assert . assertTrue ( ( ( java . lang . Double . compare ( a [ i ] , a [ ( i + 1 ) ] ) ) <= 0 ) )
addOrder_shouldAddOrderWithNullValues ( ) { org . openmrs . Encounter encounter = new org . openmrs . Encounter ( ) ; encounter . addOrder ( new org . openmrs . Order ( ) ) ; "<AssertPlaceHolder>" ; } getOrders ( ) { if ( ( orders ) == null ) { orders = new java . util . ArrayList ( ) ; } return orders ; }
org . junit . Assert . assertEquals ( 1 , encounter . getOrders ( ) . size ( ) )
getLast ( ) { "<AssertPlaceHolder>" ; } newBag ( ) { return new org . eclipse . collections . impl . bag . sorted . mutable . TreeBag < > ( ) ; }
org . junit . Assert . assertNull ( this . newBag ( ) . getLast ( ) )
testBigQueryQuerySourceEstimatedSize ( ) { java . lang . String queryString = "fake<sp>query<sp>string" ; org . apache . beam . sdk . options . PipelineOptions options = org . apache . beam . sdk . options . PipelineOptionsFactory . create ( ) ; org . apache . beam . sdk . io . gcp . bigquery . BigQueryOptions bqOptions = options . as ( org . apache . beam . sdk . io . gcp . bigquery . BigQueryOptions . class ) ; bqOptions . setProject ( "project" ) ; java . lang . String stepUuid = "testStepUuid" ; org . apache . beam . sdk . io . gcp . bigquery . BigQueryQuerySource < com . google . api . services . bigquery . model . TableRow > bqSource = org . apache . beam . sdk . io . gcp . bigquery . BigQueryQuerySource . create ( stepUuid , ValueProvider . StaticValueProvider . of ( queryString ) , true , true , fakeBqServices , org . apache . beam . sdk . io . gcp . bigquery . TableRowJsonCoder . of ( ) , BigQueryIO . TableRowParser . INSTANCE , QueryPriority . BATCH , null , null ) ; fakeJobService . expectDryRunQuery ( bqOptions . getProject ( ) , queryString , new com . google . api . services . bigquery . model . JobStatistics ( ) . setQuery ( new com . google . api . services . bigquery . model . JobStatistics2 ( ) . setTotalBytesProcessed ( 100L ) ) ) ; "<AssertPlaceHolder>" ; } getEstimatedSizeBytes ( org . apache . beam . sdk . options . PipelineOptions ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 100 , bqSource . getEstimatedSizeBytes ( bqOptions ) )
setVendorErrorCode_stringLength50_vendorErrorCodeIsSet ( ) { java . lang . String length50 = aString ( 50 ) ; request . setVendorErrorCode ( length50 ) ; "<AssertPlaceHolder>" ; } getVendorErrorCode ( ) { return vendorErrorCode ; }
org . junit . Assert . assertThat ( request . getVendorErrorCode ( ) , org . hamcrest . CoreMatchers . equalTo ( length50 ) )
testGetServicePathForNamingNM ( ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIEvent.getServicePathForNaming]" ) ) + "--------<sp>When<sp>mappings<sp>are<sp>enabled,<sp>the<sp>mapped<sp>service<sp>path<sp>is<sp>returned" ) ) ; java . util . HashMap < java . lang . String , java . lang . String > headers = new java . util . HashMap ( ) ; headers . put ( CommonConstants . HEADER_FIWARE_SERVICE_PATH , originalServicePath ) ; headers . put ( NGSIConstants . FLUME_HEADER_MAPPED_SERVICE_PATH , mappedServicePath ) ; headers . put ( NGSIConstants . FLUME_HEADER_GROUPED_SERVICE_PATH , groupedServicePath ) ; byte [ ] body = null ; com . telefonica . iot . cygnus . containers . NotifyContextRequest . ContextElement originalCE = null ; com . telefonica . iot . cygnus . containers . NotifyContextRequest . ContextElement mappedCE = null ; com . telefonica . iot . cygnus . interceptors . NGSIEvent event = new com . telefonica . iot . cygnus . interceptors . NGSIEvent ( headers , body , originalCE , mappedCE ) ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( getTestTraceHead ( "[NGSIEvent.getServicePathForNaming]" ) ) + "-<sp>OK<sp>-<sp>The<sp>grouped<sp>service<sp>path<sp>has<sp>been<sp>returned" ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIEvent.getServicePathForNaming]" ) ) + "-<sp>FAIL<sp>-<sp>The<sp>grouped<sp>service<sp>path<sp>has<sp>not<sp>been<sp>returned" ) ) ; throw e ; } getServicePathForNaming ( boolean , boolean ) { if ( enableGrouping ) { return headers . get ( NGSIConstants . FLUME_HEADER_GROUPED_SERVICE_PATH ) ; } else if ( enableMappings ) { return headers . get ( NGSIConstants . FLUME_HEADER_MAPPED_SERVICE_PATH ) ; } else { return headers . get ( CommonConstants . HEADER_FIWARE_SERVICE_PATH ) ; }
org . junit . Assert . assertEquals ( mappedServicePath , event . getServicePathForNaming ( false , true ) )
testSaveUnknownFile ( ) { long id = 1L ; ru . r2cloud . JsonHttpResponse handler = new ru . r2cloud . JsonHttpResponse ( "r2cloudclienttest/empty-response.json" , 200 ) ; server . setDataMock ( id , handler ) ; client . saveBinary ( id , new java . io . File ( tempFolder . getRoot ( ) , java . util . UUID . randomUUID ( ) . toString ( ) ) ) ; handler . awaitRequest ( ) ; "<AssertPlaceHolder>" ; } getRequest ( ) { if ( ( request ) == null ) { return null ; } return new java . lang . String ( request , java . nio . charset . StandardCharsets . UTF_8 ) ; }
org . junit . Assert . assertNull ( handler . getRequest ( ) )
testCassandraNoHost ( ) { org . ff4j . cassandra . CassandraConnection cc = new org . ff4j . cassandra . CassandraConnection ( ) ; cc . setUserName ( cc . getUserName ( ) ) ; cc . setUserPassword ( cc . getUserPassword ( ) ) ; cc . setHostName ( cc . getHostName ( ) ) ; cc . setPort ( cc . getPort ( ) ) ; cc . setReplicationFactor ( cc . getReplicationFactor ( ) ) ; cc . setCluster ( null ) ; org . ff4j . cassandra . CassandraConnection c2 = new org . ff4j . cassandra . CassandraConnection ( "username" , "password" ) ; "<AssertPlaceHolder>" ; } getUserName ( ) { return userName ; }
org . junit . Assert . assertNotNull ( c2 . getUserName ( ) )
testShouldRemoveAllAccounts ( ) { dao . deleteAll ( ) ; "<AssertPlaceHolder>" ; } readAll ( ) { return org . solovyev . android . db . AndroidDbUtils . doDbQuery ( org . solovyev . android . db . SqliteDao . getSqliteOpenHelper ( ) , new LoadEntity ( org . solovyev . android . db . SqliteDao . getContext ( ) , null , org . solovyev . android . db . SqliteDao . getSqliteOpenHelper ( ) ) ) ; }
org . junit . Assert . assertEquals ( 0 , dao . readAll ( ) . size ( ) )
testTwinIsFunction ( ) { v8 . executeVoidScript ( "function<sp>add(x,<sp>y)<sp>{return<sp>x+y;}" ) ; com . eclipsesource . v8 . V8Function v8Object = ( ( com . eclipsesource . v8 . V8Function ) ( v8 . getObject ( "add" ) ) ) ; com . eclipsesource . v8 . V8Function twin = v8Object . twin ( ) ; "<AssertPlaceHolder>" ; v8Object . close ( ) ; twin . close ( ) ; } twin ( ) { v8 . checkThread ( ) ; checkReleased ( ) ; return ( ( com . eclipsesource . v8 . V8ArrayBuffer ) ( super . twin ( ) ) ) ; }
org . junit . Assert . assertTrue ( ( twin instanceof com . eclipsesource . v8 . V8Function ) )
testListNullInput ( ) { java . util . List < java . lang . String > target = org . oscm . converter . ParameterizedTypes . list ( null , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } list ( java . util . List , java . lang . Class ) { if ( source == null ) { return new java . util . ArrayList < T > ( ) ; } java . util . List < T > target = new java . util . ArrayList < T > ( source . size ( ) ) ; org . oscm . converter . ParameterizedTypes . addAll ( source , target , type ) ; return target ; }
org . junit . Assert . assertNotNull ( target )
isNotSameProductModifiedDate ( ) { updatedMetacard . setModifiedDate ( java . util . Date . from ( java . time . Instant . now ( ) . plusSeconds ( 2 ) ) ) ; "<AssertPlaceHolder>" ; } isSame ( ddf . catalog . data . Metacard , ddf . catalog . data . Metacard ) { if ( ( cachedMetacard == null ) && ( updatedMetacard == null ) ) { return true ; } if ( ( cachedMetacard == null ) || ( updatedMetacard == null ) ) { return false ; } if ( ! ( java . util . Objects . equals ( cachedMetacard . getId ( ) , updatedMetacard . getId ( ) ) ) ) { return false ; } if ( ! ( java . util . Objects . equals ( cachedMetacard . getAttribute ( Core . CHECKSUM ) , updatedMetacard . getAttribute ( Core . CHECKSUM ) ) ) ) { return false ; } return ddf . catalog . cache . impl . CachedResourceMetacardComparator . allMetacardMethodsReturnMatchingAttributes ( cachedMetacard , updatedMetacard ) ; }
org . junit . Assert . assertThat ( ddf . catalog . cache . impl . CachedResourceMetacardComparator . isSame ( cachedMetacard , updatedMetacard ) , org . hamcrest . CoreMatchers . is ( false ) )
testSequence_delta_next ( ) { com . navercorp . pinpoint . common . server . bo . SpanEventBo prev = new com . navercorp . pinpoint . common . server . bo . SpanEventBo ( ) ; com . navercorp . pinpoint . common . server . bo . SpanEventBo current = new com . navercorp . pinpoint . common . server . bo . SpanEventBo ( ) ; prev . setSequence ( ( ( short ) ( 10 ) ) ) ; current . setSequence ( ( ( short ) ( 12 ) ) ) ; com . navercorp . pinpoint . common . server . bo . serializer . trace . v2 . bitfield . SpanEventBitField bitField = com . navercorp . pinpoint . common . server . bo . serializer . trace . v2 . bitfield . SpanEventBitField . build ( current , prev ) ; "<AssertPlaceHolder>" ; } getSequenceEncodingStrategy ( ) { final int set = getBit ( com . navercorp . pinpoint . common . server . bo . serializer . trace . v2 . bitfield . SpanEventBitField . SEQUENCE_ENCODING_STRATEGY ) ; switch ( set ) { case 0 : return SequenceEncodingStrategy . PREV_ADD1 ; case 1 : return SequenceEncodingStrategy . PREV_DELTA ; default : throw new java . lang . IllegalArgumentException ( "SEQUENCE_ENCODING_STRATEGY" ) ; } }
org . junit . Assert . assertEquals ( bitField . getSequenceEncodingStrategy ( ) , SequenceEncodingStrategy . PREV_DELTA )
testIsolatedElements ( ) { org . antlr . v4 . runtime . misc . IntervalSet s = new org . antlr . v4 . runtime . misc . IntervalSet ( ) ; s . add ( 1 ) ; s . add ( 'z' ) ; s . add ( '￰' ) ; java . lang . String expecting = "{1,<sp>122,<sp>65520}" ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getTarget ( ) ) + ":" ) + ( getTestName ( ) ) ; }
org . junit . Assert . assertEquals ( s . toString ( ) , expecting )
testTopN3 ( ) { java . lang . String sqlText = "select<sp>top<sp>2<sp>*<sp>from<sp>foo<sp>union<sp>all<sp>select<sp>*<sp>from<sp>foo2<sp>order<sp>by<sp>1,2" ; java . lang . String expected = "COL1<sp>|COL2<sp>|\n" + ( ( "------------\n" + "<sp>1<sp>|<sp>1<sp>|\n" ) + "<sp>1<sp>|<sp>5<sp>|" ) ; java . sql . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
403 ( ) { com . fujitsu . dc . test . jersey . DcResponse res = requesttoMypassword ( com . fujitsu . dc . test . jersey . cell . auth . MyPasswordTest . MASTER_TOKEN , "password3" , Setup . TEST_CELL1 ) ; "<AssertPlaceHolder>" ; } getStatusCode ( ) { return this . statusCode ; }
org . junit . Assert . assertEquals ( 403 , res . getStatusCode ( ) )
serializableBlob ( ) { org . slim3 . datastore . model . MySerializable value = new org . slim3 . datastore . model . MySerializable ( "aaa" ) ; model . setMySerializableBlob ( value ) ; com . google . appengine . api . datastore . Entity entity = meta . modelToEntity ( model ) ; com . google . appengine . api . datastore . Key key = ds . put ( entity ) ; com . google . appengine . api . datastore . Entity entity2 = ds . get ( key ) ; org . slim3 . datastore . model . Hoge model2 = meta . entityToModel ( entity2 ) ; "<AssertPlaceHolder>" ; } getMySerializableBlob ( ) { return mySerializableBlob ; }
org . junit . Assert . assertThat ( model2 . getMySerializableBlob ( ) , org . hamcrest . CoreMatchers . is ( value ) )
testNietCorrectePeriode ( ) { java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > objectenDieDeRegelOvertreden = brby0904 . voerRegelUit ( null , maakPersoonOverlijden ( maakLand ( "24" , "land" , 19000101 , 19000110 ) , 19000110 ) , maakActie ( "id.actie1" , 19000110 , null ) , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , objectenDieDeRegelOvertreden . size ( ) )
testParseNwProtoErr ( ) { params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( OFPFlowMatch . IP_PROTO , "nw_proto" ) ; } } ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowMatchQuery ( params ) ; "<AssertPlaceHolder>" ; } parse ( ) { if ( ! ( super . parse ( ) ) ) { return false ; } if ( ! ( org . o3project . odenos . core . component . network . BasicQuery . checkMapExactly ( this . actions , new java . lang . String [ ] { } ) ) ) { return false ; } return true ; }
org . junit . Assert . assertThat ( target . parse ( ) , org . hamcrest . CoreMatchers . is ( false ) )
testExecuteJSFunction_V8Object ( ) { com . eclipsesource . v8 . V8Object object = new com . eclipsesource . v8 . V8Object ( v8 ) ; object . add ( "first" , 7 ) . add ( "second" , 8 ) ; v8 . executeVoidScript ( "function<sp>add(p1)<sp>{return<sp>p1.first<sp>+<sp>p1.second;}" ) ; int result = ( ( java . lang . Integer ) ( v8 . executeJSFunction ( "add" , object ) ) ) ; "<AssertPlaceHolder>" ; object . close ( ) ; } executeVoidScript ( java . lang . String ) { executeVoidScript ( script , null , 0 ) ; }
org . junit . Assert . assertEquals ( 15 , result )
whenTwoShipmentsHaveTheSameId_theyShouldBeEqual ( ) { jsprit . core . problem . job . Shipment one = Shipment . Builder . newInstance ( "s" ) . addSizeDimension ( 0 , 10 ) . setPickupLocation ( Location . Builder . newInstance ( ) . setId ( "foo" ) . build ( ) ) . setDeliveryLocation ( jsprit . core . util . TestUtils . loc ( "foofoo" ) ) . setPickupServiceTime ( 10 ) . setDeliveryServiceTime ( 20 ) . build ( ) ; jsprit . core . problem . job . Shipment two = Shipment . Builder . newInstance ( "s" ) . addSizeDimension ( 0 , 10 ) . setPickupLocation ( Location . Builder . newInstance ( ) . setId ( "foo" ) . build ( ) ) . setDeliveryLocation ( jsprit . core . util . TestUtils . loc ( "foofoo" ) ) . setPickupServiceTime ( 10 ) . setDeliveryServiceTime ( 20 ) . build ( ) ; "<AssertPlaceHolder>" ; } loc ( jsprit . core . util . Coordinate ) { return Location . Builder . newInstance ( ) . setCoordinate ( coordinate ) . build ( ) ; }
org . junit . Assert . assertTrue ( one . equals ( two ) )
testClientFactorySerialization ( ) { com . microsoft . jenkins . kubernetes . credentials . SSHCredentials credentials = spy ( new com . microsoft . jenkins . kubernetes . credentials . SSHCredentials ( ) ) ; doReturn ( mock ( com . cloudbees . plugins . credentials . common . StandardUsernameCredentials . class ) ) . when ( credentials ) . getSshCredentials ( any ( hudson . model . Item . class ) ) ; credentials . setSshServer ( "example.com:1234" ) ; com . microsoft . jenkins . kubernetes . credentials . ClientWrapperFactory factory = credentials . buildClientWrapperFactory ( mock ( hudson . model . Item . class ) ) ; byte [ ] bytes = org . apache . commons . lang . SerializationUtils . serialize ( factory ) ; java . lang . Object deserialized = org . apache . commons . lang . SerializationUtils . deserialize ( bytes ) ; "<AssertPlaceHolder>" ; } buildClientWrapperFactory ( hudson . model . Item ) { return new com . microsoft . jenkins . kubernetes . credentials . SSHCredentials . ClientWrapperFactoryImpl ( getHost ( ) , getPort ( ) , getSshCredentials ( owner ) ) ; }
org . junit . Assert . assertTrue ( ( deserialized instanceof com . microsoft . jenkins . kubernetes . credentials . ClientWrapperFactory ) )
testImportResourceRetrieval ( ) { final java . lang . Module testModule = moduleLoader . loadModule ( org . jboss . modules . ModuleClassLoaderTest . MODULE_WITH_CONTENT_ID ) ; final org . jboss . modules . ModuleClassLoader classLoader = testModule . getClassLoader ( ) ; final java . net . URL resUrl = classLoader . getResource ( "testTwo.txt" ) ; "<AssertPlaceHolder>" ; } getResource ( java . lang . String ) { if ( name . startsWith ( "META-INF/services/" ) ) { return servicesMap . get ( name . substring ( "META-INF/services/" . length ( ) ) ) ; } return null ; }
org . junit . Assert . assertNotNull ( resUrl )
testLoadConfigWithGrayRelease ( ) { com . ctrip . framework . apollo . biz . entity . Release grayRelease = mock ( com . ctrip . framework . apollo . biz . entity . Release . class ) ; long grayReleaseId = 999 ; when ( grayReleaseRulesHolder . findReleaseIdFromGrayReleaseRule ( someClientAppId , someClientIp , someConfigAppId , someClusterName , defaultNamespaceName ) ) . thenReturn ( grayReleaseId ) ; when ( releaseService . findActiveOne ( grayReleaseId ) ) . thenReturn ( grayRelease ) ; com . ctrip . framework . apollo . biz . entity . Release release = configService . loadConfig ( someClientAppId , someClientIp , someConfigAppId , someClusterName , defaultNamespaceName , someDataCenter , someNotificationMessages ) ; verify ( releaseService , times ( 1 ) ) . findActiveOne ( grayReleaseId ) ; verify ( releaseService , never ( ) ) . findLatestActiveRelease ( someConfigAppId , someClusterName , defaultNamespaceName ) ; "<AssertPlaceHolder>" ; } findLatestActiveRelease ( java . lang . String , java . lang . String , java . lang . String ) { return releaseRepository . findFirstByAppIdAndClusterNameAndNamespaceNameAndIsAbandonedFalseOrderByIdDesc ( appId , clusterName , namespaceName ) ; }
org . junit . Assert . assertEquals ( grayRelease , release )
equals_differentChildredRecursive ( ) { com . icantrap . collections . dawg . Node lhs = new com . icantrap . collections . dawg . Node ( 'x' ) ; lhs . addChild ( 'a' ) ; lhs . addChild ( 'b' ) . addChild ( 'j' ) ; lhs . addChild ( 'c' ) ; com . icantrap . collections . dawg . Node rhs = new com . icantrap . collections . dawg . Node ( 'x' ) ; rhs . addChild ( 'a' ) ; rhs . addChild ( 'b' ) . addChild ( 'j' ) . addChild ( 'k' ) ; rhs . addChild ( 'c' ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; com . icantrap . collections . dawg . Dawg . Result other = ( ( com . icantrap . collections . dawg . Dawg . Result ) ( obj ) ) ; return word . equals ( other . word ) ; }
org . junit . Assert . assertFalse ( lhs . equals ( rhs ) )
listTest1 ( ) { long agTest1 = agTest . listTest1 ( ) ; "<AssertPlaceHolder>" ; } listTest1 ( ) { return 1 ; }
org . junit . Assert . assertTrue ( ( agTest1 == 2 ) )
makeCompleteFutureSingletonListTest ( ) { java . util . List < org . threadly . concurrent . future . ListenableFuture < ? > > futures = java . util . Collections . singletonList ( org . threadly . concurrent . future . FutureUtils . immediateResultFuture ( null ) ) ; org . threadly . concurrent . future . ListenableFuture < ? > f = org . threadly . concurrent . future . FutureUtils . makeCompleteFuture ( futures ) ; "<AssertPlaceHolder>" ; } makeCompleteFuture ( java . util . List ) { if ( ( futures == null ) || ( futures . isEmpty ( ) ) ) { return ImmediateResultListenableFuture . NULL_RESULT ; } else if ( ( futures . size ( ) ) == 1 ) { return futures . get ( 0 ) ; } else { return org . threadly . concurrent . future . FutureUtils . makeCompleteFuture ( ( ( java . lang . Iterable < ? extends org . threadly . concurrent . future . ListenableFuture < ? > > ) ( futures ) ) ) ; } }
org . junit . Assert . assertTrue ( ( f == ( futures . get ( 0 ) ) ) )
testLatticeComp ( ) { java . net . URL audioFileURL = new java . io . File ( "src/test/edu/cmu/sphinx/result/test/green.wav" ) . toURI ( ) . toURL ( ) ; java . net . URL configURL = new java . io . File ( "src/test/edu/cmu/sphinx/result/test/config.xml" ) . toURI ( ) . toURL ( ) ; edu . cmu . sphinx . util . props . ConfigurationManager cm = new edu . cmu . sphinx . util . props . ConfigurationManager ( configURL ) ; edu . cmu . sphinx . recognizer . Recognizer recognizer = ( ( edu . cmu . sphinx . recognizer . Recognizer ) ( cm . lookup ( "recognizer" ) ) ) ; edu . cmu . sphinx . frontend . util . StreamDataSource reader = ( ( edu . cmu . sphinx . frontend . util . StreamDataSource ) ( cm . lookup ( "streamDataSource" ) ) ) ; javax . sound . sampled . AudioInputStream ais = javax . sound . sampled . AudioSystem . getAudioInputStream ( audioFileURL ) ; edu . cmu . sphinx . result . Lattice lattice = new edu . cmu . sphinx . result . Lattice ( result ) ; lattice . dumpAISee ( "logs/lattice.gdl" , "lattice" ) ; recognizer . deallocate ( ) ; cm = new edu . cmu . sphinx . util . props . ConfigurationManager ( configURL ) ; edu . cmu . sphinx . util . props . ConfigurationManagerUtils . setProperty ( cm , "keepAllTokens" , "true" ) ; recognizer = ( ( edu . cmu . sphinx . recognizer . Recognizer ) ( cm . lookup ( "recognizer" ) ) ) ; recognizer . allocate ( ) ; reader = ( ( edu . cmu . sphinx . frontend . util . StreamDataSource ) ( cm . lookup ( "streamDataSource" ) ) ) ; reader . setInputStream ( javax . sound . sampled . AudioSystem . getAudioInputStream ( audioFileURL ) ) ; edu . cmu . sphinx . result . Result allResult = recognizer . recognize ( ) ; edu . cmu . sphinx . result . Lattice allLattice = new edu . cmu . sphinx . result . Lattice ( allResult ) ; allLattice . dumpAISee ( "logs/allLattice.gdl" , "All<sp>Lattice" ) ; "<AssertPlaceHolder>" ; } isEquivalent ( edu . cmu . sphinx . result . Edge ) { double diff = ( java . lang . Math . abs ( acousticScore ) ) * 1.0E-5 ; return ( ( ( java . lang . Math . abs ( ( ( acousticScore ) - ( other . getAcousticScore ( ) ) ) ) ) <= diff ) && ( ( lmScore ) == ( other . getLMScore ( ) ) ) ) && ( ( fromNode . isEquivalent ( other . getFromNode ( ) ) ) && ( toNode . isEquivalent ( other . getToNode ( ) ) ) ) ; }
org . junit . Assert . assertTrue ( lattice . isEquivalent ( allLattice ) )
testIndexPutWithLongDataTypes ( ) { org . apache . hadoop . fs . Path basedir = new org . apache . hadoop . fs . Path ( ( ( DIR ) + "TestIndexPut" ) ) ; org . apache . hadoop . conf . Configuration conf = TEST_UTIL . getConfiguration ( ) ; org . apache . hadoop . hbase . HTableDescriptor htd = new org . apache . hadoop . hbase . HTableDescriptor ( "testIndexPutWithNegativeIntDataTypes" ) ; org . apache . hadoop . hbase . HRegionInfo info = new org . apache . hadoop . hbase . HRegionInfo ( htd . getName ( ) , "ABC" . getBytes ( ) , "BBB" . getBytes ( ) , false ) ; org . apache . hadoop . hbase . regionserver . HRegion region = org . apache . hadoop . hbase . regionserver . HRegion . createHRegion ( info , basedir , conf , htd ) ; org . apache . hadoop . hbase . index . IndexSpecification spec = new org . apache . hadoop . hbase . index . IndexSpecification ( "index" ) ; spec . addIndexColumn ( new org . apache . hadoop . hbase . HColumnDescriptor ( "col" ) , "ql1" , ValueType . Long , 4 ) ; byte [ ] value1 = org . apache . hadoop . hbase . util . Bytes . toBytes ( ( - 2562351L ) ) ; org . apache . hadoop . hbase . client . Put p = new org . apache . hadoop . hbase . client . Put ( "row" . getBytes ( ) ) ; p . add ( "col" . getBytes ( ) , "ql1" . getBytes ( ) , value1 ) ; org . apache . hadoop . hbase . client . Put indexPut = org . apache . hadoop . hbase . index . util . IndexUtils . prepareIndexPut ( p , spec , region ) ; long a = - 2562351L ; byte [ ] expectedResult = org . apache . hadoop . hbase . util . Bytes . toBytes ( ( a ^ ( 1L << 63 ) ) ) ; byte [ ] actualResult = new byte [ 8 ] ; byte [ ] indexRowKey = indexPut . getRow ( ) ; java . lang . System . arraycopy ( indexRowKey , 22 , actualResult , 0 , actualResult . length ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object , java . lang . Object ) { return ( ( x == null ) && ( y == null ) ) || ( ( x != null ) && ( x . equals ( y ) ) ) ; }
org . junit . Assert . assertTrue ( org . apache . hadoop . hbase . util . Bytes . equals ( expectedResult , actualResult ) )
testNewCookie4 ( ) { boolean pass = true ; java . lang . String NewCookie_toParse = "Customer=WILE_E_COYOTE;<sp>Path=/acme;<sp>Domain=acme.com;<sp>Max-Age=150000000;<sp>" + "Expires=Thu,<sp>03-May-2018<sp>10:36:34<sp>GMT;<sp>Secure;<sp>HttpOnly" ; java . lang . String name = "customer" ; java . lang . String value = "wile_e_coyote" ; java . lang . String path = "/acme" ; java . lang . String domain = "acme.com" ; int version = 1 ; java . lang . String comment = "" ; int maxAge = 150000000 ; java . util . GregorianCalendar cal = new java . util . GregorianCalendar ( 2018 , java . util . Calendar . MAY , 3 , 10 , 36 , 34 ) ; cal . setTimeZone ( java . util . TimeZone . getTimeZone ( "UTC" ) ) ; java . util . Date expiry = cal . getTime ( ) ; boolean secure = true ; boolean httpOnly = true ; javax . ws . rs . core . NewCookie nck28 = javax . ws . rs . core . NewCookie . valueOf ( NewCookie_toParse ) ; pass = verifyNewCookie ( nck28 , name , value , path , domain , version , comment , maxAge , expiry , secure , httpOnly ) ; "<AssertPlaceHolder>" ; } valueOf ( java . lang . String ) { if ( qvalue == null ) return org . jboss . resteasy . core . request . QualityValue . DEFAULT ; return new org . jboss . resteasy . core . request . QualityValue ( org . jboss . resteasy . core . request . QualityValue . parseAsInteger ( qvalue ) ) ; }
org . junit . Assert . assertEquals ( nck28 , javax . ws . rs . core . NewCookie . valueOf ( nck28 . toString ( ) ) )
testHandlerGenericFail ( ) { org . apache . flume . source . MultiportSyslogTCPSource . MultiportSyslogHandler handler = new org . apache . flume . source . MultiportSyslogTCPSource . MultiportSyslogHandler ( 1000 , 10 , new org . apache . flume . channel . ChannelProcessor ( new org . apache . flume . channel . ReplicatingChannelSelector ( ) ) , new org . apache . flume . instrumentation . SourceCounter ( "test" ) , null , null , null , new org . apache . flume . source . MultiportSyslogTCPSource . ThreadSafeDecoder ( com . google . common . base . Charsets . UTF_8 ) , new java . util . concurrent . ConcurrentHashMap < java . lang . Integer , org . apache . flume . source . MultiportSyslogTCPSource . ThreadSafeDecoder > ( ) , null ) ; handler . exceptionCaught ( null , new java . lang . RuntimeException ( "dummy" ) ) ; org . apache . flume . instrumentation . SourceCounter sc = ( ( org . apache . flume . instrumentation . SourceCounter ) ( org . mockito . internal . util . reflection . Whitebox . getInternalState ( handler , "sourceCounter" ) ) ) ; "<AssertPlaceHolder>" ; } getGenericProcessingFail ( ) { return get ( org . apache . flume . instrumentation . SourceCounter . COUNTER_GENERIC_PROCESSING_FAIL ) ; }
org . junit . Assert . assertEquals ( 1 , sc . getGenericProcessingFail ( ) )
testGetMapping_int ( ) { org . openscience . cdk . interfaces . IReaction reaction = ( ( org . openscience . cdk . interfaces . IReaction ) ( newChemObject ( ) ) ) ; org . openscience . cdk . interfaces . IMapping mapping = reaction . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IMapping . class , reaction . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) , reaction . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ) ; reaction . addMapping ( mapping ) ; org . openscience . cdk . interfaces . IMapping gotIt = reaction . getMapping ( 0 ) ; "<AssertPlaceHolder>" ; } getMapping ( int ) { return map [ pos ] ; }
org . junit . Assert . assertEquals ( mapping , gotIt )
startPositionShouldBeExclusive ( ) { int startPosition = 0 ; checkpoint = new org . apache . beam . sdk . io . synthetic . SyntheticRecordsCheckpoint ( startPosition , sourceOptions . numRecords ) ; UnboundedSource . UnboundedReader < org . apache . beam . sdk . values . KV < byte [ ] , byte [ ] > > reader = source . createReader ( pipeline . getOptions ( ) , checkpoint ) ; reader . start ( ) ; org . apache . beam . sdk . values . KV < byte [ ] , byte [ ] > currentElement = reader . getCurrent ( ) ; org . apache . beam . sdk . values . KV < byte [ ] , byte [ ] > expectedElement = sourceOptions . genRecord ( ( startPosition + 1 ) ) . kv ; "<AssertPlaceHolder>" ; } genRecord ( long ) { long hashCodeOfPosition = hashFunction ( ) . hashLong ( position ) . asLong ( ) ; return new org . apache . beam . sdk . io . synthetic . SyntheticSourceOptions . Record ( genKvPair ( hashCodeOfPosition ) , nextDelay ( hashCodeOfPosition ) ) ; }
org . junit . Assert . assertEquals ( expectedElement , currentElement )
checkBatchMode_when_batchSizeZero_and_bothInherit ( ) { io . ebean . TxScope scope = new io . ebean . TxScope ( ) ; scope . setBatch ( PersistBatch . INHERIT ) ; scope . setBatchOnCascade ( PersistBatch . INHERIT ) ; scope . checkBatchMode ( ) ; "<AssertPlaceHolder>" ; } getBatch ( ) { return batch ; }
org . junit . Assert . assertEquals ( scope . getBatch ( ) , PersistBatch . INHERIT )
testGridWithProperLengthANDProperDelimiter_fail ( ) { expected = "Either<sp>Length<sp>Or<sp>Delimiter<sp>should<sp>be<sp>given" ; mixedSchemeGridRule . validate ( getSchema ( "1" , "|" ) , "schema" ) ; "<AssertPlaceHolder>" ; } getErrorMessage ( ) { return errorMessage ; }
org . junit . Assert . assertEquals ( expected , mixedSchemeGridRule . getErrorMessage ( ) )
serialize_multiple ( ) { java . util . List < ezvcard . VCard > vcards = new java . util . ArrayList < ezvcard . VCard > ( ) ; ezvcard . VCard vcard = new ezvcard . VCard ( ) ; vcard . setFormattedName ( "John<sp>Doe" ) ; vcards . add ( vcard ) ; vcard = new ezvcard . VCard ( ) ; vcard . setFormattedName ( "Jane<sp>Doe" ) ; vcards . add ( vcard ) ; ezvcard . io . json . JCardModule module = new ezvcard . io . json . JCardModule ( ) ; module . setAddProdId ( false ) ; mapper . registerModule ( module ) ; java . lang . String actual = mapper . writeValueAsString ( vcards ) ; java . lang . String expected = "[" + ( ( ( ( ( ( ( ( ( ( ( ( "[\"vcard\"," + "[" ) + "[\"version\",{},\"text\",\"4.0\"]," ) + "[\"fn\",{},\"text\",\"John<sp>Doe\"]" ) + "]" ) + "]," ) + "[\"vcard\"," ) + "[" ) + "[\"version\",{},\"text\",\"4.0\"]," ) + "[\"fn\",{},\"text\",\"Jane<sp>Doe\"]" ) + "]" ) + "]" ) + "]" ) ; "<AssertPlaceHolder>" ; } setAddProdId ( boolean ) { this . addProdId = addProdId ; }
org . junit . Assert . assertEquals ( expected , actual )
getPropertyId_normal_returnsNAME ( ) { com . vaadin . v7 . data . util . sqlcontainer . ColumnProperty cp = new com . vaadin . v7 . data . util . sqlcontainer . ColumnProperty ( "NAME" , false , false , true , false , "Ville" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } getPropertyId ( ) { return propertyId ; }
org . junit . Assert . assertEquals ( "NAME" , cp . getPropertyId ( ) )
packageDirectories_empty_canUnzip ( ) { java . io . File output = tempFolder . newFile ( "output.zip" ) ; MavenResolvedArtifactImpl . PackageDirHelper . packageDirectories ( output ) ; java . io . File outputFolder = tempFolder . newFolder ( "outputFolder" ) ; "<AssertPlaceHolder>" ; } canUnzip ( java . io . File , java . io . File ) { byte [ ] buffer = new byte [ 1024 ] ; try ( java . util . zip . ZipInputStream zis = new java . util . zip . ZipInputStream ( new java . io . FileInputStream ( zipFile ) ) ) { java . util . zip . ZipEntry ze = zis . getNextEntry ( ) ; while ( ze != null ) { java . lang . String fileName = ze . getName ( ) ; java . io . File newFile = new java . io . File ( outputFolder , fileName ) ; org . apache . commons . io . FileUtils . forceMkdir ( newFile . getParentFile ( ) ) ; try ( java . io . FileOutputStream fos = new java . io . FileOutputStream ( newFile ) ) { int len ; while ( ( len = zis . read ( buffer ) ) > 0 ) { fos . write ( buffer , 0 , len ) ; } } ze = zis . getNextEntry ( ) ; } return true ; } catch ( java . io . IOException ex ) { return false ; } }
org . junit . Assert . assertTrue ( canUnzip ( output , outputFolder ) )
testValidSubject ( ) { final javax . security . auth . Subject subject = new javax . security . auth . Subject ( true , java . util . Collections . singleton ( new org . apache . jackrabbit . oak . spi . security . authentication . PreAuthTest . TestPrincipal ( ) ) , java . util . Collections . < java . lang . Object > emptySet ( ) , java . util . Collections . < java . lang . Object > emptySet ( ) ) ; org . apache . jackrabbit . oak . api . ContentSession cs = javax . security . auth . Subject . doAsPrivileged ( subject , new java . security . PrivilegedAction < org . apache . jackrabbit . oak . api . ContentSession > ( ) { @ org . apache . jackrabbit . oak . spi . security . authentication . Override public org . apache . jackrabbit . oak . api . ContentSession run ( ) { try { return login ( null ) ; } catch ( java . lang . Exception e ) { return null ; } } } , null ) ; try { "<AssertPlaceHolder>" ; } finally { if ( cs != null ) { cs . close ( ) ; } } } getAuthInfo ( ) { checkLive ( ) ; java . util . Set < org . apache . jackrabbit . oak . api . AuthInfo > infoSet = loginContext . getSubject ( ) . getPublicCredentials ( org . apache . jackrabbit . oak . api . AuthInfo . class ) ; if ( infoSet . isEmpty ( ) ) { return org . apache . jackrabbit . oak . api . AuthInfo . EMPTY ; } else { return infoSet . iterator ( ) . next ( ) ; } }
org . junit . Assert . assertSame ( AuthInfo . EMPTY , cs . getAuthInfo ( ) )
testGetTimestamp ( ) { when ( mockedProject . hasPermission ( AbstractProject . CONFIGURE ) ) . thenReturn ( true ) ; when ( mockedRequest . getParameter ( any ( java . lang . String . class ) ) ) . thenReturn ( "2012-11-21_11-41-14" ) ; hudson . plugins . jobConfigHistory . JobConfigHistoryProjectAction sut = createAction ( ) ; "<AssertPlaceHolder>" ; } getTimestamp ( int ) { if ( ( ! ( hasConfigurePermission ( ) ) ) && ( ! ( hasReadExtensionPermission ( ) ) ) ) { checkConfigurePermission ( ) ; return null ; } java . lang . String timeStamp = this . getRequestParameter ( ( "timestamp" + timestampNumber ) ) ; java . text . SimpleDateFormat format = new java . text . SimpleDateFormat ( "yyyy-MM-dd_HH-mm-ss" ) ; try { format . setLenient ( false ) ; format . parse ( timeStamp ) ; return timeStamp ; } catch ( java . text . ParseException e ) { return null ; } }
org . junit . Assert . assertEquals ( "2012-11-21_11-41-14" , sut . getTimestamp ( 1 ) )
implicitsIncludeOtherTemplates ( ) { java . lang . String html = rocker . ImplicitA . template ( ) . implicit ( "a" ) . render ( ) . toString ( ) ; java . lang . String expected = "a11a" ; "<AssertPlaceHolder>" ; } toString ( ) { byte [ ] bytes = toByteArray ( ) ; return new java . lang . String ( bytes , this . charset ) ; }
org . junit . Assert . assertEquals ( expected , html )
testUnsaturatedF ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( UNSATURATED ) ; org . openscience . cdk . interfaces . IAtom atom = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; org . openscience . cdk . interfaces . IBond bond = mock ( org . openscience . cdk . interfaces . IBond . class ) ; when ( bond . getOrder ( ) ) . thenReturn ( IBond . Order . SINGLE ) ; when ( atom . bonds ( ) ) . thenReturn ( java . util . Collections . singletonList ( bond ) ) ; "<AssertPlaceHolder>" ; } matches ( org . openscience . cdk . interfaces . IAtomContainer ) { return matches ( atomContainer , true ) ; }
org . junit . Assert . assertFalse ( expr . matches ( atom ) )
messageSourceWithParams ( ) { java . lang . String message = "Hola" ; java . lang . String code = "sayHi" ; java . lang . String defaultMessage = null ; java . lang . Object [ ] params = new java . lang . Object [ ] { 1 , 2 , 3 } ; @ com . github . jknack . handlebars . springmvc . SuppressWarnings ( "unchecked" ) java . util . Map < java . lang . String , java . lang . Object > hash = createMock ( java . util . Map . class ) ; expect ( hash . get ( "default" ) ) . andReturn ( defaultMessage ) ; com . github . jknack . handlebars . Handlebars hbs = createMock ( com . github . jknack . handlebars . Handlebars . class ) ; com . github . jknack . handlebars . Context ctx = createMock ( com . github . jknack . handlebars . Context . class ) ; com . github . jknack . handlebars . Template fn = createMock ( com . github . jknack . handlebars . Template . class ) ; com . github . jknack . handlebars . Options options = new com . github . jknack . handlebars . Options . Builder ( hbs , "messageSource" , com . github . jknack . handlebars . TagType . VAR , ctx , fn ) . setParams ( params ) . setHash ( hash ) . build ( ) ; org . springframework . context . MessageSource messageSource = createMock ( org . springframework . context . MessageSource . class ) ; expect ( messageSource . getMessage ( eq ( code ) , eq ( params ) , eq ( defaultMessage ) , isA ( java . util . Locale . class ) ) ) . andReturn ( message ) ; replay ( messageSource , hash ) ; java . lang . Object result = new com . github . jknack . handlebars . springmvc . MessageSourceHelper ( messageSource ) . apply ( code , options ) ; "<AssertPlaceHolder>" ; verify ( messageSource , hash ) ; } apply ( java . lang . Object , com . github . jknack . handlebars . Options ) { if ( context == null ) { return options . hash ( "default" , "" ) ; } java . lang . String viewName = options . hash ( "view" , "" ) ; com . fasterxml . jackson . core . JsonGenerator generator = null ; try { final com . fasterxml . jackson . databind . ObjectWriter writer ; if ( ! ( Handlebars . Utils . isEmpty ( viewName ) ) ) { java . lang . Class < ? > viewClass = alias . get ( viewName ) ; if ( viewClass == null ) { viewClass = getClass ( ) . getClassLoader ( ) . loadClass ( viewName ) ; } writer = mapper . writerWithView ( viewClass ) ; } else { writer = mapper . writer ( ) ; } com . fasterxml . jackson . core . JsonFactory jsonFactory = mapper . getFactory ( ) ; com . fasterxml . jackson . core . io . SegmentedStringWriter output = new com . fasterxml . jackson . core . io . SegmentedStringWriter ( jsonFactory . _getBufferRecycler ( ) ) ; generator = jsonFactory . createJsonGenerator ( output ) ; java . lang . Boolean escapeHtml = options . hash ( "escapeHTML" , Boolean . FALSE ) ; if ( escapeHtml ) { generator . setCharacterEscapes ( new com . github . jknack . handlebars . Jackson2Helper . HtmlEscapes ( ) ) ; } java . lang . Boolean pretty = options . hash ( "pretty" , Boolean . FALSE ) ; if ( pretty ) { writer . withDefaultPrettyPrinter ( ) . writeValue ( generator , context ) ; } else { writer . writeValue ( generator , context ) ; } generator . close ( ) ; return new com . github . jknack . handlebars . Handlebars . SafeString ( output . getAndClear ( ) ) ; } catch ( java . lang . ClassNotFoundException ex ) { throw new java . lang . IllegalArgumentException ( viewName , ex ) ; } finally { if ( ( generator != null ) && ( ! ( generator . isClosed ( ) ) ) ) { generator . close ( ) ; } } }
org . junit . Assert . assertEquals ( message , result )
copyBRForEmptyString ( ) { org . slim3 . util . BeanUtilTest . SrcBR src = new org . slim3 . util . BeanUtilTest . SrcBR ( ) ; src . aaa = "" ; org . slim3 . tester . MockServletContext servletContext = new org . slim3 . tester . MockServletContext ( ) ; org . slim3 . tester . MockHttpServletRequest dest = new org . slim3 . tester . MockHttpServletRequest ( servletContext ) ; dest . setAttribute ( "aaa" , "111" ) ; org . slim3 . util . BeanUtil . copy ( src , dest ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return attributeMap . get ( name ) ; }
org . junit . Assert . assertThat ( ( ( java . lang . String ) ( dest . getAttribute ( "aaa" ) ) ) , org . hamcrest . CoreMatchers . is ( "" ) )
testBare_CreateRepositoryFromGitDirOnlyWithBareConfigTrue ( ) { java . io . File gitDir = getFile ( "workdir" , "repoWithConfig" ) ; setBare ( gitDir , true ) ; org . eclipse . jgit . lib . Repository repo = new org . eclipse . jgit . storage . file . FileRepositoryBuilder ( ) . setGitDir ( gitDir ) . build ( ) ; "<AssertPlaceHolder>" ; } isBare ( ) { return bare ; }
org . junit . Assert . assertTrue ( repo . isBare ( ) )
testGetDelivererByName_nonExistent ( ) { boolean caughtException = false ; org . kuali . rice . kcb . deliverer . MessageDeliverer deliverer = services . getMessageDelivererRegistryService ( ) . getDelivererByName ( TestConstants . NON_EXISTENT_DELIVERER_NAME ) ; "<AssertPlaceHolder>" ; } getDelivererByName ( java . lang . String ) { if ( org . apache . commons . lang . StringUtils . isBlank ( messageDelivererName ) ) { throw new org . kuali . rice . core . api . exception . RiceIllegalArgumentException ( "messageDelivererName<sp>is<sp>null<sp>or<sp>blank" ) ; } java . lang . Class < ? extends org . kuali . rice . kcb . deliverer . MessageDeliverer > clazz = messageDelivererTypes . get ( messageDelivererName . toLowerCase ( ) ) ; if ( clazz == null ) { org . kuali . rice . kcb . service . impl . MessageDelivererRegistryServiceImpl . LOG . error ( ( ( ( ( "The<sp>message<sp>deliverer<sp>type<sp>('" + messageDelivererName ) + "')<sp>" ) + "<sp>was<sp>not<sp>found<sp>in<sp>the<sp>message<sp>deliverer<sp>registry.<sp>This<sp>deliverer<sp>" ) + "plugin<sp>is<sp>not<sp>in<sp>the<sp>system." ) ) ; return null ; } org . kuali . rice . kcb . deliverer . MessageDeliverer messageDeliverer = null ; try { messageDeliverer = clazz . newInstance ( ) ; } catch ( java . lang . InstantiationException e ) { org . kuali . rice . kcb . service . impl . MessageDelivererRegistryServiceImpl . LOG . error ( e . getStackTrace ( ) ) ; } catch ( java . lang . IllegalAccessException e ) { org . kuali . rice . kcb . service . impl . MessageDelivererRegistryServiceImpl . LOG . error ( e . getStackTrace ( ) ) ; } return messageDeliverer ; }
org . junit . Assert . assertNull ( deliverer )