input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testIsRemoveMultiLineComments ( ) { classUnderTest . setRemoveMultiLineComments ( true ) ; "<AssertPlaceHolder>" ; } isRemoveMultiLineComments ( ) { return removeMultiLineComments ; }
|
org . junit . Assert . assertEquals ( true , classUnderTest . isRemoveMultiLineComments ( ) )
|
testUnwrapForNull ( ) { "<AssertPlaceHolder>" ; } unwrap ( java . lang . Class ) { if ( clazz == null ) { return null ; } if ( clazz . isPrimitive ( ) ) { return clazz ; } if ( ! ( cz . zcu . kiv . jop . util . PrimitiveUtils . isWrapper ( clazz ) ) ) { return clazz ; } java . lang . String name = clazz . getName ( ) ; int c10 = name . charAt ( 10 ) ; int c12 = name . charAt ( 12 ) ; int mapper = ( ( ( c10 + c10 ) + c10 ) + 5 ) & ( 118 - c12 ) ; return cz . zcu . kiv . jop . util . PrimitiveUtils . primitives . get ( mapper ) ; }
|
org . junit . Assert . assertNull ( cz . zcu . kiv . jop . util . PrimitiveUtils . unwrap ( null ) )
|
IsItemReturnedAsJON ( ) { java . lang . String url = ( ( catalogURL ( ) ) + "/catalog/" ) + ( iPodNano . getId ( ) ) ; com . ewolff . microservice . catalog . Item body = getForMediaType ( com . ewolff . microservice . catalog . Item . class , MediaType . APPLICATION_JSON , url ) ; "<AssertPlaceHolder>" ; } getForMediaType ( java . lang . Class , org . springframework . http . MediaType , java . lang . String ) { org . springframework . http . HttpHeaders headers = new org . springframework . http . HttpHeaders ( ) ; headers . setAccept ( java . util . Arrays . asList ( mediaType ) ) ; org . springframework . http . HttpEntity < java . lang . String > entity = new org . springframework . http . HttpEntity < java . lang . String > ( "parameters" , headers ) ; org . springframework . http . ResponseEntity < T > resultEntity = restTemplate . exchange ( url , HttpMethod . GET , entity , value ) ; return resultEntity . getBody ( ) ; }
|
org . junit . Assert . assertThat ( body , equalTo ( iPodNano ) )
|
testSplitByMaterialGroupForPartialGroups ( ) { de . javagl . obj . Obj obj = de . javagl . obj . ObjReader . read ( getClass ( ) . getResourceAsStream ( "/fourTrianglesPartiallyInMaterialGroups.obj" ) ) ; java . util . Map < java . lang . String , de . javagl . obj . Obj > objs = de . javagl . obj . ObjSplitting . splitByMaterialGroups ( obj ) ; "<AssertPlaceHolder>" ; } splitByMaterialGroups ( de . javagl . obj . ReadableObj ) { java . util . Map < java . lang . String , de . javagl . obj . Obj > objs = new java . util . LinkedHashMap < java . lang . String , de . javagl . obj . Obj > ( ) ; int numMaterialGroups = obj . getNumMaterialGroups ( ) ; for ( int i = 0 ; i < numMaterialGroups ; i ++ ) { de . javagl . obj . ObjGroup materialGroup = obj . getMaterialGroup ( i ) ; if ( ( materialGroup . getNumFaces ( ) ) > 0 ) { java . lang . String materialGroupName = materialGroup . getName ( ) ; de . javagl . obj . Obj materialGroupObj = de . javagl . obj . ObjUtils . groupToObj ( obj , materialGroup , null ) ; objs . put ( materialGroupName , materialGroupObj ) ; } } return objs ; }
|
org . junit . Assert . assertEquals ( 2 , objs . size ( ) )
|
getOrCreateShouldNotCreateNorModifyValueIfExist ( ) { referencableDaoService . getOrCreate ( ConfigRefEnum . ACHIEVEMENTS_REFRESH_RATE , "1" ) ; referencableDaoService . getOrCreate ( ConfigRefEnum . ACHIEVEMENTS_REFRESH_RATE , "2" ) ; "<AssertPlaceHolder>" ; } get ( com . atlassian . crowd . embedded . api . User ) { return get ( confluenceUser . getName ( ) ) ; }
|
org . junit . Assert . assertThat ( referencableDaoService . get ( ConfigRefEnum . ACHIEVEMENTS_REFRESH_RATE ) . getValue ( ) , org . hamcrest . core . Is . is ( "1" ) )
|
testGetLocalizedStringExactMatchLanguageCountryFrench ( ) { org . pentaho . metadata . model . concept . types . LocalizedString s = new org . pentaho . metadata . model . concept . types . LocalizedString ( ) ; s . setString ( "fr_FR_WIN" , "fr_FR_WIN<sp>value" ) ; s . setString ( "fr_FR" , "fr_FR<sp>value" ) ; s . setString ( "fr" , "fr<sp>value" ) ; s . setString ( LocalizedString . DEFAULT_LOCALE , "default<sp>value" ) ; "<AssertPlaceHolder>" ; } getLocalizedString ( java . lang . String ) { java . lang . String str = getString ( locale ) ; java . lang . String tmpLocale = locale ; while ( ( ( stringIsEmpty ( str ) ) && ( tmpLocale != null ) ) && ( ( tmpLocale . indexOf ( '_' ) ) > 0 ) ) { tmpLocale = tmpLocale . substring ( 0 , tmpLocale . lastIndexOf ( '_' ) ) ; str = getString ( tmpLocale ) ; } if ( ! ( stringIsEmpty ( str ) ) ) { return str ; } else { return getString ( org . pentaho . metadata . model . concept . types . LocalizedString . DEFAULT_LOCALE ) ; } }
|
org . junit . Assert . assertEquals ( "fr_FR<sp>value" , s . getLocalizedString ( "fr_FR" ) )
|
testJoinThread ( ) { java . lang . Object lock = new java . lang . Object ( ) ; int count = 5 ; com . jim . framework . web . SpringbootApplicationTests . StarData starData = new com . jim . framework . web . SpringbootApplicationTests . StarData ( count ) ; java . lang . Thread thread0 = new java . lang . Thread ( new com . jim . framework . web . SpringbootApplicationTests . ThreadJoin ( count , 0 , starData ) ) ; java . lang . Thread thread1 = new java . lang . Thread ( new com . jim . framework . web . SpringbootApplicationTests . ThreadJoin ( count , 1 , starData ) ) ; java . lang . Thread thread2 = new java . lang . Thread ( new com . jim . framework . web . SpringbootApplicationTests . ThreadJoin ( count , 2 , starData ) ) ; java . lang . Thread thread3 = new java . lang . Thread ( new com . jim . framework . web . SpringbootApplicationTests . ThreadJoin ( count , 3 , starData ) ) ; java . lang . Thread thread4 = new java . lang . Thread ( new com . jim . framework . web . SpringbootApplicationTests . ThreadJoin ( count , 4 , starData ) ) ; thread0 . start ( ) ; thread1 . start ( ) ; thread2 . start ( ) ; thread3 . start ( ) ; thread4 . start ( ) ; logger . info ( "test<sp>end" ) ; java . lang . Thread . sleep ( 3000 ) ; "<AssertPlaceHolder>" ; } start ( ) { com . jim . framework . dubbo . core . context . RpcTraceContext . clear ( ) ; }
|
org . junit . Assert . assertTrue ( true )
|
transform_route6_leading_zeroes ( ) { final net . ripe . db . whois . common . rpsl . RpslObject rpslObject = net . ripe . db . whois . common . rpsl . RpslObject . parse ( ( "" + ( "route6:<sp>2001:1578:0200::/40\n" + "origin:<sp>AS12321" ) ) ) ; final net . ripe . db . whois . common . rpsl . RpslObject result = attributeSanitizer . sanitize ( rpslObject , objectMessages ) ; "<AssertPlaceHolder>" ; verify ( objectMessages ) . addMessage ( result . findAttribute ( AttributeType . ROUTE6 ) , net . ripe . db . whois . common . rpsl . ValidationMessages . attributeValueConverted ( "2001:1578:0200::/40" , "2001:1578:200::/40" ) ) ; verifyNoMoreInteractions ( objectMessages ) ; } getValueForAttribute ( net . ripe . db . whois . common . rpsl . AttributeType ) { return findAttribute ( attributeType ) . getCleanValue ( ) ; }
|
org . junit . Assert . assertThat ( result . getValueForAttribute ( AttributeType . ROUTE6 ) . toString ( ) , org . hamcrest . Matchers . is ( "2001:1578:200::/40" ) )
|
handleResultStoresState ( ) { org . apache . beam . runners . local . StructuralKey < ? > myKey = org . apache . beam . runners . local . StructuralKey . of ( "foo" . getBytes ( org . apache . beam . runners . direct . portable . UTF_8 ) , org . apache . beam . sdk . coders . ByteArrayCoder . of ( ) ) ; org . apache . beam . runners . direct . portable . StepStateAndTimers fooContext = context . getStateAndTimers ( downstreamProducer , myKey ) ; org . apache . beam . runners . core . StateTag < org . apache . beam . sdk . state . BagState < java . lang . Integer > > intBag = org . apache . beam . runners . core . StateTags . bag ( "myBag" , org . apache . beam . sdk . coders . VarIntCoder . of ( ) ) ; org . apache . beam . runners . direct . portable . CopyOnAccessInMemoryStateInternals < ? > state = fooContext . stateInternals ( ) ; org . apache . beam . sdk . state . BagState < java . lang . Integer > bag = state . state ( org . apache . beam . runners . core . StateNamespaces . global ( ) , intBag ) ; bag . add ( 1 ) ; bag . add ( 2 ) ; bag . add ( 4 ) ; org . apache . beam . runners . direct . portable . TransformResult < ? > stateResult = org . apache . beam . runners . direct . portable . StepTransformResult . withoutHold ( downstreamProducer ) . withState ( state ) . build ( ) ; context . handleResult ( context . createKeyedBundle ( myKey , created ) . commit ( org . joda . time . Instant . now ( ) ) , org . apache . beam . vendor . guava . v20_0 . com . google . common . collect . ImmutableList . of ( ) , stateResult ) ; org . apache . beam . runners . direct . portable . StepStateAndTimers afterResultContext = context . getStateAndTimers ( downstreamProducer , myKey ) ; org . apache . beam . runners . direct . portable . CopyOnAccessInMemoryStateInternals < ? > afterResultState = afterResultContext . stateInternals ( ) ; "<AssertPlaceHolder>" ; } state ( org . apache . beam . runners . core . StateNamespace , org . apache . beam . runners . core . StateTag ) { return state ( stateNamespace , stateTag , org . apache . beam . sdk . state . StateContexts . nullContext ( ) ) ; }
|
org . junit . Assert . assertThat ( afterResultState . state ( org . apache . beam . runners . core . StateNamespaces . global ( ) , intBag ) . read ( ) , org . hamcrest . Matchers . contains ( 1 , 2 , 4 ) )
|
whenJavaSerializedToXmlFile_thenCorrect ( ) { com . fasterxml . jackson . dataformat . xml . XmlMapper xmlMapper = new com . fasterxml . jackson . dataformat . xml . XmlMapper ( ) ; xmlMapper . writeValue ( new java . io . File ( "target/simple_bean.xml" ) , new com . baeldung . jackson . xml . SimpleBean ( ) ) ; java . io . File file = new java . io . File ( "target/simple_bean.xml" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( file )
|
greaterThanOrEqualQuery ( ) { addDocument ( "foo" , 1 ) ; addDocument ( "foo" , 2 ) ; com . google . cloud . firestore . QuerySnapshot querySnapshot = randomColl . whereGreaterThanOrEqualTo ( "foo" , 1 ) . get ( ) . get ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return struct . getFieldsMap ( ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , querySnapshot . size ( ) )
|
URLnull ( ) { java . lang . String relationName = getRelationFromRelationClassUrl ( "https://example.com/test0110/__relation/box/" ) ; "<AssertPlaceHolder>" ; } getRelationFromRelationClassUrl ( java . lang . String ) { java . lang . String relationName = null ; log . debug ( java . lang . String . format ( "RequestRelation<sp>URI<sp>=<sp>[%s]" , relationClassUrl ) ) ; java . util . regex . Pattern pattern = java . util . regex . Pattern . compile ( ".+/([^/]+)/__relation/([^/]+)/([^/]+)/?" ) ; java . util . regex . Matcher m = pattern . matcher ( relationClassUrl ) ; if ( ! ( m . matches ( ) ) ) { log . debug ( java . lang . String . format ( "RequestRelation<sp>URI<sp>if<sp>not<sp>relationClassUrl<sp>format.<sp>[%s]" , relationClassUrl ) ) ; return relationName ; } relationName = m . replaceAll ( "$3" ) ; log . debug ( java . lang . String . format ( "RequestRelation<sp>URI<sp>Path<sp>=<sp>[%s]" , relationName ) ) ; return relationName ; }
|
org . junit . Assert . assertEquals ( null , relationName )
|
testGetJobExecution ( ) { final javax . batch . operations . JobOperator mockJobOperator = mockery . mock ( javax . batch . operations . JobOperator . class ) ; final javax . transaction . TransactionManager mockTranMgr = mockery . mock ( javax . transaction . TransactionManager . class ) ; final javax . transaction . Transaction mockTran = mockery . mock ( javax . transaction . Transaction . class ) ; final javax . batch . runtime . JobExecution retMe = mockery . mock ( javax . batch . runtime . JobExecution . class ) ; mockery . checking ( new org . jmock . Expectations ( ) { { oneOf ( mockTranMgr ) . suspend ( ) ; will ( returnValue ( mockTran ) ) ; oneOf ( mockJobOperator ) . getJobExecution ( 0 ) ; will ( returnValue ( retMe ) ) ; oneOf ( mockTranMgr ) . resume ( mockTran ) ; } } ) ; "<AssertPlaceHolder>" ; } buildJobOperator ( javax . batch . operations . JobOperator , javax . transaction . TransactionManager ) { com . ibm . jbatch . container . api . impl . JobOperatorImplSuspendTran retMe = new com . ibm . jbatch . container . api . impl . JobOperatorImplSuspendTran ( ) ; retMe . setTransactionManager ( mockTranMgr ) ; retMe . setJobOperator ( mockJobOperator ) ; return retMe ; }
|
org . junit . Assert . assertEquals ( retMe , buildJobOperator ( mockJobOperator , mockTranMgr ) . getJobExecution ( 0 ) )
|
getPathIsCorrect ( ) { final java . lang . String iotHubHostname = "test.iothub" ; final java . lang . String deviceId = "test-deviceid" ; final java . lang . String path = "test-path" ; new mockit . NonStrictExpectations ( ) { { mockIotHubUri . getPath ( ) ; result = path ; } } ; com . microsoft . azure . sdk . iot . device . net . IotHubMessageUri messageUri = new com . microsoft . azure . sdk . iot . device . net . IotHubMessageUri ( iotHubHostname , deviceId , "" ) ; java . lang . String testPath = messageUri . getPath ( ) ; final java . lang . String expectedPath = path ; "<AssertPlaceHolder>" ; } getPath ( ) { return this . path ; }
|
org . junit . Assert . assertThat ( testPath , org . hamcrest . CoreMatchers . is ( expectedPath ) )
|
testCreateTxtHostVmwareWithEmptyIPAddress ( ) { com . intel . mtwilson . datatypes . TxtHostRecord hostObj = new com . intel . mtwilson . datatypes . TxtHostRecord ( ) ; hostObj . HostName = "10.1.71.146" ; hostObj . Port = 0 ; hostObj . AddOn_Connection_String = "https://10.1.71.87:443/sdk;Administrator;P@ssw0rd" ; hostObj . BIOS_Name = "EPSD" ; hostObj . BIOS_Oem = "EPSD" ; hostObj . BIOS_Version = "v60" ; hostObj . Description = "Test" ; hostObj . Email = "" ; hostObj . IPAddress = "" ; hostObj . VMM_Name = "ESXi" ; hostObj . VMM_Version = "5.0.0-469512" ; hostObj . VMM_OSName = "VMware_ESXi" ; hostObj . VMM_OSVersion = "5.0.0" ; com . intel . mtwilson . datatypes . TxtHost hostAddObj = new com . intel . mtwilson . datatypes . TxtHost ( hostObj ) ; "<AssertPlaceHolder>" ; } getHostName ( ) { return hostName ; }
|
org . junit . Assert . assertTrue ( ( ( hostAddObj . getHostName ( ) ) != null ) )
|
testAll ( ) { final java . util . Collection < org . drools . verifier . core . index . select . SelectNoMatchesTest . Address > all = select . all ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return map . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( all . isEmpty ( ) )
|
testEqualsSelf ( ) { org . jfree . data . time . Year year = new org . jfree . data . time . Year ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . jfree . data . xy . YWithXInterval ) ) { return false ; } org . jfree . data . xy . YWithXInterval that = ( ( org . jfree . data . xy . YWithXInterval ) ( obj ) ) ; if ( ( this . y ) != ( that . y ) ) { return false ; } if ( ( this . xLow ) != ( that . xLow ) ) { return false ; } if ( ( this . xHigh ) != ( that . xHigh ) ) { return false ; } return true ; }
|
org . junit . Assert . assertTrue ( year . equals ( year ) )
|
testCreate ( ) { org . oscarehr . common . model . OcanFormOption entity = new org . oscarehr . common . model . OcanFormOption ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
|
org . junit . Assert . assertNotNull ( entity . getId ( ) )
|
shouldStartWithNoGraphs ( ) { final java . util . Collection < uk . gov . gchq . gaffer . graph . Graph > graphs = graphStorage . get ( nullUser , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , graphs . size ( ) )
|
_7 ( ) { int actual = new fr . inria . lille . examples . tcas . Tcas ( ) . is_upward_preferred ( 0 , 0 , 99 ) ; "<AssertPlaceHolder>" ; } is_upward_preferred ( int , int , int ) { int bias ; if ( 0 != inhibit ) { bias = down_sep ; } else { bias = up_sep ; } if ( bias > down_sep ) { return 1 ; } else { return 0 ; } }
|
org . junit . Assert . assertEquals ( 0 , actual )
|
test_bounce_wchar ( ) { char result = server . bounce_wchar ( org . jacorb . test . orb . CharTest . EURO_SIGN ) ; "<AssertPlaceHolder>" ; } bounce_wchar ( char ) { return x ; }
|
org . junit . Assert . assertEquals ( org . jacorb . test . orb . CharTest . EURO_SIGN , result )
|
testV8ArrayMethodCalledFromScriptWithResult ( ) { com . eclipsesource . v8 . V8CallbackTest . ICallback callback = mock ( com . eclipsesource . v8 . V8CallbackTest . ICallback . class ) ; com . eclipsesource . v8 . V8Array array = new com . eclipsesource . v8 . V8Array ( v8 ) ; array . push ( "john" ) ; doReturn ( array ) . when ( callback ) . v8ArrayMethodNoParameters ( ) ; v8 . registerJavaMethod ( callback , "v8ArrayMethodNoParameters" , "foo" , new java . lang . Class < ? > [ 0 ] ) ; com . eclipsesource . v8 . V8Array result = v8 . executeArrayScript ( "foo();" ) ; "<AssertPlaceHolder>" ; result . close ( ) ; } getString ( java . lang . String ) { throw new java . lang . UnsupportedOperationException ( ) ; }
|
org . junit . Assert . assertEquals ( "john" , result . getString ( 0 ) )
|
testRemovingGeneratedFile ( ) { com . github . jhonnymertz . wkhtmltopdf . wrapper . Pdf pdf = new com . github . jhonnymertz . wkhtmltopdf . wrapper . Pdf ( ) ; pdf . addPageFromString ( "<html><head><meta<sp>charset=\"utf-8\"></head><h1>Page<sp>1</h1></html>" ) ; pdf . addPageFromString ( "<html><head><meta<sp>charset=\"utf-8\"></head><h1>Page<sp>2</h1></html>" ) ; pdf . addPageFromUrl ( "http://www.google.com" ) ; pdf . addPageFromString ( "<html><head><meta<sp>charset=\"utf-8\"></head><h1>Page<sp>4</h1></html>" ) ; java . io . File savedPdf = pdf . saveAs ( "output.pdf" ) ; "<AssertPlaceHolder>" ; } saveAs ( java . lang . String ) { java . io . File file = new java . io . File ( path ) ; org . apache . commons . io . FileUtils . writeByteArrayToFile ( file , getPDF ( ) ) ; com . github . jhonnymertz . wkhtmltopdf . wrapper . Pdf . logger . info ( "PDF<sp>successfully<sp>saved<sp>in<sp>{}" , file . getAbsolutePath ( ) ) ; return file ; }
|
org . junit . Assert . assertTrue ( savedPdf . delete ( ) )
|
testVerifyValidSig ( ) { java . lang . String signature ; boolean result ; signature = digSig . sign ( dataToSign , privateKey ) ; result = digSig . verify ( dataToSign , signature , publicKey ) ; "<AssertPlaceHolder>" ; } verify ( java . lang . String , java . lang . String , java . security . PublicKey ) { byte [ ] dataBytes ; if ( ( ( data == null ) || ( signature == null ) ) || ( publicKey == null ) ) { android . util . Log . w ( org . societies . security . digsig . sign . DigSig . TAG , ( ( ( "verify():<sp>All<sp>parameters<sp>must<sp>be<sp>non-null:<sp>" + data ) + ",<sp>" ) + signature ) ) ; return false ; } dataBytes = str2bytes ( data ) ; return verify ( dataBytes , signature , publicKey ) ; }
|
org . junit . Assert . assertTrue ( result )
|
testGetByBarcodeListNone ( ) { java . util . List < java . lang . String > barcodes = new java . util . ArrayList ( ) ; barcodes . add ( "asdf" ) ; barcodes . add ( "jkl;" ) ; "<AssertPlaceHolder>" ; } getByBarcodeList ( java . util . Collection ) { if ( barcodeList . isEmpty ( ) ) { return java . util . Collections . emptyList ( ) ; } org . hibernate . Criteria criteria = currentSession ( ) . createCriteria ( uk . ac . bbsrc . tgac . miso . core . data . impl . SampleImpl . class ) ; criteria . add ( org . hibernate . criterion . Restrictions . in ( "identificationBarcode" , barcodeList ) ) ; @ uk . ac . bbsrc . tgac . miso . persistence . impl . SuppressWarnings ( "unchecked" ) java . util . List < uk . ac . bbsrc . tgac . miso . core . data . Sample > records = criteria . list ( ) ; return records ; }
|
org . junit . Assert . assertEquals ( 0 , dao . getByBarcodeList ( barcodes ) . size ( ) )
|
testExonicThreePrimeOma1 ( ) { final java . lang . String outPath = runJannovarOnVCFLine ( "/sv_header.vcf" , "1\t58946502\t.\tN\t<INS>\t.\t.\tSVTYPE=INS;END=58946502" ) ; final java . lang . String expected = "1\t58946502\t.\tN\t<INS>\t.\t.\tEND=58946502;" + ( "SVANN=insertion&3_prime_UTR_exon_variant&structural_variant&coding_transcript_variant|HIGH|OMA1|" + "115209|transcript|NM_145243.3|Coding|;SVTYPE=INS" ) ; final java . lang . String actual = loadVcfBody ( outPath ) ; "<AssertPlaceHolder>" ; } loadVcfBody ( java . lang . String ) { return java . util . Arrays . asList ( com . google . common . io . Files . asCharSource ( new de . charite . compbio . jannovar . cmd . annotate_vcf . File ( outPath ) , Charsets . UTF_8 ) . read ( ) . split ( "\r?\n" ) ) . stream ( ) . filter ( ( line ) -> ! ( line . startsWith ( "#" ) ) ) . collect ( java . util . stream . Collectors . joining ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testMatchExactlyLinkIdErr ( ) { queriesString = "type=node&enabled=true&path=link_id=link01" ; target = new org . o3project . odenos . core . component . network . flow . query . BasicFlowQuery ( queriesString ) ; target . parse ( ) ; java . util . List < org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch > matches = null ; java . util . List < java . lang . String > path = null ; java . util . Map < java . lang . String , java . util . List < org . o3project . odenos . core . component . network . flow . basic . FlowAction > > edgeAction = null ; java . util . Map < java . lang . String , java . lang . String > flowAttributes = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; org . o3project . odenos . core . component . network . flow . basic . BasicFlow flow = new org . o3project . odenos . core . component . network . flow . basic . BasicFlow ( "1" , "" , "" , true , "" , "established" , matches , path , edgeAction , flowAttributes ) ; org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch match1 = new org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch ( ) ; org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch match2 = new org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch ( ) ; org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch match3 = new org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch ( ) ; org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch match4 = new org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch ( ) ; flow . addMatch ( match1 ) ; flow . addMatch ( match2 ) ; flow . addMatch ( match3 ) ; flow . addMatch ( match4 ) ; "<AssertPlaceHolder>" ; } matchExactly ( org . o3project . odenos . core . component . network . flow . basic . FlowAction ) { if ( ( target == null ) || ( ! ( target . getType ( ) . equals ( org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionCopyTtlOut . class . getSimpleName ( ) ) ) ) ) { return false ; } return true ; }
|
org . junit . Assert . assertThat ( target . matchExactly ( flow ) , org . hamcrest . CoreMatchers . is ( false ) )
|
testGetParametersWithDefaultEntityAndDisabledSecurity ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . reason . Reason entity = new org . lnu . is . domain . reason . Reason ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testUIComputation ( ) { populate ( ) ; org . openqa . selenium . WebElement button = driver . findElement ( org . openqa . selenium . By . tagName ( "Button" ) ) ; button . click ( ) ; org . openqa . selenium . WebElement texts = driver . findElement ( org . openqa . selenium . By . tagName ( "text" ) ) ; "<AssertPlaceHolder>" ; } getText ( ) { logger . info ( ( "Getting<sp>text<sp>for<sp>element:<sp>" + ( this . toString ( ) ) ) ) ; if ( "input" . equals ( we . getTagName ( ) ) ) { return this . we . getAttribute ( "value" ) ; } return this . we . getText ( ) ; }
|
org . junit . Assert . assertEquals ( texts . getText ( ) , java . lang . String . valueOf ( ( ( values . get ( 0 ) ) + ( values . get ( 1 ) ) ) ) )
|
moveFile_theSourceFileShouldNotExist ( ) { initRepository ( ) ; writeToCache ( "/source.txt" ) ; commitToMaster ( ) ; initGitFileSystem ( ) ; com . beijunyi . parallelgit . filesystem . GitPath source = gfs . getPath ( "/source.txt" ) ; com . beijunyi . parallelgit . filesystem . GitPath target = gfs . getPath ( "/target.txt" ) ; com . beijunyi . parallelgit . filesystem . Files . move ( source , target ) ; "<AssertPlaceHolder>" ; } getPath ( java . net . URI ) { com . beijunyi . parallelgit . filesystem . GitFileSystem gfs = getFileSystem ( uri ) ; java . lang . String file = com . beijunyi . parallelgit . filesystem . utils . GfsUriUtils . getFile ( uri ) ; return gfs . getPath ( file ) . toRealPath ( ) ; }
|
org . junit . Assert . assertFalse ( com . beijunyi . parallelgit . filesystem . Files . exists ( source ) )
|
testBuildAndSearchRealPositionalIndex ( ) { int peterRank = positionalBuildSearchGetRank ( "-dimension<sp>200<sp>-vectortype<sp>real<sp>-seedlength<sp>10<sp>-luceneindexpath<sp>positional_index" , "-queryvectorfile<sp>termtermvectors.bin<sp>simon" , new java . lang . String [ ] { "termtermvectors.bin" , "docvectors.bin" } , "peter" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( ( peterRank < 20 ) )
|
testLista ( ) { log . debug ( "Debiera<sp>mostrar<sp>lista<sp>de<sp>paquetes" ) ; mx . edu . um . mateo . general . model . Usuario usuario = obtieneUsuario ( ) ; mx . edu . um . mateo . contabilidad . facturas . model . InformeEmpleado informe = null ; for ( int i = 0 ; i < 20 ; i ++ ) { informe = new mx . edu . um . mateo . contabilidad . facturas . model . InformeEmpleado ( ) ; informe . setEmpresa ( usuario . getEmpresa ( ) ) ; informe . setNumNomina ( "054" ) ; informe . setNombreEmpleado ( "Sam" ) ; informe . setFechaInforme ( new java . util . Date ( ) ) ; informe . setDolares ( Boolean . TRUE ) ; informe . setInforme ( Boolean . TRUE ) ; informe . setPesos ( Boolean . TRUE ) ; informe . setReembolso ( Boolean . TRUE ) ; informe . setStatus ( "a" ) ; currentSession ( ) . save ( informe ) ; "<AssertPlaceHolder>" ; } this . mockMvc . perform ( get ( Constantes . PATH_INFORMEEMPLEADO ) ) . andExpect ( forwardedUrl ( ( ( "/WEB-INF/jsp/" + ( mx . edu . um . mateo . general . utils . Constantes . PATH_INFORMEEMPLEADO_LISTA ) ) + ".jsp" ) ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_INFORMESEMPLEADO ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINACION ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINAS ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINA ) ) ; } getId ( ) { return id ; }
|
org . junit . Assert . assertNotNull ( informe . getId ( ) )
|
testSumUngroupedHavingAggregation2 ( ) { java . lang . String tablename = generateUniqueName ( ) ; java . lang . String tenantId = getOrganizationId ( ) ; java . lang . String query = ( "SELECT<sp>sum(unique_users),sum(cpu_utilization),sum(transactions),sum(db_utilization),sum(response_time)<sp>FROM<sp>" + tablename ) + "<sp>WHERE<sp>organization_id=?<sp>HAVING<sp>sum(unique_users)<sp>><sp>200<sp>AND<sp>sum(db_utilization)<sp>><sp>5" ; java . util . Properties props = org . apache . phoenix . util . PropertiesUtil . deepCopy ( org . apache . phoenix . end2end . TEST_PROPERTIES ) ; java . sql . Connection conn = java . sql . DriverManager . getConnection ( getUrl ( ) , props ) ; try { org . apache . phoenix . end2end . ProductMetricsIT . initTableValues ( tablename , tenantId , org . apache . phoenix . end2end . ProductMetricsIT . getSplits ( tenantId ) ) ; java . sql . PreparedStatement statement = conn . prepareStatement ( query ) ; statement . setString ( 1 , tenantId ) ; java . sql . ResultSet rs = statement . executeQuery ( ) ; "<AssertPlaceHolder>" ; } finally { conn . close ( ) ; } } next ( ) { if ( ! ( org . apache . phoenix . util . CursorUtil . moreValues ( cursorName ) ) ) { return null ; } else if ( ( fetchSize ) == ( rowsRead ) ) { return null ; } org . apache . phoenix . schema . tuple . Tuple next = delegate . next ( ) ; org . apache . phoenix . util . CursorUtil . updateCursor ( cursorName , next , delegate . peek ( ) ) ; ( rowsRead ) ++ ; return next ; }
|
org . junit . Assert . assertFalse ( rs . next ( ) )
|
shouldChangeDirection_WhenReflectedFromHorisontalUpToDown ( ) { com . codenjoy . dojo . pong . model . BallDirection ballDirection = new com . codenjoy . dojo . pong . model . BallDirection ( com . codenjoy . dojo . services . QDirection . UP ) ; com . codenjoy . dojo . pong . model . BallDirection reflectedDirection = ballDirection . reflectedFrom ( horisontalWall ) ; com . codenjoy . dojo . pong . model . BallDirection expectedDirection = new com . codenjoy . dojo . pong . model . BallDirection ( com . codenjoy . dojo . services . QDirection . DOWN ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; com . codenjoy . dojo . reversi . services . Events events = ( ( com . codenjoy . dojo . reversi . services . Events ) ( o ) ) ; if ( ( count ) != ( events . count ) ) return false ; return name . equals ( events . name ) ; }
|
org . junit . Assert . assertTrue ( expectedDirection . equals ( reflectedDirection ) )
|
testGetSourcesSsrcAndRid ( ) { org . jitsi . jicofo . RtpDescriptionPacketExtension rtpDescriptionPacketExtension = new org . jitsi . jicofo . RtpDescriptionPacketExtension ( ) ; rtpDescriptionPacketExtension . setMedia ( "video" ) ; org . jitsi . jicofo . SourcePacketExtension ssrcOne = new org . jitsi . jicofo . SourcePacketExtension ( ) ; ssrcOne . setSSRC ( 12345678L ) ; rtpDescriptionPacketExtension . addChildExtension ( ssrcOne ) ; org . jitsi . jicofo . SourcePacketExtension ssrcTwo = new org . jitsi . jicofo . SourcePacketExtension ( ) ; ssrcTwo . setSSRC ( 23456789L ) ; rtpDescriptionPacketExtension . addChildExtension ( ssrcTwo ) ; org . jitsi . jicofo . SourcePacketExtension ridOne = new org . jitsi . jicofo . SourcePacketExtension ( ) ; ridOne . setAttribute ( "rid" , "1" ) ; rtpDescriptionPacketExtension . addChildExtension ( ridOne ) ; org . jitsi . jicofo . SourcePacketExtension ridTwo = new org . jitsi . jicofo . SourcePacketExtension ( ) ; ridTwo . setAttribute ( "rid" , "2" ) ; rtpDescriptionPacketExtension . addChildExtension ( ridTwo ) ; org . jitsi . jicofo . ContentPacketExtension content = new org . jitsi . jicofo . ContentPacketExtension ( ) ; content . setName ( "video" ) ; content . addChildExtension ( rtpDescriptionPacketExtension ) ; org . jitsi . jicofo . MediaSourceMap result = org . jitsi . jicofo . MediaSourceMap . getSourcesFromContent ( org . jitsi . jicofo . Collections . singletonList ( content ) ) ; org . jitsi . jicofo . List < org . jitsi . jicofo . SourcePacketExtension > sources = result . getSourcesForMedia ( "video" ) ; "<AssertPlaceHolder>" ; } getSourcesForMedia ( java . lang . String ) { return sources . computeIfAbsent ( mediaType , ( k ) -> new org . jitsi . protocol . xmpp . util . CopyOnWriteArrayList < > ( ) ) ; }
|
org . junit . Assert . assertEquals ( 4 , sources . size ( ) )
|
testSave_customProcessorAnno_withGetter ( ) { com . gh . mygreen . xlsmapper . XlsMapperTest . CustomAnnoSheet outSheet = new com . gh . mygreen . xlsmapper . XlsMapperTest . CustomAnnoSheet ( ) ; outSheet . setCustomProcessor ( "" ) ; com . gh . mygreen . xlsmapper . xml . bind . AnnotationMappingInfo xmlInfo = createXml ( ) . classInfo ( createClass ( com . gh . mygreen . xlsmapper . XlsMapperTest . CustomAnnoSheet . class ) . method ( createMethod ( "getCustomProcessor" ) . annotation ( createAnnotation ( com . gh . mygreen . xlsmapper . XlsMapperTest . CustomProcessorAnno . class ) . attribute ( "address" , "B3" ) . buildAnnotation ( ) ) . buildMethod ( ) ) . buildClass ( ) ) . buildXml ( ) ; mapper . getConiguration ( ) . setAnnotationMapping ( xmlInfo ) ; java . io . File outFile = new java . io . File ( com . gh . mygreen . xlsmapper . XlsMapperTest . OUT_DIR , outFilename ) ; try ( java . io . InputStream template = new java . io . FileInputStream ( templateFile ) ; java . io . OutputStream out = new java . io . FileOutputStream ( outFile ) ) { mapper . save ( template , out , outSheet ) ; } try ( java . io . InputStream in = new java . io . FileInputStream ( outFile ) ) { com . gh . mygreen . xlsmapper . validation . SheetBindingErrors < com . gh . mygreen . xlsmapper . XlsMapperTest . CustomAnnoSheet > errors = mapper . loadDetail ( in , com . gh . mygreen . xlsmapper . XlsMapperTest . CustomAnnoSheet . class ) ; com . gh . mygreen . xlsmapper . XlsMapperTest . CustomAnnoSheet sheet = errors . getTarget ( ) ; "<AssertPlaceHolder>" . isEqualTo ( outSheet . customProcessor ) ; } } getTarget ( ) { return target ; }
|
org . junit . Assert . assertThat ( sheet . customProcessor )
|
testAdaptNull ( ) { "<AssertPlaceHolder>" ; } adapt ( org . apache . commons . functor . Predicate ) { return null == predicate ? null : new org . apache . commons . functor . adapter . PredicateFunction < A > ( predicate ) ; }
|
org . junit . Assert . assertNull ( org . apache . commons . functor . adapter . PredicateFunction . adapt ( null ) )
|
testEditOtherSourceThrowsError ( ) { javax . servlet . http . HttpSession session = mock ( javax . servlet . http . HttpSession . class ) ; when ( servletRequest . getSession ( ) ) . thenReturn ( session ) ; when ( localeManager . getLocale ( ) ) . thenReturn ( new java . util . Locale ( "us" , "EN" ) ) ; org . orcid . pojo . ajaxForm . FundingForm funding = fundingController . getFundingJson ( java . lang . Long . valueOf ( "3" ) ) ; boolean throwsError = false ; try { fundingController . postFunding ( funding ) ; } catch ( java . lang . Exception e ) { throwsError = true ; } "<AssertPlaceHolder>" ; } postFunding ( org . orcid . pojo . ajaxForm . FundingForm ) { funding . setErrors ( new java . util . ArrayList < java . lang . String > ( ) ) ; removeEmptyExternalIds ( funding ) ; validateName ( funding ) ; validateAmount ( funding ) ; validateCurrency ( funding ) ; validateTitle ( funding ) ; validateTranslatedTitle ( funding ) ; validateDescription ( funding ) ; validateUrl ( funding ) ; validateDates ( funding ) ; validateExternalIdentifiers ( funding ) ; validateType ( funding ) ; validateOrganizationDefinedType ( funding ) ; validateCity ( funding ) ; validateRegion ( funding ) ; validateCountry ( funding ) ; copyErrors ( funding . getCity ( ) , funding ) ; copyErrors ( funding . getRegion ( ) , funding ) ; copyErrors ( funding . getCountry ( ) , funding ) ; copyErrors ( funding . getFundingName ( ) , funding ) ; copyErrors ( funding . getAmount ( ) , funding ) ; copyErrors ( funding . getCurrencyCode ( ) , funding ) ; copyErrors ( funding . getFundingTitle ( ) . getTitle ( ) , funding ) ; copyErrors ( funding . getDescription ( ) , funding ) ; copyErrors ( funding . getUrl ( ) , funding ) ; copyErrors ( funding . getFundingType ( ) , funding ) ; if ( ( funding . getStartDate ( ) ) != null ) copyErrors ( funding . getStartDate ( ) , funding ) ; if ( ( funding . getEndDate ( ) ) != null ) copyErrors ( funding . getEndDate ( ) , funding ) ; if ( ( funding . getFundingTitle ( ) . getTranslatedTitle ( ) ) != null ) copyErrors ( funding . getFundingTitle ( ) . getTranslatedTitle ( ) , funding ) ; if ( ( funding . getOrganizationDefinedFundingSubType ( ) ) != null ) copyErrors ( funding . getOrganizationDefinedFundingSubType ( ) . getSubtype ( ) , funding ) ; for ( org . orcid . pojo . ajaxForm . ActivityExternalIdentifier extId : funding . getExternalIdentifiers ( ) ) { if ( ( extId . getExternalIdentifierType ( ) ) != null ) copyErrors ( extId . getExternalIdentifierType ( ) , funding ) ; if ( ( extId . getUrl ( ) ) != null ) copyErrors ( extId . getUrl ( ) , funding ) ; if ( ( extId . getExternalIdentifierId ( ) ) != null ) copyErrors ( extId . getExternalIdentifierId ( ) , funding ) ; } if ( funding . getErrors ( ) . isEmpty ( ) ) { if ( org . orcid . pojo . ajaxForm . PojoUtil . isEmpty ( funding . getPutCode ( ) ) ) { addFunding ( funding ) ; } else { editFunding ( funding ) ; } } return funding ; }
|
org . junit . Assert . assertEquals ( throwsError , true )
|
testContainsOnOverlappingSets ( ) { edu . ucla . sspace . util . Set < java . lang . Integer > set1 = new edu . ucla . sspace . util . HashSet < java . lang . Integer > ( ) ; edu . ucla . sspace . util . Set < java . lang . Integer > set2 = new edu . ucla . sspace . util . HashSet < java . lang . Integer > ( ) ; for ( int i = 0 ; i < 5 ; ++ i ) { set1 . add ( i ) ; set2 . add ( ( i + 1 ) ) ; } edu . ucla . sspace . util . List < edu . ucla . sspace . util . Set < java . lang . Integer > > sets = new edu . ucla . sspace . util . ArrayList < edu . ucla . sspace . util . Set < java . lang . Integer > > ( ) ; sets . add ( set1 ) ; sets . add ( set2 ) ; edu . ucla . sspace . util . Set < java . lang . Integer > combined = new edu . ucla . sspace . util . CombinedSet < java . lang . Integer > ( sets ) ; for ( int i = 0 ; i < 6 ; ++ i ) "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { if ( ! ( o instanceof edu . ucla . sspace . graph . WeightedDirectedTypedEdge ) ) return false ; @ edu . ucla . sspace . graph . SuppressWarnings ( "unchecked" ) edu . ucla . sspace . graph . WeightedDirectedTypedEdge < T > e = ( ( edu . ucla . sspace . graph . WeightedDirectedTypedEdge < T > ) ( o ) ) ; if ( ( e . from ( ) ) == ( rootVertex ) ) { java . util . Set < edu . ucla . sspace . graph . WeightedDirectedTypedEdge < T > > edges = outEdges . get ( e . to ( ) ) ; return edges . contains ( e ) ; } else if ( ( e . to ( ) ) == ( rootVertex ) ) { java . util . Set < edu . ucla . sspace . graph . WeightedDirectedTypedEdge < T > > edges = inEdges . get ( e . from ( ) ) ; return edges . contains ( e ) ; } return false ; }
|
org . junit . Assert . assertTrue ( combined . contains ( i ) )
|
testIsRemotePackage ( ) { java . util . Properties p = new java . util . Properties ( ) ; p . setProperty ( "org.opennms.netmgt.ConfigFileConstants" , "ERROR" ) ; org . opennms . core . test . MockLogAppender . setupLogging ( p ) ; org . opennms . netmgt . config . poller . Package pkg = new org . opennms . netmgt . config . poller . Package ( ) ; pkg . setName ( "SFO" ) ; pkg . setRemote ( true ) ; org . opennms . netmgt . poller . Poller poller = new org . opennms . netmgt . poller . Poller ( ) ; "<AssertPlaceHolder>" ; poller = null ; } pollableServiceInPackage ( java . lang . String , java . lang . String , org . opennms . netmgt . config . poller . Package ) { if ( pkg . getRemote ( ) ) { org . opennms . netmgt . poller . Poller . LOG . debug ( "pollableServiceInPackage:<sp>this<sp>package:<sp>{},<sp>is<sp>a<sp>remote<sp>monitor<sp>package." , pkg . getName ( ) ) ; return false ; } if ( ! ( m_pollerConfig . isServiceInPackageAndEnabled ( serviceName , pkg ) ) ) return false ; boolean inPkg = m_pollerConfig . isInterfaceInPackage ( ipAddr , pkg ) ; if ( inPkg ) return true ; if ( m_initialized ) { m_pollerConfig . rebuildPackageIpListMap ( ) ; return m_pollerConfig . isInterfaceInPackage ( ipAddr , pkg ) ; } return false ; }
|
org . junit . Assert . assertFalse ( poller . pollableServiceInPackage ( null , null , pkg ) )
|
resultsInNullExtension ( ) { java . util . Map < java . lang . String , java . lang . Object > map = org . n52 . sos . statistics . sos . models . ExtensionEsModel . convert ( ( ( org . n52 . shetland . ogc . ows . extension . Extension < ? > ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } convert ( org . n52 . shetland . ogc . ows . extension . Extension ) { return new org . n52 . sos . statistics . sos . models . ExtensionEsModel ( extension ) . getAsMap ( ) ; }
|
org . junit . Assert . assertNull ( map )
|
testIsAssumeIdentity ( ) { policy . setAnonymousAccessAllowed ( true ) ; "<AssertPlaceHolder>" ; } isAssumeIdentity ( org . apache . activemq . shiro . ConnectionReference ) { return ( isAnonymousAccessAllowed ( ) ) || ( ( isSystemConnection ( conn ) ) && ( ! ( isVmConnectionAuthenticationRequired ( ) ) ) ) ; }
|
org . junit . Assert . assertTrue ( policy . isAssumeIdentity ( null ) )
|
contentTypeServiceDocumentAcceptHeaders ( ) { final org . apache . http . HttpResponse response = callUri ( "" , HttpHeaders . ACCEPT , "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" , HttpStatusCodes . OK ) ; checkMediaType ( response , HttpContentType . APPLICATION_XML_UTF8 ) ; "<AssertPlaceHolder>" ; } getBody ( org . apache . http . HttpResponse ) { org . junit . Assert . assertNotNull ( response ) ; org . junit . Assert . assertNotNull ( response . getEntity ( ) ) ; org . junit . Assert . assertNotNull ( response . getEntity ( ) . getContent ( ) ) ; return org . apache . olingo . odata2 . testutil . helper . StringHelper . inputStreamToString ( response . getEntity ( ) . getContent ( ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( getBody ( response ) . length ( ) ) > 100 ) )
|
testChangingNewObservablesValue ( ) { nestedListenerHandle = createAttachedNestedListenerHandle ( nesting , listener ) ; javafx . beans . property . StringProperty newObservable = new javafx . beans . property . SimpleStringProperty ( "new<sp>observable's<sp>initial<sp>value" ) ; setNestingObservable ( nesting , newObservable ) ; "<AssertPlaceHolder>" ; newObservable . setValue ( "new<sp>observable's<sp>new<sp>value" ) ; verify ( listener , times ( 1 ) ) . changed ( newObservable , "new<sp>observable's<sp>initial<sp>value" , "new<sp>observable's<sp>new<sp>value" ) ; verifyNoMoreInteractions ( listener ) ; } getNestingObservable ( org . codefx . libfx . nesting . Nesting ) { java . util . Objects . requireNonNull ( nesting , "The<sp>argument<sp>'nesting'<sp>must<sp>not<sp>be<sp>null." ) ; java . util . Optional < O > nestingObservable = nesting . innerObservableProperty ( ) . getValue ( ) ; return nestingObservable . orElse ( null ) ; }
|
org . junit . Assert . assertEquals ( newObservable , getNestingObservable ( nesting ) )
|
fulfill_throwsException_completesWithException ( ) { java . lang . RuntimeException expectedException = new java . lang . RuntimeException ( ) ; when ( eventsMock . handleRequest ( any ( ) ) ) . thenThrow ( expectedException ) ; java . util . concurrent . CompletableFuture < eu . chargetime . ocpp . model . Confirmation > promise = new java . util . concurrent . CompletableFuture ( ) ; final java . lang . Throwable [ ] result = new java . lang . Throwable [ 1 ] ; promise . whenComplete ( ( confirmation , throwable ) -> result [ 0 ] = throwable ) ; sut . fulfill ( promise , eventsMock , null ) ; "<AssertPlaceHolder>" ; } fulfill ( java . util . concurrent . CompletableFuture , eu . chargetime . ocpp . SessionEvents , eu . chargetime . ocpp . model . Request ) { new java . lang . Thread ( ( ) -> promiseFulfiller . fulfill ( promise , eventHandler , request ) ) . start ( ) ; }
|
org . junit . Assert . assertThat ( result [ 0 ] , org . hamcrest . CoreMatchers . is ( expectedException ) )
|
testLsr ( ) { final org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; org . apache . hadoop . hdfs . MiniDFSCluster cluster = new org . apache . hadoop . hdfs . MiniDFSCluster . Builder ( conf ) . numDataNodes ( 2 ) . build ( ) ; org . apache . hadoop . hdfs . DistributedFileSystem dfs = ( ( org . apache . hadoop . hdfs . DistributedFileSystem ) ( cluster . getFileSystem ( ) ) ) ; try { final java . lang . String root = org . apache . hadoop . hdfs . TestDFSShell . createTree ( dfs , "lsr" ) ; dfs . mkdirs ( new org . apache . hadoop . fs . Path ( root , "zzz" ) ) ; org . apache . hadoop . hdfs . TestDFSShell . runLsr ( new org . apache . hadoop . fs . FsShell ( conf ) , root , 0 ) ; final org . apache . hadoop . fs . Path sub = new org . apache . hadoop . fs . Path ( root , "sub" ) ; dfs . setPermission ( sub , new org . apache . hadoop . fs . permission . FsPermission ( ( ( short ) ( 0 ) ) ) ) ; final org . apache . hadoop . security . UserGroupInformation ugi = org . apache . hadoop . security . UserGroupInformation . getCurrentUser ( ) ; final java . lang . String tmpusername = ( ugi . getShortUserName ( ) ) + "1" ; org . apache . hadoop . security . UserGroupInformation tmpUGI = org . apache . hadoop . security . UserGroupInformation . createUserForTesting ( tmpusername , new java . lang . String [ ] { tmpusername } ) ; java . lang . String results = tmpUGI . doAs ( new java . security . PrivilegedExceptionAction < java . lang . String > ( ) { @ org . apache . hadoop . hdfs . Override public java . lang . String run ( ) throws org . apache . hadoop . hdfs . Exception { return org . apache . hadoop . hdfs . TestDFSShell . runLsr ( new org . apache . hadoop . fs . FsShell ( conf ) , root , 1 ) ; } } ) ; "<AssertPlaceHolder>" ; } finally { cluster . shutdown ( ) ; } } contains ( java . util . List ) { for ( io . hops . metadata . hdfs . entity . INodeCandidatePrimaryKey pk : iNodeCandidatePKs ) { if ( ! ( contains ( pk . getInodeId ( ) ) ) ) { return false ; } } return true ; }
|
org . junit . Assert . assertTrue ( results . contains ( "zzz" ) )
|
testNotIn ( ) { io . jeo . filter . In f = ( ( io . jeo . filter . In ) ( io . jeo . filter . cql . CQL . parse ( "STATE_NAME<sp>NOT<sp>IN<sp>('Virginia','Maryland')" ) ) ) ; "<AssertPlaceHolder>" ; } negated ( ) { return not ; }
|
org . junit . Assert . assertTrue ( f . negated ( ) )
|
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . portal . kernel . model . Portlet missingPortlet = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
|
org . junit . Assert . assertNull ( missingPortlet )
|
non_strict_wip_with_undefined_scenarios ( ) { createNonStrictWipExitStatus ( ) ; bus . send ( testCaseFinishedWithStatus ( Result . Type . UNDEFINED ) ) ; "<AssertPlaceHolder>" ; } exitStatus ( ) { if ( results . isEmpty ( ) ) { return cucumber . runtime . ExitStatus . DEFAULT ; } if ( runtimeOptions . isWip ( ) ) { return min ( results , cucumber . runtime . SEVERITY ) . is ( Result . Type . PASSED ) ? cucumber . runtime . ExitStatus . ERRORS : cucumber . runtime . ExitStatus . DEFAULT ; } return max ( results , cucumber . runtime . SEVERITY ) . isOk ( runtimeOptions . isStrict ( ) ) ? cucumber . runtime . ExitStatus . DEFAULT : cucumber . runtime . ExitStatus . ERRORS ; }
|
org . junit . Assert . assertEquals ( 0 , exitStatus . exitStatus ( ) )
|
getObjectInteger ( ) { org . mockito . Mockito . when ( resultSet . getObject ( 1 ) ) . thenReturn ( 1L ) ; org . mockito . Mockito . when ( resultSet . getInt ( 1 ) ) . thenReturn ( 1 ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( resultSet ) . getInt ( 1 ) ; } getObject ( java . lang . Class , java . sql . ResultSet , int ) { if ( type == ( java . lang . String . class ) ) { final byte [ ] bytes = rs . getBytes ( index ) ; if ( bytes != null ) { try { return ( ( M ) ( new java . lang . String ( bytes , "UTF-8" ) ) ) ; } catch ( final java . io . UnsupportedEncodingException e ) { throw new com . cloud . legacymodel . exceptions . CloudRuntimeException ( "UnsupportedEncodingException<sp>exception<sp>while<sp>converting<sp>UTF-8<sp>data" ) ; } } else { return null ; } } else if ( type == ( int . class ) ) { return ( ( M ) ( ( java . lang . Integer ) ( rs . getInt ( index ) ) ) ) ; } else if ( type == ( com . cloud . utils . db . Integer . class ) ) { if ( ( rs . getObject ( index ) ) == null ) { return null ; } else { return ( ( M ) ( ( java . lang . Integer ) ( rs . getInt ( index ) ) ) ) ; } } else if ( type == ( long . class ) ) { return ( ( M ) ( ( java . lang . Long ) ( rs . getLong ( index ) ) ) ) ; } else if ( type == ( com . cloud . utils . db . Long . class ) ) { if ( ( rs . getObject ( index ) ) == null ) { return null ; } else { return ( ( M ) ( ( java . lang . Long ) ( rs . getLong ( index ) ) ) ) ; } } else if ( type == ( java . util . Date . class ) ) { final java . lang . Object data = rs . getDate ( index ) ; if ( data == null ) { return null ; } else { return ( ( M ) ( com . cloud . utils . DateUtil . parseDateString ( com . cloud . utils . db . GenericDaoBase . s_gmtTimeZone , rs . getString ( index ) ) ) ) ; } } else if ( type == ( short . class ) ) { return ( ( M ) ( ( java . lang . Short ) ( rs . getShort ( index ) ) ) ) ; } else if ( type == ( com . cloud . utils . db . Short . class ) ) { if ( ( rs . getObject ( index ) ) == null ) { return null ; } else { return ( ( M ) ( ( java . lang . Short ) ( rs . getShort ( index ) ) ) ) ; } } else if ( type == ( boolean . class ) ) { return ( ( M ) ( ( java . lang . Boolean ) ( rs . getBoolean ( index ) ) ) ) ; } else if ( type == ( com . cloud . utils . db . Boolean . class ) ) { if ( ( rs . getObject ( index ) ) == null ) { return null ; } else { return ( ( M ) ( ( java . lang . Boolean ) ( rs . getBoolean ( index ) ) ) ) ; } } else if ( type == ( float . class ) ) { return ( ( M ) ( ( java . lang . Float ) ( rs . getFloat ( index ) ) ) ) ; } else if ( type == ( com . cloud . utils . db . Float . class ) ) { if ( ( rs . getObject ( index ) ) == null ) { return null ; } else { return ( ( M ) ( ( java . lang . Float ) ( rs . getFloat ( index ) ) ) ) ; } } else if ( type == ( double . class ) ) { return ( ( M ) ( ( java . lang . Double ) ( rs . getDouble ( index ) ) ) ) ; } else if ( type == ( com . cloud . utils . db . Double . class ) ) { if ( ( rs . getObject ( index ) ) == null ) { return null ; } else { return ( ( M ) ( ( java . lang . Double ) ( rs . getDouble ( index ) ) ) ) ; } } else if ( type == ( byte . class ) ) { return ( ( M ) ( ( java . lang . Byte ) ( rs . getByte ( index ) ) ) ) ; } else if ( type == ( com . cloud . utils . db . Byte . class ) ) { if ( ( rs . getObject ( index ) ) == null ) { return null ; } else { return ( ( M ) ( ( java . lang . Byte ) ( rs . getByte ( index ) ) ) ) ; } } else if ( type == ( java . util . Calendar . class ) ) { final java . lang
|
org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 1 ) ) , com . cloud . utils . db . GenericDaoBase . getObject ( com . cloud . utils . db . Integer . class , resultSet , 1 ) )
|
testSaveDrugInfoShouldSaveDrugInfo ( ) { org . openmrs . Drug drug = new org . openmrs . Drug ( ) ; drug . setId ( 3 ) ; org . raxa . module . raxacore . DrugInfo drugInfo = new org . raxa . module . raxacore . DrugInfo ( ) ; drugInfo . setDrug ( drug ) ; drugInfo . setName ( "TestDrugInfo3" ) ; drugInfo . setDescription ( "Third<sp>Test<sp>DrugInfo" ) ; drugInfo . setCreator ( org . openmrs . api . context . Context . getUserContext ( ) . getAuthenticatedUser ( ) ) ; drugInfo . setDateCreated ( new java . util . Date ( ) ) ; drugInfo . setUuid ( "68547121-1b70-465c-99ee-c9dfd95e7d30" ) ; drugInfo . setRetired ( Boolean . FALSE ) ; s . saveDrugInfo ( drugInfo ) ; org . raxa . module . raxacore . DrugInfo result = s . getDrugInfoByUuid ( "68547121-1b70-465c-99ee-c9dfd95e7d30" ) ; java . lang . String name = result . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
|
org . junit . Assert . assertEquals ( name , "TestDrugInfo3" )
|
visitOrMatchExpr_nf ( ) { org . batfish . datamodel . acl . AclLineMatchExpr expr = org . batfish . datamodel . acl . AclLineMatchExprs . or ( org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . A , org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . B , org . batfish . datamodel . acl . AclLineMatchExprs . not ( org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . C ) ) ; "<AssertPlaceHolder>" ; } normalize ( org . batfish . datamodel . acl . AclLineMatchExpr ) { return org . batfish . datamodel . acl . AclLineMatchExprNormalizer . normalize ( _toBDD , expr ) ; }
|
org . junit . Assert . assertThat ( normalize ( expr ) , org . hamcrest . Matchers . equalTo ( expr ) )
|
testSplitJsNotSupported ( ) { defaultRewriterFeature = new org . apache . shindig . gadgets . rewrite . ContentRewriterFeature . DefaultConfig ( "" , "test" , "0" , TAGS , false , false ) ; "<AssertPlaceHolder>" ; } isSplitJsEnabled ( ) { return enableSplitJs ; }
|
org . junit . Assert . assertFalse ( defaultRewriterFeature . isSplitJsEnabled ( ) )
|
testBasicValidInput ( ) { java . lang . String input = "" + ( ( ( ( ( ( ( ( ( ( ( "[Desktop<sp>Entry]\n" + "[Desktop<sp>Entry]\n" 1 ) + "Type=Application\n" ) + "Name=Foo<sp>Viewer\n" ) + "[Desktop<sp>Entry]\n" 0 ) + "TryExec=fooview\n" ) + "Exec=fooview<sp>%F\n" ) + "[Desktop<sp>Entry]\n" 2 ) + "MimeType=image/x-foo;\n" ) + "X-KDE-Library=libfooview\n" ) + "X-KDE-FactoryName=fooviewfactory\n" ) + "X-KDE-ServiceType=FooService\n" ) ; java . io . StringReader reader = new java . io . StringReader ( input ) ; org . freedesktop . IniStyleFileReader fileReader = new org . freedesktop . IniStyleFileReader ( new java . io . BufferedReader ( reader ) ) ; org . freedesktop . IniStyleFile file = fileReader . read ( ) ; "<AssertPlaceHolder>" ; } read ( ) { org . freedesktop . IniStyleFile iniStyleFile = new org . freedesktop . IniStyleFile ( ) ; java . lang . String line = null ; java . lang . String groupName = null ; while ( ( line = reader . readLine ( ) ) != null ) { line = line . trim ( ) ; if ( ( line . startsWith ( "[" ) ) && ( line . endsWith ( "]" ) ) ) { groupName = line . substring ( 1 , ( ( line . length ( ) ) - 1 ) ) ; iniStyleFile . addGroup ( groupName ) ; } else if ( groupName != null ) { java . lang . String [ ] parts = line . split ( "=" ) ; java . lang . String key = parts [ 0 ] . trim ( ) ; java . lang . String value = "" ; if ( ( parts . length ) > 1 ) { value = parts [ 1 ] . trim ( ) ; } iniStyleFile . add ( groupName , key , value ) ; } } return iniStyleFile ; }
|
org . junit . Assert . assertNotNull ( file )
|
getOrDefault_ParamNull_ReturnsDefaultValue ( ) { "<AssertPlaceHolder>" ; } getOrDefault ( T , java . util . function . Supplier ) { software . amazon . awssdk . utils . Validate . paramNotNull ( defaultValue , "defaultValue" ) ; return param != null ? param : defaultValue . get ( ) ; }
|
org . junit . Assert . assertEquals ( "bar" , software . amazon . awssdk . utils . Validate . getOrDefault ( null , ( ) -> "bar" ) )
|
testRotatedPage ( ) { byte [ ] bytes = createSimplePdf ( PageSize . LETTER . rotate ( ) , "A\nB\nC\nD" ) ; com . itextpdf . text . pdf . PdfReader r = new com . itextpdf . text . pdf . PdfReader ( bytes ) ; java . lang . String text = com . itextpdf . text . pdf . parser . PdfTextExtractor . getTextFromPage ( r , 1 , createRenderListenerForTest ( ) ) ; "<AssertPlaceHolder>" ; } createRenderListenerForTest ( ) { return new com . itextpdf . text . pdf . parser . LocationTextExtractionStrategy ( ) ; }
|
org . junit . Assert . assertEquals ( "A\nB\nC\nD" , text )
|
listTest2 ( ) { java . lang . Float agTest1 = agTest . listTest2 ( 0.1F ) ; "<AssertPlaceHolder>" ; } listTest2 ( java . lang . Long ) { return value ; }
|
org . junit . Assert . assertTrue ( ( agTest1 == ( 0.1F + 0.1F ) ) )
|
shouldSetValue ( ) { bot . scaleInGroup ( "Scale" ) . setValue ( 24 ) ; "<AssertPlaceHolder>" ; } scaleInGroup ( java . lang . String ) { return scaleInGroup ( inGroup , 0 ) ; }
|
org . junit . Assert . assertEquals ( 24 , bot . scaleInGroup ( "Scale" ) . getValue ( ) )
|
testListS3BucketsFail ( ) { java . lang . String userName = "randomUser" ; java . util . Iterator < ? extends org . apache . hadoop . ozone . client . OzoneBucket > iterator = org . apache . hadoop . ozone . client . rpc . TestOzoneRpcClientAbstract . store . listS3Buckets ( userName , null ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return ( cursor ) < ( schedulingRequestList . size ( ) ) ; }
|
org . junit . Assert . assertFalse ( iterator . hasNext ( ) )
|
dispose ( ) { items . add ( "a" ) ; items . add ( "z" ) ; myReg . remove ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return myRegistrations . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( target . isEmpty ( ) )
|
readNull ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( filereader . readAllLine ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( null ) ; java . util . List < com . att . aro . core . peripheral . pojo . BatteryInfo > batteryInfos = batteryreader . readData ( "/" , 0 ) ; "<AssertPlaceHolder>" ; } size ( ) { return sessionTable . size ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( batteryInfos . size ( ) ) == 0 ) )
|
testTraceAndMeasureConstructorJoinPointWithLoggerAtInfoLevel ( ) { FakeClassWithAspect . SERVICE_LOGGER . setLevel ( Level . INFO ) ; classWithAspect = new com . ibm . logger . FakeClassWithAspect ( 123 ) ; java . util . List < java . util . logging . LogRecord > logRecordList = aspectClassLogHandler . logRecordList ; "<AssertPlaceHolder>" ; } setLevel ( org . apache . logging . log4j . Level ) { this . level = level ; }
|
org . junit . Assert . assertEquals ( 0 , logRecordList . size ( ) )
|
testSuccessfulMatch ( ) { org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setValue ( "3" ) ; org . graylog2 . plugin . Message msg = getSampleMessage ( ) ; msg . addField ( "something" , "4" ) ; org . graylog2 . streams . matchers . StreamRuleMatcher matcher = getMatcher ( rule ) ; "<AssertPlaceHolder>" ; } match ( org . graylog2 . plugin . Message , org . graylog2 . plugin . streams . StreamRule ) { java . lang . Double msgVal = getDouble ( msg . getField ( rule . getField ( ) ) ) ; if ( msgVal == null ) { return false ; } java . lang . Double ruleVal = getDouble ( rule . getValue ( ) ) ; if ( ruleVal == null ) { return false ; } return ( rule . getInverted ( ) ) ^ ( msgVal > ruleVal ) ; }
|
org . junit . Assert . assertTrue ( matcher . match ( msg , rule ) )
|
parseEmpty ( ) { io . robe . convert . xml . parsers . ParseEnumTest . TestEnum expected = null ; java . lang . reflect . Field field = getClass ( ) . getField ( "testEnum" ) ; io . robe . convert . xml . parsers . ParseEnum parseEnum = new io . robe . convert . xml . parsers . ParseEnum ( ) ; io . robe . convert . xml . parsers . ParseEnumTest . TestEnum actual = ( ( io . robe . convert . xml . parsers . ParseEnumTest . TestEnum ) ( parseEnum . parse ( io . robe . convert . xml . ParserUtil . getParser ( "<enum></enum>" ) , field ) ) ) ; "<AssertPlaceHolder>" ; } getParser ( java . lang . String ) { com . fasterxml . jackson . dataformat . xml . XmlFactory factory = new com . fasterxml . jackson . dataformat . xml . XmlFactory ( ) ; com . fasterxml . jackson . core . JsonParser parser = factory . createParser ( xml ) ; parser . nextToken ( ) ; parser . nextToken ( ) ; parser . nextToken ( ) ; return parser ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
shouldReturnFalseWhenCurrentFPMethodOfECIsNotCondom ( ) { boolean didRuleSucceed = currentFPMethodIsCondomRule . apply ( new org . ei . drishti . util . SafeMap ( ) . put ( "currentMethod" , "ocp" ) ) ; "<AssertPlaceHolder>" ; } put ( java . lang . String , java . lang . String ) { data . put ( key , value ) ; return this ; }
|
org . junit . Assert . assertFalse ( didRuleSucceed )
|
shouldFinishSessionWhenTestsFinishRunning ( ) { testRunner . run ( ) ; testsProgress . testsFinished ( ) ; "<AssertPlaceHolder>" ; } isFinished ( ) { return finished ; }
|
org . junit . Assert . assertTrue ( session . isFinished ( ) )
|
testHashcodeAfterReencodingWithValidUuid ( ) { datawave . edge . util . EdgeValue originalEdgeValue = createEdgeValueWithUuid ( "11111111-1111-1111-1111-111111111111" ) ; datawave . edge . util . EdgeValue decodedEdgeValue = datawave . edge . util . EdgeValue . decode ( createEdgeValueWithUuid ( "11111111-1111-1111-1111-111111111111" ) . encode ( ) ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { int result = dn . hashCode ( ) ; result = ( 31 * result ) + ( userType . hashCode ( ) ) ; result = ( 31 * result ) + ( ( int ) ( ( creationTime ) ^ ( ( creationTime ) > > > 32 ) ) ) ; result = ( 31 * result ) + ( ( int ) ( ( expirationTime ) ^ ( ( expirationTime ) > > > 32 ) ) ) ; return result ; }
|
org . junit . Assert . assertEquals ( ( ( originalEdgeValue + "\n" ) + decodedEdgeValue ) , originalEdgeValue . hashCode ( ) , decodedEdgeValue . hashCode ( ) )
|
singleNodeTypeMiss ( ) { org . apache . jackrabbit . oak . spi . state . NodeState node = org . apache . jackrabbit . oak . plugins . observation . filter . NodeTypePredicateTest . createNodeOfType ( org . apache . jackrabbit . JcrConstants . NT_BASE ) ; org . apache . jackrabbit . oak . plugins . nodetype . TypePredicate p = new org . apache . jackrabbit . oak . plugins . nodetype . TypePredicate ( node , new java . lang . String [ ] { org . apache . jackrabbit . JcrConstants . NT_FILE } ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . String ) { return new org . apache . jackrabbit . oak . plugins . memory . MemoryChildNodeEntry ( input , EMPTY_NODE ) ; }
|
org . junit . Assert . assertFalse ( p . apply ( node ) )
|
testCacheEntryWithProxyRevalidateDoesEndToEndRevalidation ( ) { final org . apache . hc . core5 . http . HttpRequest basicRequest = new org . apache . hc . core5 . http . message . BasicHttpRequest ( "GET" , "/" ) ; final org . apache . hc . core5 . http . HttpRequest requestWrapper = RequestCopier . INSTANCE . copy ( basicRequest ) ; final java . util . Date now = new java . util . Date ( ) ; final java . util . Date elevenSecondsAgo = new java . util . Date ( ( ( now . getTime ( ) ) - ( 11 * 1000L ) ) ) ; final java . util . Date tenSecondsAgo = new java . util . Date ( ( ( now . getTime ( ) ) - ( 10 * 1000L ) ) ) ; final java . util . Date nineSecondsAgo = new java . util . Date ( ( ( now . getTime ( ) ) - ( 9 * 1000L ) ) ) ; final org . apache . hc . core5 . http . Header [ ] cacheEntryHeaders = new org . apache . hc . core5 . http . Header [ ] { new org . apache . hc . core5 . http . message . BasicHeader ( "Date" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( tenSecondsAgo ) ) , new org . apache . hc . core5 . http . message . BasicHeader ( "ETag" , "\"etag\"" ) , new org . apache . hc . core5 . http . message . BasicHeader ( "Cache-Control" , "max-age=5,<sp>proxy-revalidate" ) } ; final org . apache . hc . client5 . http . cache . HttpCacheEntry cacheEntry = org . apache . hc . client5 . http . impl . cache . HttpTestUtils . makeCacheEntry ( elevenSecondsAgo , nineSecondsAgo , cacheEntryHeaders ) ; final org . apache . hc . core5 . http . HttpRequest result = impl . buildConditionalRequest ( requestWrapper , cacheEntry ) ; boolean foundMaxAge0 = false ; final java . util . Iterator < org . apache . hc . core5 . http . HeaderElement > it = org . apache . hc . core5 . http . message . MessageSupport . iterate ( result , HeaderConstants . CACHE_CONTROL ) ; while ( it . hasNext ( ) ) { final org . apache . hc . core5 . http . HeaderElement elt = it . next ( ) ; if ( ( "max-age" . equalsIgnoreCase ( elt . getName ( ) ) ) && ( "0" . equals ( elt . getValue ( ) ) ) ) { foundMaxAge0 = true ; } } "<AssertPlaceHolder>" ; } getValue ( ) { return this . value ; }
|
org . junit . Assert . assertTrue ( foundMaxAge0 )
|
parallelForEachPerformanceOneThread ( ) { java . lang . Object [ ] array = org . eclipse . collections . impl . list . Interval . zeroTo ( 100 ) . toArray ( ) ; org . eclipse . collections . impl . math . Sum parallelSum = new org . eclipse . collections . impl . math . LongSum ( 0 ) ; this . parallelSum ( array , parallelSum ) ; org . eclipse . collections . impl . math . Sum linearSum = new org . eclipse . collections . impl . math . LongSum ( 0 ) ; this . linearSum ( array , linearSum ) ; "<AssertPlaceHolder>" ; } linearSum ( java . lang . Object [ ] , org . eclipse . collections . impl . math . Sum ) { org . eclipse . collections . impl . utility . ArrayIterate . forEach ( array , new org . eclipse . collections . impl . math . SumProcedure ( linearSum ) ) ; }
|
org . junit . Assert . assertEquals ( parallelSum , linearSum )
|
testBuildWithParametersWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . Double markMin = 0.0 ; java . lang . Double markMax = 10.0 ; java . lang . Double markExchange = 5.0 ; org . lnu . is . domain . mark . scale . MarkScale markscale = new org . lnu . is . domain . mark . scale . MarkScale ( ) ; markscale . setId ( 1L ) ; org . lnu . is . domain . mark . scale . value . MarkScaleValue markscaleValue = new org . lnu . is . domain . mark . scale . value . MarkScaleValue ( ) ; markscaleValue . setId ( 1L ) ; org . lnu . is . domain . mark . scale . MarkScale markscaleExchange = new org . lnu . is . domain . mark . scale . MarkScale ( ) ; markscaleExchange . setId ( 2L ) ; org . lnu . is . domain . mark . scale . value . MarkScaleValue markscaleExchangeValue = new org . lnu . is . domain . mark . scale . value . MarkScaleValue ( ) ; markscaleExchangeValue . setId ( 2L ) ; org . lnu . is . domain . mark . scale . exchange . MarkScaleExchange context = new org . lnu . is . domain . mark . scale . exchange . MarkScaleExchange ( ) ; context . setMarkMin ( markMin ) ; context . setMarkMax ( markMax ) ; context . setMarkExchange ( markExchange ) ; context . setMarkScale ( markscale ) ; context . setMarkScaleValue ( markscaleValue ) ; context . setMarkScaleExchange ( markscaleExchange ) ; context . setMarkScaleExchangeValue ( markscaleExchangeValue ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>MarkScaleExchange<sp>e<sp>WHERE<sp>(<sp>e.markScale<sp>=<sp>:markScale<sp>AND<sp>e.markScaleValue<sp>=<sp>:markScaleValue<sp>AND<sp>e.markScaleExchange<sp>=<sp>:markScaleExchange<sp>AND<sp>e.markScaleExchangeValue<sp>=<sp>:markScaleExchangeValue<sp>AND<sp>e.markMin<sp>=<sp>:markMin<sp>AND<sp>e.markMax<sp>=<sp>:markMax<sp>AND<sp>e.markExchange<sp>=<sp>:markExchange<sp>)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . mark . scale . exchange . MarkScaleExchange > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
|
org . junit . Assert . assertEquals ( expected , actualQuery )
|
testSpdyHeadersFrame ( ) { short type = 8 ; byte flags = 0 ; int length = 4 ; int streamId = ( ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RANDOM . nextInt ( ) ) & 2147483647 ) | 1 ; io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( ( ( io . netty . handler . codec . spdy . SpdyCodecUtil . SPDY_HEADER_SIZE ) + length ) ) ; io . netty . handler . codec . spdy . SpdyFrameDecoderTest . encodeControlFrameHeader ( buf , type , flags , length ) ; buf . writeInt ( streamId ) ; decoder . decode ( buf ) ; verify ( delegate ) . readHeadersFrame ( streamId , false ) ; verify ( delegate ) . readHeaderBlockEnd ( ) ; "<AssertPlaceHolder>" ; buf . release ( ) ; } isReadable ( ) { return ( writerIndex ) > ( readerIndex ) ; }
|
org . junit . Assert . assertFalse ( buf . isReadable ( ) )
|
source_shortcut_01 ( ) { org . apache . jena . graph . Graph graph = org . apache . jena . sparql . graph . GraphFactory . createGraphMem ( ) ; org . apache . jena . riot . RDFParser . fromString ( org . apache . jena . riot . TestRDFParser . testdata ) . lang ( Lang . TTL ) . parse ( graph ) ; "<AssertPlaceHolder>" ; } size ( ) { return pmap . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , graph . size ( ) )
|
shouldCountVotes ( ) { feedbackService . save ( roomId , 0 , "user-id-one" ) ; feedbackService . save ( roomId , 0 , "user-id-two" ) ; int actual = feedbackService . countFeedbackByRoomId ( roomId ) ; "<AssertPlaceHolder>" ; } countFeedbackByRoomId ( java . lang . String ) { final de . thm . arsnova . model . Feedback feedback = this . getByRoomId ( roomId ) ; return feedback . getCount ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , actual )
|
testServiceHandlerHasServiceStore ( ) { final java . util . concurrent . atomic . AtomicReference < org . eclipse . rap . rwt . internal . service . ServiceStore > serviceStoreRef = new java . util . concurrent . atomic . AtomicReference ( ) ; org . eclipse . rap . rwt . engine . RWTServlet_Test . fakeServiceHandler ( applicationContext , new org . eclipse . rap . rwt . service . ServiceHandler ( ) { public void service ( javax . servlet . http . HttpServletRequest request , javax . servlet . http . HttpServletResponse response ) { serviceStoreRef . set ( org . eclipse . rap . rwt . internal . service . ContextProvider . getServiceStore ( ) ) ; } } ) ; request . setParameter ( ServiceManagerImpl . REQUEST_PARAM , "foo" ) ; request . setSession ( new org . eclipse . rap . rwt . testfixture . internal . TestHttpSession ( ) ) ; servlet . doPost ( request , new org . eclipse . rap . rwt . testfixture . internal . TestResponse ( ) ) ; "<AssertPlaceHolder>" ; } get ( ) { return RWT . NLS . getISO8859_1Encoded ( org . eclipse . ui . internal . cheatsheets . Messages . BUNDLE_NAME , org . eclipse . ui . internal . cheatsheets . Messages . class ) ; }
|
org . junit . Assert . assertNotNull ( serviceStoreRef . get ( ) )
|
testDoRequestWithAddHeaders ( ) { addPageRequest ( "GET" , "http://test.com/index.html?query=ab+cd&page=1" , "Test<sp>Page" ) . addHeader ( "foo" , "bar" , "baz" ) ; com . gistlabs . mechanize . Resource page = agent ( ) . doRequest ( "http://test.com/index.html" ) . add ( "baz" 0 , "ab<sp>cd" ) . add ( "page" , "1" ) . addHeader ( "foo" , "bar" , "baz" ) . get ( ) ; "<AssertPlaceHolder>" ; } asString ( ) { return htmlElements . toString ( ) ; }
|
org . junit . Assert . assertEquals ( "Test<sp>Page" , page . asString ( ) )
|
testGetSelectionIndex ( ) { grid = new org . eclipse . nebula . widgets . grid . Grid ( shell , org . eclipse . swt . SWT . MULTI ) ; org . eclipse . nebula . widgets . grid . GridTestUtil . createGridItems ( grid , 3 , 3 ) ; int [ ] indicies = new int [ ] { 3 , 4 , 1 , 7 } ; grid . setSelection ( indicies ) ; "<AssertPlaceHolder>" ; } getSelectionIndex ( ) { checkWidget ( ) ; int result = - 1 ; if ( cellSelectionEnabled ) { if ( ( selectedCells . size ( ) ) != 0 ) { result = selectedCells . get ( 0 ) . y ; } } else { if ( ( selectedItems . size ( ) ) != 0 ) { result = items . indexOf ( selectedItems . get ( 0 ) ) ; } } return result ; }
|
org . junit . Assert . assertEquals ( 3 , grid . getSelectionIndex ( ) )
|
serialize ( ) { org . oscm . auditlog . util . AuditLogSerializer auditLogSerializer = new org . oscm . auditlog . util . AuditLogSerializer ( ) ; java . util . List < org . oscm . auditlog . model . AuditLog > auditLogs = org . oscm . auditlog . util . AuditLogFactory . createAuditLogs ( ) ; byte [ ] result = auditLogSerializer . serialize ( auditLogs ) ; "<AssertPlaceHolder>" ; } isSerializedCorrectly ( java . util . List ) { return new org . hamcrest . BaseMatcher < byte [ ] > ( ) { private int errorPosition ; @ org . oscm . auditlog . matchers . Override public boolean matches ( java . lang . Object object ) { try { java . lang . String result = new java . lang . String ( ( ( byte [ ] ) ( object ) ) , "UTF-8" ) ; java . lang . String [ ] lines = org . oscm . auditlog . matchers . AuditLogMatchers . getLines ( result ) ; org . junit . Assert . assertEquals ( auditLogs . size ( ) , lines . length ) ; for ( int i = 0 ; i < ( auditLogs . size ( ) ) ; i ++ ) { errorPosition = i ; java . lang . String expected = org . oscm . auditlog . matchers . AuditLogMatchers . serialize ( auditLogs . get ( i ) ) ; java . lang . String actual = lines [ i ] ; org . junit . Assert . assertEquals ( expected , actual ) ; } } catch ( java . lang . Exception e ) { } return true ; } @ org . oscm . auditlog . matchers . Override public void describeTo ( org . hamcrest . Description description ) { description . appendText ( ( "AuditLog<sp>is<sp>not<sp>equal<sp>with<sp>serialized<sp>AuditLog<sp>at<sp>position<sp>" + ( errorPosition ) ) ) ; } } ; }
|
org . junit . Assert . assertThat ( result , isSerializedCorrectly ( auditLogs ) )
|
featureWPS2 ( ) { final org . geotoolkit . wps . xml . v200 . Format format = new org . geotoolkit . wps . xml . v200 . Format ( "UTF-8" , "text/xml" , "http://schemas.opengis.net/gml/3.1.1/base/feature.xsd" , null ) ; final org . geotoolkit . wps . adaptor . ComplexAdaptor adaptor = org . geotoolkit . wps . adaptor . ComplexAdaptor . getAdaptor ( format ) ; "<AssertPlaceHolder>" ; final org . apache . sis . feature . builder . FeatureTypeBuilder ftb = new org . apache . sis . feature . builder . FeatureTypeBuilder ( ) ; ftb . setName ( "Country" ) ; ftb . addAttribute ( java . lang . String . class ) . setName ( "code" ) . addRole ( AttributeRole . IDENTIFIER_COMPONENT ) ; ftb . addAttribute ( org . locationtech . jts . geom . Polygon . class ) . setName ( "geom" ) . setCRS ( CommonCRS . WGS84 . geographic ( ) ) . addRole ( AttributeRole . DEFAULT_GEOMETRY ) ; final org . opengis . feature . FeatureType ft = ftb . build ( ) ; final org . locationtech . jts . geom . GeometryFactory gf = new org . locationtech . jts . geom . GeometryFactory ( ) ; final org . locationtech . jts . geom . LinearRing ring = gf . createLinearRing ( new org . locationtech . jts . geom . Coordinate [ ] { new org . locationtech . jts . geom . Coordinate ( 23 , 78 ) , new org . locationtech . jts . geom . Coordinate ( ( - 10 ) , 43 ) , new org . locationtech . jts . geom . Coordinate ( 12 , 94 ) , new org . locationtech . jts . geom . Coordinate ( 23 , 78 ) } ) ; final org . locationtech . jts . geom . Polygon polygon = gf . createPolygon ( ring , new org . locationtech . jts . geom . LinearRing [ 0 ] ) ; final org . opengis . feature . Feature feature = ft . newInstance ( ) ; feature . setPropertyValue ( "code" , "id-1" ) ; feature . setPropertyValue ( "geom" , polygon ) ; org . geotoolkit . wps . xml . v200 . DataInput out = adaptor . toWPS2Input ( feature ) ; } getValueClass ( ) { return java . nio . file . Path . class ; }
|
org . junit . Assert . assertEquals ( org . opengis . feature . Feature . class , adaptor . getValueClass ( ) )
|
getSubscribedListenersInThreadOnlyTest ( ) { org . threadly . concurrent . event . RunnableListenerHelperTest . TestRunnable tr = new org . threadly . concurrent . event . RunnableListenerHelperTest . TestRunnable ( ) ; onceHelper . addListener ( tr ) ; "<AssertPlaceHolder>" ; } getSubscribedListeners ( ) { synchronized ( listenersLock ) { if ( ( ( inThreadListeners ) == null ) && ( ( executorListeners ) == null ) ) { return java . util . Collections . emptyList ( ) ; } else if ( ( inThreadListeners ) == null ) { return java . util . Collections . unmodifiableList ( org . threadly . util . Pair . collectLeft ( executorListeners ) ) ; } else if ( ( executorListeners ) == null ) { return java . util . Collections . unmodifiableList ( inThreadListeners ) ; } else { java . util . List < java . lang . Runnable > listeners = org . threadly . util . Pair . collectLeft ( executorListeners ) ; listeners . addAll ( inThreadListeners ) ; return java . util . Collections . unmodifiableList ( listeners ) ; } } }
|
org . junit . Assert . assertTrue ( onceHelper . getSubscribedListeners ( ) . contains ( tr ) )
|
testRemove ( ) { com . liferay . dynamic . data . lists . model . DDLRecordSetVersion newDDLRecordSetVersion = addDDLRecordSetVersion ( ) ; _persistence . remove ( newDDLRecordSetVersion ) ; com . liferay . dynamic . data . lists . model . DDLRecordSetVersion existingDDLRecordSetVersion = _persistence . fetchByPrimaryKey ( newDDLRecordSetVersion . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertNull ( existingDDLRecordSetVersion )
|
testPutSchedulerPZInUseToDockerPZShouldFail ( ) { com . vmware . photon . controller . model . resources . ResourcePoolService . ResourcePoolState createdPlacementZone = createPlacementZone ( "scheduler-placement-zone" , true ) ; "<AssertPlaceHolder>" ; createComputeState ( createdPlacementZone , true ) ; markDockerPlacementZone ( createdPlacementZone ) ; try { doPut ( createdPlacementZone ) ; org . junit . Assert . fail ( ( "PUT<sp>should<sp>fail<sp>to<sp>update<sp>the<sp>type<sp>of<sp>a<sp>used<sp>" + "scheduler<sp>placement<sp>zone<sp>to<sp>a<sp>docker<sp>zone" ) ) ; } catch ( java . lang . Exception ex ) { verifyExceptionMessage ( ex , SchedulerPlacementZoneInterceptor . SCHEDULER_HOSTS_IN_PLACEMENT_ZONE_MESSAGE ) ; } } createPlacementZone ( java . lang . String , boolean ) { com . vmware . photon . controller . model . resources . ResourcePoolService . ResourcePoolState resourcePoolState = createResourcePoolState ( placementZoneName , isSchedulerZone ) ; return createPlacementZone ( resourcePoolState ) ; }
|
org . junit . Assert . assertNotNull ( createdPlacementZone )
|
testIsSticky ( ) { org . pentaho . reporting . engine . classic . core . PageHeader header = new org . pentaho . reporting . engine . classic . core . PageHeader ( ) ; header . getStyle ( ) . setBooleanStyleProperty ( BandStyleKeys . STICKY , true ) ; "<AssertPlaceHolder>" ; } isSticky ( ) { return getStyle ( ) . getBooleanStyleProperty ( BandStyleKeys . STICKY , false ) ; }
|
org . junit . Assert . assertThat ( header . isSticky ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( true ) ) )
|
testCorrectePeriodeGemeenteGeenPeriode ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > objectenDieDeRegelOvertreden = brby0903 . voerRegelUit ( null , maakPersoonOverlijden ( maakGemeente ( "24" , "gemeente" , null , null ) , 20120303 ) , maakActie ( "id.actie1" , 20120303 , null ) , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , objectenDieDeRegelOvertreden . size ( ) )
|
gettingAccountByNameAndServerWorks ( ) { fi . helsinki . cs . tmc . cli . backend . Account wanted = new fi . helsinki . cs . tmc . cli . backend . Account ( "2" , "e" ) ; wanted . setServerAddress ( "1" ) ; list . addAccount ( new fi . helsinki . cs . tmc . cli . backend . Account ( "-" , "D" ) ) ; list . addAccount ( wanted ) ; list . addAccount ( new fi . helsinki . cs . tmc . cli . backend . Account ( "wc" , "fffssshhhh<sp>aaahhh" ) ) ; fi . helsinki . cs . tmc . cli . backend . Account get = list . getAccount ( "2" ) ; "<AssertPlaceHolder>" ; } getAccount ( java . lang . String ) { if ( username == null ) { return getAccount ( ) ; } for ( fi . helsinki . cs . tmc . cli . backend . Account account : this . accountArray ) { if ( ! ( account . getUsername ( ) . isPresent ( ) ) ) { continue ; } if ( account . getUsername ( ) . get ( ) . equals ( username ) ) { this . accountArray . remove ( account ) ; this . accountArray . add ( 0 , account ) ; return account ; } } return null ; }
|
org . junit . Assert . assertSame ( wanted , get )
|
startsWithoutExceptionsIfSetupIsCorrect ( ) { org . appenders . log4j2 . elasticsearch . IndexNameFormatter formatter = org . appenders . log4j2 . elasticsearch . RollingIndexNameFormatterTest . createRollingIndexNameFormatterBuilder ( ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { if ( ( credentials ) == null ) { throw new org . apache . logging . log4j . core . config . ConfigurationException ( ( "No<sp>credentials<sp>provided<sp>for<sp>" + ( org . appenders . log4j2 . elasticsearch . bulkprocessor . ShieldAuth . PLUGIN_NAME ) ) ) ; } if ( ( certInfo ) == null ) { throw new org . apache . logging . log4j . core . config . ConfigurationException ( ( "No<sp>certInfo<sp>provided<sp>for<sp>" + ( org . appenders . log4j2 . elasticsearch . bulkprocessor . ShieldAuth . PLUGIN_NAME ) ) ) ; } return new org . appenders . log4j2 . elasticsearch . bulkprocessor . ShieldAuth ( credentials , certInfo ) ; }
|
org . junit . Assert . assertNotNull ( formatter )
|
shouldNotMatchWhenLocationsDiffer ( ) { final org . pitest . mutationtest . engine . MutationIdentifier a = new org . pitest . mutationtest . engine . MutationIdentifier ( org . pitest . mutationtest . LocationMother . aLocation ( ) . withMethodDescription ( "X" ) . build ( ) , 1 , "M" ) ; final org . pitest . mutationtest . engine . MutationIdentifier b = new org . pitest . mutationtest . engine . MutationIdentifier ( org . pitest . mutationtest . LocationMother . aLocation ( ) . withMethodDescription ( "Y" ) . build ( ) , 1 , "M" ) ; "<AssertPlaceHolder>" ; } matches ( org . pitest . mutationtest . engine . MutationDetails ) { return value . getId ( ) . getLocation ( ) . getMethodName ( ) . name ( ) . equals ( name ) ; }
|
org . junit . Assert . assertFalse ( a . matches ( b ) )
|
shouldNotBeEqualWhenObjectIsNull ( ) { com . sonymobile . tools . gerrit . gerritevents . dto . events . RefReplicationDone refReplicationDone = new com . sonymobile . tools . gerrit . gerritevents . dto . events . RefReplicationDone ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) { return false ; } com . sonymobile . tools . gerrit . gerritevents . watchdog . WatchTimeExceptionData . Time time = ( ( com . sonymobile . tools . gerrit . gerritevents . watchdog . WatchTimeExceptionData . Time ) ( o ) ) ; if ( ( hour ) != ( time . hour ) ) { return false ; } if ( ( minute ) != ( time . minute ) ) { return false ; } return true ; }
|
org . junit . Assert . assertFalse ( refReplicationDone . equals ( null ) )
|
testSolutionAboveSide ( ) { org . apache . commons . math3 . analysis . UnivariateFunction f = new org . apache . commons . math3 . analysis . SinFunction ( ) ; org . apache . commons . math3 . analysis . solvers . UnivariateSolver solver = getSolver ( ) ; double left = - 1.5 ; double right = 0.05 ; for ( int i = 0 ; i < 10 ; i ++ ) { double solution = getSolution ( solver , 100 , f , left , right , AllowedSolution . ABOVE_SIDE ) ; if ( ! ( java . lang . Double . isNaN ( solution ) ) ) { "<AssertPlaceHolder>" ; } left -= 0.1 ; right += 0.3 ; } } value ( double ) { final double xMc = x - ( c ) ; return ( a ) + ( ( b ) * ( java . lang . Math . exp ( ( ( ( - xMc ) * xMc ) / ( 2.0 * ( ( d ) * ( d ) ) ) ) ) ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( f . value ( solution ) ) >= 0.0 ) )
|
attemptToWriteWithFaultyTask ( ) { engineMock . setHandshakeActions ( HandshakeAction . NEED_FAULTY_TASK ) ; final java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 21 ) ; buffer . put ( "write<sp>this<sp>if<sp>you<sp>can" . getBytes ( "UTF-8" ) ) . flip ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { boolean failed = false ; try { sinkConduit . write ( buffer ) ; } catch ( java . io . IOException expected ) { failed = true ; } "<AssertPlaceHolder>" ; } } write ( java . nio . ByteBuffer [ ] ) { return write ( srcs , 0 , srcs . length ) ; }
|
org . junit . Assert . assertTrue ( failed )
|
testNotHasRole ( ) { java . lang . String sql = "SELECT<sp>hasRole('bar')" ; java . lang . String userName = "logon" ; org . teiid . client . ResultsMessage rm = helpExecute ( sql , userName ) ; "<AssertPlaceHolder>" ; } getResultsList ( ) { return results ; }
|
org . junit . Assert . assertFalse ( ( ( java . lang . Boolean ) ( rm . getResultsList ( ) . get ( 0 ) . get ( 0 ) ) ) )
|
testDefaults ( ) { @ com . google . auto . value . AutoAnnotationDefaultsTest . EverythingWithDefaults class Annotated { } com . google . auto . value . AutoAnnotationDefaultsTest . EverythingWithDefaults expected = Annotated . class . getAnnotation ( com . google . auto . value . AutoAnnotationDefaultsTest . EverythingWithDefaults . class ) ; com . google . auto . value . AutoAnnotationDefaultsTest . EverythingWithDefaults actual = com . google . auto . value . AutoAnnotationDefaultsTest . newEverythingWithDefaults ( ) ; java . lang . StringBuilder differencesBuilder = new java . lang . StringBuilder ( ) ; for ( java . lang . reflect . Method member : com . google . auto . value . AutoAnnotationDefaultsTest . EverythingWithDefaults . class . getDeclaredMethods ( ) ) { java . lang . String name = member . getName ( ) ; java . lang . Object expectedValue = member . invoke ( expected ) ; java . lang . Object actualValue = member . invoke ( actual ) ; if ( ! ( com . google . auto . value . AutoAnnotationDefaultsTest . equal ( expectedValue , actualValue ) ) ) { differencesBuilder . append ( "For<sp>" ) . append ( name ) . append ( "<sp>expected<sp><" ) . append ( com . google . auto . value . AutoAnnotationDefaultsTest . string ( expectedValue ) ) . append ( "><sp>but<sp>was<sp><" ) . append ( com . google . auto . value . AutoAnnotationDefaultsTest . string ( actualValue ) ) . append ( ">\n" ) ; } } java . lang . String differences = differencesBuilder . toString ( ) ; "<AssertPlaceHolder>" ; new com . google . common . testing . EqualsTester ( ) . addEqualityGroup ( expected , actual ) . testEquals ( ) ; } toString ( ) { return ( value ) + ".class" ; }
|
org . junit . Assert . assertTrue ( differences , differences . isEmpty ( ) )
|
runMatcherNestedFunctionsTests ( ) { nl . basjes . parse . useragent . debug . UserAgentAnalyzerTester uaa = new nl . basjes . parse . useragent . debug . UserAgentAnalyzerTester ( "classpath*:Matcher-nested-functions.yaml" ) ; "<AssertPlaceHolder>" ; } runTests ( boolean , boolean ) { return runTests ( showAll , failOnUnexpected , null , false , false ) ; }
|
org . junit . Assert . assertTrue ( uaa . runTests ( false , false ) )
|
testIterator ( ) { System . out . println ( "iterator" ) ; java . util . Iterator result = instance . iterator ( ) ; "<AssertPlaceHolder>" ; } iterator ( ) { return graphRow . iterator ( ) ; }
|
org . junit . Assert . assertNotNull ( result )
|
nonExistingBenchmarkConfig ( ) { org . optaplanner . benchmark . api . PlannerBenchmarkFactory plannerBenchmarkFactory = org . optaplanner . benchmark . api . PlannerBenchmarkFactory . createFromXmlResource ( "org/optaplanner/benchmark/api/nonExistingPlannerBenchmarkConfig.xml" ) ; org . optaplanner . benchmark . api . PlannerBenchmark plannerBenchmark = plannerBenchmarkFactory . buildPlannerBenchmark ( ) ; "<AssertPlaceHolder>" ; plannerBenchmark . benchmark ( ) ; } buildPlannerBenchmark ( ) { org . optaplanner . benchmark . api . PlannerBenchmarkFactory plannerBenchmarkFactory = argOption . buildPlannerBenchmarkFactory ( ) ; org . optaplanner . benchmark . api . PlannerBenchmark plannerBenchmark = plannerBenchmarkFactory . buildPlannerBenchmark ( ) ; buildEverySolver ( plannerBenchmark ) ; }
|
org . junit . Assert . assertNotNull ( plannerBenchmark )
|
testConvert ( ) { java . io . File propsFile = java . io . File . createTempFile ( "lingual.test.properties" , null ) ; propsFile . deleteOnExit ( ) ; java . util . Properties testProps = new java . util . Properties ( ) ; testProps . setProperty ( "test1" , "some<sp>value" ) ; testProps . setProperty ( "test2" , "some<sp>other<sp>value" ) ; testProps . store ( new java . io . FileOutputStream ( propsFile ) , "" ) ; cascading . lingual . common . PropertiesFileConverter pfc = new cascading . lingual . common . PropertiesFileConverter ( ) ; java . util . Map < java . lang . String , java . lang . String > result = pfc . convert ( propsFile . getAbsolutePath ( ) ) ; java . util . Map < java . lang . String , java . lang . String > expected = com . google . common . collect . Maps . newHashMap ( ) ; expected . put ( "test1" , "some<sp>value" ) ; expected . put ( "test2" , "some<sp>other<sp>value" ) ; "<AssertPlaceHolder>" ; } put ( java . lang . String , java . lang . reflect . Type ) { nameToType . put ( name , type ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
testIsNotSameParentAll ( ) { org . kie . workbench . common . stunner . core . graph . Node parent = new org . kie . workbench . common . stunner . core . graph . impl . NodeImpl ( "parentUUID" ) ; org . kie . workbench . common . stunner . core . graph . Node child1 = new org . kie . workbench . common . stunner . core . graph . impl . NodeImpl ( "child1" ) ; org . kie . workbench . common . stunner . core . graph . Node child2 = new org . kie . workbench . common . stunner . core . graph . impl . NodeImpl ( "child2" ) ; org . kie . workbench . common . stunner . core . graph . Node [ ] children = new org . kie . workbench . common . stunner . core . graph . Node [ ] { child1 , child2 } ; boolean isSameParent = org . kie . workbench . common . stunner . client . lienzo . canvas . controls . ContainmentAcceptorControlImpl . areInSameParent ( parent , children ) ; "<AssertPlaceHolder>" ; } areInSameParent ( org . kie . workbench . common . stunner . core . graph . Element , org . kie . workbench . common . stunner . core . graph . Node [ ] ) { return java . util . stream . Stream . of ( children ) . map ( GraphUtils :: getParent ) . noneMatch ( ( childParent ) -> ! ( java . util . Objects . equals ( parent , childParent ) ) ) ; }
|
org . junit . Assert . assertFalse ( isSameParent )
|
testFOrdering2 ( ) { org . nd4j . linalg . api . ndarray . INDArray array1 = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 1280 , 128000 ) ; org . nd4j . linalg . api . ndarray . INDArray array2 = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 1280 , 128000 ) ; org . nd4j . linalg . api . ndarray . INDArray array3 = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 1280 , 128000 ) ; org . nd4j . linalg . api . ndarray . INDArray array4 = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 1280 , 128000 ) . dup ( 'f' ) ; array1 . muli ( array2 ) ; array3 . muli ( array4 ) ; "<AssertPlaceHolder>" ; } muli ( java . lang . Number ) { return muli ( v , this ) ; }
|
org . junit . Assert . assertEquals ( array3 , array1 )
|
testConvertAll ( ) { java . lang . Long enrolmentId = 1L ; org . lnu . is . domain . enrolment . Enrolment enrolment = new org . lnu . is . domain . enrolment . Enrolment ( ) ; enrolment . setId ( enrolmentId ) ; java . lang . Long specOfferWaveId = 2L ; org . lnu . is . domain . specoffer . SpecOfferWave specOfferWave = new org . lnu . is . domain . specoffer . SpecOfferWave ( ) ; specOfferWave . setId ( specOfferWaveId ) ; java . lang . Long enrolmentStatusTypeId = 3L ; org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType enrolmentStatusType = new org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType ( ) ; enrolmentStatusType . setId ( enrolmentStatusTypeId ) ; org . lnu . is . domain . enrolment . status . EnrolmentStatus source = new org . lnu . is . domain . enrolment . status . EnrolmentStatus ( ) ; source . setEnrolment ( enrolment ) ; source . setSpecOfferWave ( specOfferWave ) ; source . setEnrolmentStatusType ( enrolmentStatusType ) ; java . util . List < org . lnu . is . domain . enrolment . status . EnrolmentStatus > sources = java . util . Arrays . asList ( source ) ; org . lnu . is . resource . enrolment . status . EnrolmentStatusResource expected = new org . lnu . is . resource . enrolment . status . EnrolmentStatusResource ( ) ; expected . setEnrolmentId ( enrolmentId ) ; expected . setSpecOfferWaveId ( specOfferWaveId ) ; expected . setEnrolmentStatusTypeId ( enrolmentStatusTypeId ) ; java . util . List < org . lnu . is . resource . enrolment . status . EnrolmentStatusResource > expecteds = java . util . Arrays . asList ( expected ) ; java . util . List < org . lnu . is . resource . enrolment . status . EnrolmentStatusResource > actuals = unit . convertAll ( sources ) ; "<AssertPlaceHolder>" ; } convertAll ( java . util . List ) { return convertAll ( sources , new java . util . ArrayList < TARGET > ( sources . size ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( expecteds , actuals )
|
paths_bicyclo ( ) { int [ ] [ ] bicyclo = org . openscience . cdk . graph . InitialCyclesTest . bicyclo ( ) ; org . openscience . cdk . graph . VertexShortCycles vsc = new org . openscience . cdk . graph . VertexShortCycles ( bicyclo ) ; int [ ] [ ] paths = vsc . paths ( ) ; int [ ] [ ] expected = new int [ ] [ ] { new int [ ] { 5 , 0 , 1 , 2 , 3 , 4 , 5 } , new int [ ] { 5 , 0 , 1 , 2 , 7 , 6 , 5 } , new int [ ] { 5 , 4 , 3 , 2 , 7 , 6 , 5 } } ; "<AssertPlaceHolder>" ; } paths ( ) { int [ ] [ ] paths = new int [ this . paths . size ( ) ] [ 0 ] ; for ( int i = 0 ; i < ( this . paths . size ( ) ) ; i ++ ) paths [ i ] = this . paths . get ( i ) ; return paths ; }
|
org . junit . Assert . assertThat ( paths , org . hamcrest . CoreMatchers . is ( expected ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.