input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
---|---|
testGetDecompressorType ( ) { "<AssertPlaceHolder>" ; } getDecompressorType ( ) { com . conductor . hadoop . compress . SnappyFramedCodec . LOG . warn ( "This<sp>codec<sp>doesn't<sp>use<sp>a<sp>decompressor,<sp>returning<sp>null." ) ; return null ; }
|
org . junit . Assert . assertNull ( subject . getDecompressorType ( ) )
|
testAclTreatmentCloneToCpu ( ) { org . onosproject . net . flow . TrafficTreatment treatment = org . onosproject . net . flow . DefaultTrafficTreatment . builder ( ) . punt ( ) . build ( ) ; org . onosproject . net . pi . runtime . PiAction mappedAction = interpreter . mapTreatment ( treatment , FabricConstants . FABRIC_INGRESS_ACL_ACL ) ; org . onosproject . net . pi . runtime . PiAction expectedAction = org . onosproject . net . pi . runtime . PiAction . builder ( ) . withId ( FabricConstants . FABRIC_INGRESS_ACL_CLONE_TO_CPU ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new org . onosproject . drivers . lisp . extensions . LispAppDataAddress ( protocol , ipTos , localPortLow , localPortHigh , remotePortLow , remotePortHigh , address ) ; }
|
org . junit . Assert . assertEquals ( expectedAction , mappedAction )
|
listOfEnumSingleValue ( ) { java . util . Map < ? , ? > map = newMap ( com . hotels . bdp . circustrain . core . util . MoreMapUtilsTest . KEY , com . hotels . bdp . circustrain . core . util . MoreMapUtilsTest . MyEnum . ONE ) ; java . util . List < com . hotels . bdp . circustrain . core . util . MoreMapUtilsTest . MyEnum > actualEnums = com . hotels . bdp . circustrain . core . util . MoreMapUtils . getListOfEnum ( map , com . hotels . bdp . circustrain . core . util . MoreMapUtilsTest . KEY , null , com . hotels . bdp . circustrain . core . util . MoreMapUtilsTest . MyEnum . class ) ; java . util . List < com . hotels . bdp . circustrain . core . util . MoreMapUtilsTest . MyEnum > expectedEnums = com . google . common . collect . Lists . newArrayList ( com . hotels . bdp . circustrain . core . util . MoreMapUtilsTest . MyEnum . ONE ) ; "<AssertPlaceHolder>" ; } getListOfEnum ( java . util . Map , java . lang . Object , java . util . List , java . lang . Class ) { return com . hotels . bdp . circustrain . core . util . MoreMapUtils . getList ( map , key , defaultValue , new com . google . common . base . Function < java . lang . Object , T > ( ) { @ com . hotels . bdp . circustrain . core . util . Override public T apply ( java . lang . Object input ) { if ( input == null ) { return null ; } if ( enumClass . isAssignableFrom ( input . getClass ( ) ) ) { return enumClass . cast ( input ) ; } return java . lang . Enum . valueOf ( enumClass , input . toString ( ) . trim ( ) . toUpperCase ( Locale . ROOT ) ) ; } } ) ; }
|
org . junit . Assert . assertThat ( actualEnums , org . hamcrest . CoreMatchers . is ( expectedEnums ) )
|
testCreateAccountAndFindAccount ( ) { es . udc . pojo . minibank . model . account . Account account = accountService . createAccount ( new es . udc . pojo . minibank . model . account . Account ( 1 , 10 ) ) ; es . udc . pojo . minibank . model . account . Account account2 = accountService . findAccount ( account . getAccountId ( ) ) ; "<AssertPlaceHolder>" ; } getAccountId ( ) { return accountId ; }
|
org . junit . Assert . assertEquals ( account , account2 )
|
testContiguousFrameTarget ( ) { org . apache . uima . collection . CollectionReaderDescription reader = createReaderDescription ( de . tudarmstadt . ukp . dkpro . core . io . tiger . TigerXmlReader . class , TigerXmlReader . PARAM_SOURCE_LOCATION , "src/test/resources/" , TigerXmlReader . PARAM_PATTERNS , "[+]tiger-sample-contiguousframe.xml" , TigerXmlReader . PARAM_LANGUAGE , "de" , TigerXmlReader . PARAM_READ_PENN_TREE , true ) ; int [ ] [ ] frameRanges = new int [ ] [ ] { new int [ ] { 4 , 15 } , new int [ ] { 33 , 47 } , new int [ ] { 71 , 74 } , new int [ ] { 112 , 138 } , new int [ ] { 143 , 147 } , new int [ ] { 246 , 255 } } ; for ( org . apache . uima . jcas . JCas cas : iteratePipeline ( reader , new org . apache . uima . analysis_engine . AnalysisEngineDescription [ ] { } ) ) { for ( de . tudarmstadt . ukp . dkpro . core . api . segmentation . type . Sentence sentence : select ( cas , de . tudarmstadt . ukp . dkpro . core . api . segmentation . type . Sentence . class ) ) { for ( de . tudarmstadt . ukp . dkpro . core . api . semantics . type . SemPred frame : selectCovered ( de . tudarmstadt . ukp . dkpro . core . api . semantics . type . SemPred . class , sentence ) ) { System . out . println ( ( ( ( "frame<sp>boundary<sp>" + ( frame . getBegin ( ) ) ) + "<sp>:<sp>" ) + ( frame . getEnd ( ) ) ) ) ; boolean found = false ; for ( int [ ] element : frameRanges ) { if ( ( ( element [ 0 ] ) == ( frame . getBegin ( ) ) ) && ( ( element [ 1 ] ) == ( frame . getEnd ( ) ) ) ) { found = true ; break ; } } "<AssertPlaceHolder>" ; } } } } getEnd ( ) { return end ; }
|
org . junit . Assert . assertEquals ( true , found )
|
testJar ( ) { java . lang . String jar = org . apache . hadoop . util . JarFinder . getJar ( org . apache . commons . logging . LogFactory . class ) ; "<AssertPlaceHolder>" ; } getJar ( java . lang . Class ) { com . google . common . base . Preconditions . checkNotNull ( klass , "klass" ) ; java . lang . ClassLoader loader = klass . getClassLoader ( ) ; if ( loader != null ) { java . lang . String class_file = ( klass . getName ( ) . replaceAll ( "\\." , ".jar" 0 ) ) + ".class" ; try { for ( java . util . Enumeration itr = loader . getResources ( class_file ) ; itr . hasMoreElements ( ) ; ) { java . net . URL url = ( ( java . net . URL ) ( itr . nextElement ( ) ) ) ; java . lang . String path = url . getPath ( ) ; if ( path . startsWith ( ".jar" 2 ) ) { path = path . substring ( ".jar" 2.le ngth ( ) ) ; } path = java . net . URLDecoder . decode ( path , "UTF-8" ) ; if ( ".jar" 1.e quals ( url . getProtocol ( ) ) ) { path = java . net . URLDecoder . decode ( path , "UTF-8" ) ; return path . replaceAll ( "!.*$" , "" ) ; } else if ( "file" . equals ( url . getProtocol ( ) ) ) { java . lang . String klassName = klass . getName ( ) ; klassName = ( klassName . replace ( "." , ".jar" 0 ) ) + ".class" ; path = path . substring ( 0 , ( ( path . length ( ) ) - ( klassName . length ( ) ) ) ) ; java . io . File baseDir = new java . io . File ( path ) ; java . io . File testDir = org . apache . hadoop . test . GenericTestUtils . getTestDir ( ) ; testDir = testDir . getAbsoluteFile ( ) ; if ( ! ( testDir . exists ( ) ) ) { testDir . mkdirs ( ) ; } java . io . File tempJar = java . io . File . createTempFile ( "hadoop-" , "" , testDir ) ; tempJar = new java . io . File ( ( ( tempJar . getAbsolutePath ( ) ) + ".jar" ) ) ; org . apache . hadoop . util . JarFinder . createJar ( baseDir , tempJar ) ; tempJar . deleteOnExit ( ) ; return tempJar . getAbsolutePath ( ) ; } } } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } } return null ; }
|
org . junit . Assert . assertTrue ( new java . io . File ( jar ) . exists ( ) )
|
testReference_XPath ( ) { org . omg . bpmn . miwg . api . AnalysisJob job = new org . omg . bpmn . miwg . api . AnalysisJob ( "Reference" , "C.3.0" , org . omg . bpmn . miwg . api . Variant . Reference , new org . omg . bpmn . miwg . api . input . ResourceAnalysisInput ( getClass ( ) , "/Reference/C.3.0.bpmn" ) ) ; job . setXpathOnly ( ) ; org . omg . bpmn . miwg . api . AnalysisOutput result = org . omg . bpmn . miwg . facade . AnalysisFacade . executeAnalysisJob ( job ) . getResult ( org . omg . bpmn . miwg . xpath . XpathAnalysisTool . class ) ; "<AssertPlaceHolder>" ; } numFindings ( ) { return numFindings ; }
|
org . junit . Assert . assertEquals ( 0 , result . numFindings ( ) )
|
test1 ( ) { org . jerlang . type . Binary expected = new org . jerlang . type . Binary ( new byte [ ] { 65 , 65 , 69 , 67 , 65 , 119 , 81 , 70 , 66 , 103 , 99 , 73 , 67 , 81 , 61 , 61 } ) ; org . jerlang . type . Term result = apply ( org . jerlang . stdlib . Base64Test . base64test , org . jerlang . stdlib . Base64Test . test1 , nil ) ; "<AssertPlaceHolder>" ; } apply ( org . jerlang . type . Term , org . jerlang . type . Term , org . jerlang . type . Term ) { return org . jerlang . erts . erlang . ErlangApply . apply_3 ( m , f , a ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
testIsSSLDefaultConfig ( ) { mock . checking ( new org . jmock . Expectations ( ) { { one ( conn ) . getRequest ( ) ; will ( returnValue ( request ) ) ; one ( conn ) . useTrustedHeaders ( ) ; will ( returnValue ( true ) ) ; one ( conn ) . getTrustedHeader ( "$WSIS" ) ; will ( returnValue ( null ) ) ; one ( conn ) . getTrustedHeader ( "X-Forwarded-Proto" ) ; will ( returnValue ( null ) ) ; one ( conn ) . getSSLContext ( ) ; will ( returnValue ( null ) ) ; } } ) ; java . util . Map < java . lang . String , java . lang . Object > config = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; config . put ( "httpsIndicatorHeader" , "" ) ; com . ibm . wsspi . webcontainer . WCCustomProperties . setCustomProperties ( config ) ; com . ibm . ws . webcontainer . osgi . request . IRequestImpl iRequestImpl = new com . ibm . ws . webcontainer . osgi . request . IRequestImpl ( conn ) ; java . lang . Boolean ssl = iRequestImpl . isSSL ( ) ; "<AssertPlaceHolder>" ; } isSSL ( ) { boolean ssl = false ; boolean useForwarded = false ; if ( ( conn ) instanceof com . ibm . wsspi . http . ee7 . HttpInboundConnectionExtended ) { com . ibm . wsspi . http . ee7 . HttpInboundConnectionExtended ice = ( ( com . ibm . wsspi . http . ee7 . HttpInboundConnectionExtended ) ( conn ) ) ; if ( ice . useForwardedHeaders ( ) ) { useForwarded = true ; java . lang . String forwardedProto = ice . getRemoteProto ( ) ; if ( ( "https" . equalsIgnoreCase ( forwardedProto ) ) || ( "wss" . equalsIgnoreCase ( forwardedProto ) ) ) { ssl = true ; if ( ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) ) && ( com . ibm . ws . webcontainer . osgi . request . IRequestImpl . tc . isDebugEnabled ( ) ) ) { com . ibm . websphere . ras . Tr . debug ( com . ibm . ws . webcontainer . osgi . request . IRequestImpl . tc , ( ( ( "<sp>isTrusted<sp>--><sp>true<sp>--><sp>containsHeader<sp>--><sp>X-Forwarded-Proto<sp>or<sp>Forwarded<sp>proto<sp>parameter<sp>--><sp>" + forwardedProto ) + "<sp>ssl<sp>--><sp>" ) + ssl ) ) ; } return ssl ; } } } if ( this . conn . useTrustedHeaders ( ) ) { if ( isHttpsIndicatorSecure ( ) ) { if ( ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) ) && ( com . ibm . ws . webcontainer . osgi . request . IRequestImpl . tc . isDebugEnabled ( ) ) ) com . ibm . websphere . ras . Tr . debug ( com . ibm . ws . webcontainer . osgi . request . IRequestImpl . tc , "<sp>isTrusted<sp>--><sp>true,<sp>isHttpsIndicatorSecure<sp>--><sp>true<sp>ssl<sp>--><sp>true" ) ; return true ; } java . lang . String WSIS_header = this . conn . getTrustedHeader ( HttpHeaderKeys . HDR_ . WSIS . getName ( ) ) ; if ( WSIS_header != null ) { ssl = WSIS_header . equalsIgnoreCase ( "true" ) ; if ( ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) ) && ( com . ibm . ws . webcontainer . osgi . request . IRequestImpl . tc . isDebugEnabled ( ) ) ) com . ibm . websphere . ras . Tr . debug ( com . ibm . ws . webcontainer . osgi . request . IRequestImpl . tc , ( "<sp>isTrusted<sp>--><sp>true<sp>ssl<sp>--><sp>" + ssl ) ) ; return ssl ; } java . lang . String FORWARDED_PROTO_header = this . conn . getTrustedHeader ( HttpHeaderKeys . HDR_X_FORWARDED_PROTO . getName ( ) ) ; if ( ( FORWARDED_PROTO_header != null ) && ( ! useForwarded ) ) { if ( ( FORWARDED_PROTO_header . equalsIgnoreCase ( "https" ) ) || ( FORWARDED_PROTO_header . equalsIgnoreCase ( "wss" ) ) ) { ssl = true ; if ( ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) ) && ( com . ibm . ws . webcontainer . osgi . request . IRequestImpl . tc . isDebugEnabled ( ) ) ) com . ibm . websphere . ras . Tr . debug ( com . ibm . ws . webcontainer . osgi . request . IRequestImpl . tc , ( ( ( "<sp>isTrusted<sp>--><sp>true<sp>--><sp>containsHeader<sp>--><sp>X-Forwarded-Proto<sp>--><sp>" + FORWARDED_PROTO_header ) + "<sp>ssl<sp>--><sp>" ) + ssl ) ) ; return ssl ; } } } ssl = null != ( this . conn . getSSLContext ( ) ) ; if ( ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) ) && ( com . ibm . ws . webcontainer . osgi . request . IRequestImpl . tc . isDebugEnabled ( ) ) ) com . ibm . websphere . ras . Tr . debug ( com . ibm . ws . webcontainer . osgi . request . IRequestImpl . tc , ( "<sp>ssl<sp>--><sp>" + ssl ) ) ; return ssl ; }
|
org . junit . Assert . assertFalse ( ssl )
|
testSerialization ( ) { org . jfree . chart . axis . CategoryTick t1 = new org . jfree . chart . axis . CategoryTick ( "C1" , new org . jfree . chart . text . TextBlock ( ) , org . jfree . chart . text . TextBlockAnchor . CENTER , org . jfree . chart . ui . TextAnchor . CENTER , 1.5F ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( t1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . axis . CategoryTick t2 = ( ( org . jfree . chart . axis . CategoryTick ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
|
org . junit . Assert . assertEquals ( t1 , t2 )
|
testCheckOptions ( ) { java . util . List < org . pentaho . di . core . CheckResultInterface > remarks = new java . util . ArrayList ( ) ; org . pentaho . di . trans . step . mqtt . MQTTProducerMeta meta = new org . pentaho . di . trans . step . mqtt . MQTTProducerMeta ( ) ; meta . mqttServer = "theserver:1883" ; meta . clientId = "/Users/noname/temp" 0 ; meta . topic = "newtopic" ; meta . qos = "/Users/noname/temp" 2 ; meta . messageField = "Messages" ; meta . username = "testuser" ; meta . password = "test" ; meta . keepAliveInterval = "1000" ; meta . maxInflight = "2000" ; meta . connectionTimeout = "/Users/noname/temp" 3 ; meta . cleanSession = "true" ; meta . storageLevel = "/Users/noname/temp" ; meta . serverUris = "mqttHost2:1883" ; meta . mqttVersion = "/Users/noname/temp" 1 ; meta . automaticReconnect = "true" ; meta . check ( remarks , null , null , null , null , null , null , new org . pentaho . di . core . variables . Variables ( ) , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( pageCoords . length ) + ( ints . length ) ; }
|
org . junit . Assert . assertEquals ( 0 , remarks . size ( ) )
|
testRelativePathsAreRelativeToMountPoint ( ) { com . tddinaction . fs . FileSystem fs = getImplementation ( ) ; fs . writeFile ( "file.txt" , "content" . getBytes ( ) ) ; java . io . File expectedFile = new java . io . File ( mountPoint , "file.txt" ) ; java . io . FileInputStream stream = new java . io . FileInputStream ( expectedFile ) ; byte [ ] actual = com . tddinaction . io . IO . readIntoByteArray ( stream ) ; "<AssertPlaceHolder>" ; } readIntoByteArray ( java . io . InputStream ) { java . io . ByteArrayOutputStream content = new java . io . ByteArrayOutputStream ( ) ; com . tddinaction . io . IO . pipe ( in , content ) ; return content . toByteArray ( ) ; }
|
org . junit . Assert . assertEquals ( "content" , new java . lang . String ( actual ) )
|
testWithGhostObject ( ) { when ( mockEditor . composeEmail ( ) ) . thenReturn ( "test<sp>email" ) ; java . lang . String reply = emailController . getWithGhostEditor ( ) ; "<AssertPlaceHolder>" ; } getWithGhostEditor ( ) { editorService = new EnglishEditorServiceImpl ( ) ; return editorService . composeEmail ( ) ; }
|
org . junit . Assert . assertEquals ( "test<sp>email" , reply )
|
testDiff ( ) { com . deepoove . swagger . diff . SwaggerDiff diff = com . deepoove . swagger . diff . SwaggerDiff . compareV2 ( SWAGGER_V2_DOC1 , SWAGGER_V2_DOC2 ) ; java . util . List < com . deepoove . swagger . diff . model . ChangedEndpoint > changedEndPoints = diff . getChangedEndpoints ( ) ; java . lang . String html = new com . deepoove . swagger . diff . output . HtmlRender ( "Changelog" , "http://deepoove.com/swagger-diff/stylesheets/demo.css" ) . render ( diff ) ; try { java . io . FileWriter fw = new java . io . FileWriter ( "testDiff.html" ) ; fw . write ( html ) ; fw . close ( ) ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } "<AssertPlaceHolder>" ; } render ( com . deepoove . swagger . diff . SwaggerDiff ) { java . util . List < com . deepoove . swagger . diff . output . Endpoint > newEndpoints = diff . getNewEndpoints ( ) ; j2html . tags . ContainerTag ol_newEndpoint = ol_newEndpoint ( newEndpoints ) ; java . util . List < com . deepoove . swagger . diff . output . Endpoint > missingEndpoints = diff . getMissingEndpoints ( ) ; j2html . tags . ContainerTag ol_missingEndpoint = ol_missingEndpoint ( missingEndpoints ) ; java . util . List < com . deepoove . swagger . diff . output . ChangedEndpoint > changedEndpoints = diff . getChangedEndpoints ( ) ; j2html . tags . ContainerTag ol_changed = ol_changed ( changedEndpoints ) ; j2html . tags . ContainerTag p_versions = p_versions ( diff . getOldVersion ( ) , diff . getNewVersion ( ) ) ; return renderHtml ( ol_newEndpoint , ol_missingEndpoint , ol_changed , p_versions ) ; }
|
org . junit . Assert . assertFalse ( changedEndPoints . isEmpty ( ) )
|
testFolderClosedExceptionHeaders ( ) { com . sun . mail . test . TestServer server = null ; try { final com . sun . mail . pop3 . POP3Handler handler = new com . sun . mail . pop3 . POP3FolderClosedExceptionTest . POP3HandlerTimeoutHeader ( ) ; server = new com . sun . mail . test . TestServer ( handler ) ; server . start ( ) ; java . lang . Thread . sleep ( 1000 ) ; final java . util . Properties properties = new java . util . Properties ( ) ; properties . setProperty ( "mail.pop3.host" , "localhost" ) ; properties . setProperty ( "mail.pop3.port" , ( "" + ( server . getPort ( ) ) ) ) ; final javax . mail . Session session = javax . mail . Session . getInstance ( properties ) ; final javax . mail . Store store = session . getStore ( "pop3" ) ; try { store . connect ( "test" , "test" ) ; final javax . mail . Folder folder = store . getFolder ( "INBOX" ) ; folder . open ( Folder . READ_ONLY ) ; javax . mail . Message msg = folder . getMessage ( 1 ) ; msg . getSubject ( ) ; "<AssertPlaceHolder>" ; } catch ( javax . mail . FolderClosedException ex ) { } finally { store . close ( ) ; } } catch ( final java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } finally { if ( server != null ) { server . quit ( ) ; } } } isOpen ( ) { return opened ; }
|
org . junit . Assert . assertFalse ( folder . isOpen ( ) )
|
instantTest ( ) { com . salesforce . grpc . contrib . Instant now1 = com . salesforce . grpc . contrib . Instant . now ( com . salesforce . grpc . contrib . Clock . systemUTC ( ) ) ; com . salesforce . grpc . contrib . Instant now2 = com . salesforce . grpc . contrib . MoreTimestamps . toInstantUtc ( com . salesforce . grpc . contrib . MoreTimestamps . fromInstantUtc ( now1 ) ) ; "<AssertPlaceHolder>" ; } fromInstantUtc ( java . time . Instant ) { checkNotNull ( instant , "instant" ) ; return com . google . protobuf . Timestamp . newBuilder ( ) . setSeconds ( instant . getEpochSecond ( ) ) . setNanos ( instant . getNano ( ) ) . build ( ) ; }
|
org . junit . Assert . assertEquals ( now1 , now2 )
|
testRequestWithInvalidFinishTimeEndQuery ( ) { org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest request = org . apache . hadoop . yarn . server . resourcemanager . webapp . ApplicationsRequestBuilder . create ( ) . withFinishTimeEnd ( "bla" ) . build ( ) ; org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest expectedRequest = getDefaultRequest ( ) ; "<AssertPlaceHolder>" ; } getDefaultRequest ( ) { org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest req = org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest . newInstance ( ) ; req . setStartRange ( 0 , Long . MAX_VALUE ) ; req . setFinishRange ( 0 , Long . MAX_VALUE ) ; return req ; }
|
org . junit . Assert . assertEquals ( expectedRequest , request )
|
parseWhenNullSource ( ) { org . xwiki . rendering . block . XDOM xdom = mocker . getComponentUnderTest ( ) . parse ( null , Syntax . PLAIN_1_0 ) ; "<AssertPlaceHolder>" ; } getChildren ( ) { return this . runners ; }
|
org . junit . Assert . assertEquals ( 0 , xdom . getChildren ( ) . size ( ) )
|
testSubtractOfCompletelyContainedRange ( ) { org . antlr . v4 . runtime . misc . IntervalSet s = org . antlr . v4 . runtime . misc . IntervalSet . of ( 10 , 20 ) ; org . antlr . v4 . runtime . misc . IntervalSet s2 = org . antlr . v4 . runtime . misc . IntervalSet . of ( 12 , 15 ) ; java . lang . String expecting = "{10..11,<sp>16..20}" ; java . lang . String result = s . subtract ( s2 ) . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( a ) + ".." ) + ( b ) ; }
|
org . junit . Assert . assertEquals ( expecting , result )
|
testNotifications ( ) { org . apache . fluo . accumulo . iterators . TestData input = new org . apache . fluo . accumulo . iterators . TestData ( ) ; input . add ( "0<sp>ntfy<sp>foo:bar<sp>7" , "" ) ; input . add ( "0<sp>ntfy<sp>foo:bar<sp>5" , "" ) ; input . add ( "0<sp>ntfy<sp>foo:bar<sp>4" , "" ) ; input . add ( "1<sp>ntfy<sp>foo:bar<sp>3" , "" ) ; input . add ( "1<sp>ntfy<sp>foo:bar<sp>2" , "" ) ; input . add ( "1<sp>ntfy<sp>foo:baz<sp>1" , "" ) ; input . add ( "2<sp>ntfy<sp>foo:baz<sp>3" , "" ) ; org . apache . fluo . accumulo . iterators . TestData output = new org . apache . fluo . accumulo . iterators . TestData ( newGCI ( input , 60 , false ) ) ; "<AssertPlaceHolder>" ; } newGCI ( org . apache . fluo . accumulo . iterators . TestData , long , boolean ) { org . apache . fluo . accumulo . iterators . GarbageCollectionIterator gci = new org . apache . fluo . accumulo . iterators . GarbageCollectionIterator ( ) ; java . util . Map < java . lang . String , java . lang . String > options = new java . util . HashMap ( ) ; options . put ( GarbageCollectionIterator . GC_TIMESTAMP_OPT , java . lang . Long . toString ( oldestActive ) ) ; org . apache . accumulo . core . iterators . IteratorEnvironment env = org . apache . fluo . accumulo . iterators . TestIteratorEnv . create ( IteratorScope . majc , fullMajc ) ; try { gci . init ( new org . apache . accumulo . core . iterators . SortedMapIterator ( input . data ) , options , env ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } return gci ; }
|
org . junit . Assert . assertEquals ( input , output )
|
testZeroSizedIteration ( ) { org . eclipse . january . dataset . Dataset ta = org . eclipse . january . dataset . DatasetFactory . createRange ( 24 ) ; org . eclipse . january . dataset . IndexIterator it = ta . getSliceIterator ( null , new int [ ] { 0 } , null ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { int j = endrank ; for ( ; j >= 0 ; j -- ) { ( pos [ j ] ) ++ ; if ( ( pos [ j ] ) >= ( shape [ j ] ) ) { pos [ j ] = 0 ; } else { break ; } } if ( ( j == ( - 1 ) ) && ( ( endrank ) >= 0 ) ) { return false ; } index += istep ; return ( index ) < ( imax ) ; }
|
org . junit . Assert . assertFalse ( it . hasNext ( ) )
|
DeclarationVariableStatic ( ) { java . lang . String fromClass = "Domain.Direct.Violating.DeclarationVariableStatic" ; java . lang . String toClass = "Technology.Direct.Dao.ProfileDAO" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typesToFind . add ( "Declaration" ) ; "<AssertPlaceHolder>" ; } areDependencyTypesDetected ( java . lang . String , java . lang . String , java . util . ArrayList , boolean ) { return areDependencyTypesDetected ( classFrom , classTo , dependencyTypes , "" , isIndirect ) ; }
|
org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) )
|
test999_Teardown ( ) { "<AssertPlaceHolder>" ; } stopAllBookies ( com . github . dockerjava . api . DockerClient ) { return org . apache . bookkeeper . tests . integration . utils . BookKeeperClusterUtils . allBookies ( ) . stream ( ) . map ( ( b ) -> stopBookie ( docker , b ) ) . reduce ( true , org . apache . bookkeeper . tests . integration . utils . BookKeeperClusterUtils :: allTrue ) ; }
|
org . junit . Assert . assertTrue ( org . apache . bookkeeper . tests . integration . utils . BookKeeperClusterUtils . stopAllBookies ( docker ) )
|
testBlasGemm2 ( ) { if ( org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . getClass ( ) . getSimpleName ( ) . toLowerCase ( ) . contains ( "cuda" ) ) return ; lombok . val A = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 9 , 9 , DataType . DOUBLE ) . reshape ( 'c' , 3 , 3 ) . dup ( 'f' ) ; lombok . val B = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 9 , 9 , DataType . DOUBLE ) . reshape ( 'c' , 3 , 3 ) . dup ( 'f' ) ; lombok . val exp = A . mmul ( B ) ; lombok . val res = org . nd4j . linalg . factory . Nd4j . create ( DataType . DOUBLE , new long [ ] { 3 , 3 } , 'c' ) ; lombok . val matmul = org . nd4j . linalg . api . ops . DynamicCustomOp . builder ( "matmul" ) . addInputs ( A , B ) . addOutputs ( res ) . build ( ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( matmul ) ; "<AssertPlaceHolder>" ; } exec ( java . lang . String ) { code = org . datavec . python . PythonExecutioner . getFunctionalCode ( ( "__f_" + ( java . lang . Thread . currentThread ( ) . getId ( ) ) ) , code ) ; org . datavec . python . PythonExecutioner . acquireGIL ( ) ; log . info ( "CPython:<sp>PyRun_SimpleStringFlag()" ) ; log . info ( code ) ; int result = PyRun_SimpleStringFlags ( code , null ) ; if ( result != 0 ) { PyErr_Print ( ) ; throw new java . lang . RuntimeException ( "exec<sp>failed" ) ; } log . info ( "Exec<sp>done" ) ; org . datavec . python . PythonExecutioner . releaseGIL ( ) ; }
|
org . junit . Assert . assertEquals ( exp , res )
|
projectionAsFirstOperation2 ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = Sequence ( Property ( "Records" ) , Projection ( Sequence ( Property ( "requestParameters" ) , Property ( "keyName" ) ) ) ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "Records[*].requestParameters.keyName" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) )
|
getExecProbeWithInvalidExecTest ( ) { probeConfig = new io . fabric8 . maven . core . config . ProbeConfig . Builder ( ) . initialDelaySeconds ( 5 ) . timeoutSeconds ( 5 ) . exec ( "<sp>" ) . build ( ) ; probe = probeHandler . getProbe ( probeConfig ) ; "<AssertPlaceHolder>" ; } getProbe ( io . fabric8 . maven . core . config . ProbeConfig ) { if ( probeConfig == null ) { return null ; } io . fabric8 . kubernetes . api . model . Probe probe = new io . fabric8 . kubernetes . api . model . Probe ( ) ; java . lang . Integer initialDelaySeconds = probeConfig . getInitialDelaySeconds ( ) ; if ( initialDelaySeconds != null ) { probe . setInitialDelaySeconds ( initialDelaySeconds ) ; } java . lang . Integer timeoutSeconds = probeConfig . getTimeoutSeconds ( ) ; if ( timeoutSeconds != null ) { probe . setTimeoutSeconds ( timeoutSeconds ) ; } java . lang . Integer failureThreshold = probeConfig . getFailureThreshold ( ) ; if ( failureThreshold != null ) { probe . setFailureThreshold ( failureThreshold ) ; } java . lang . Integer successThreshold = probeConfig . getSuccessThreshold ( ) ; if ( successThreshold != null ) { probe . setSuccessThreshold ( successThreshold ) ; } io . fabric8 . kubernetes . api . model . HTTPGetAction getAction = getHTTPGetAction ( probeConfig . getGetUrl ( ) ) ; if ( getAction != null ) { probe . setHttpGet ( getAction ) ; return probe ; } io . fabric8 . kubernetes . api . model . ExecAction execAction = getExecAction ( probeConfig . getExec ( ) ) ; if ( execAction != null ) { probe . setExec ( execAction ) ; return probe ; } io . fabric8 . kubernetes . api . model . TCPSocketAction tcpSocketAction = getTCPSocketAction ( probeConfig . getGetUrl ( ) , probeConfig . getTcpPort ( ) ) ; if ( tcpSocketAction != null ) { probe . setTcpSocket ( tcpSocketAction ) ; return probe ; } return null ; }
|
org . junit . Assert . assertNull ( probe )
|
testVoerRegelUitMetLandOverlijdenCodeNederland ( ) { final nl . bzk . brp . model . bericht . kern . PersoonBericht nieuweSituatie = maakNieuweSituatie ( LandGebiedCodeAttribuut . NL_LAND_CODE_SHORT ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > resultaat = brby0906 . voerRegelUit ( null , nieuweSituatie , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , resultaat . size ( ) )
|
testBinaryContentImplNegativeSize ( ) { java . io . InputStream is ; try { is = new java . io . FileInputStream ( content ) ; ddf . catalog . data . impl . BinaryContentImpl bci = new ddf . catalog . data . impl . BinaryContentImpl ( is , mimeType ) ; bci . setSize ( ( - 20L ) ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { ddf . catalog . resource . BinaryContentImplTest . LOGGER . error ( "IO<sp>Failure" , e ) ; new org . junit . runner . notification . Failure ( null , e ) ; } } getSize ( ) { return size ; }
|
org . junit . Assert . assertEquals ( ( - 1 ) , bci . getSize ( ) )
|
testGetPermittedAccessTypesNonexistentChildUnauthorized ( ) { java . lang . String repositoryPath = ( org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . PARENT_ID ) + "/non-existent-repo" ; when ( mockDockerNodeDao . getEntityIdForRepositoryName ( ( ( ( org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . SERVICE ) + "/" ) + repositoryPath ) ) ) . thenReturn ( null ) ; when ( mockEntityPermissionsManager . canCreate ( eq ( org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . PARENT_ID ) , eq ( EntityType . dockerrepo ) , eq ( org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . USER_INFO ) ) ) . thenReturn ( AuthorizationManagerUtil . ACCESS_DENIED ) ; when ( mockEntityPermissionsManager . hasAccess ( eq ( org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . REPO_ENTITY_ID ) , eq ( ACCESS_TYPE . DOWNLOAD ) , eq ( org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . USER_INFO ) ) ) . thenReturn ( AuthorizationManagerUtil . ACCESS_DENIED ) ; java . util . Set < java . lang . String > permitted = authorizationManager . getPermittedDockerActions ( org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . USER_INFO , org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . SERVICE , org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . REPOSITORY_TYPE , repositoryPath , org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . ACCESS_TYPES_STRING ) ; "<AssertPlaceHolder>" ; } toString ( ) { double percent = ( ( ( double ) ( currentIndex ) ) / ( ( double ) ( totalCount ) ) ) * 100.0 ; return java . lang . String . format ( "%1$-30s<sp>%2$10d/%3$-10d<sp>%4$8.2f<sp>%%" , message , currentIndex , totalCount , percent ) ; }
|
org . junit . Assert . assertTrue ( permitted . toString ( ) , permitted . isEmpty ( ) )
|
testReciprocalZero ( ) { "<AssertPlaceHolder>" ; } reciprocal ( ) { if ( isNaN ) { return org . hipparchus . complex . Complex . NaN ; } if ( ( ( real ) == 0.0 ) && ( ( imaginary ) == 0.0 ) ) { return org . hipparchus . complex . Complex . INF ; } if ( isInfinite ) { return org . hipparchus . complex . Complex . ZERO ; } if ( ( org . hipparchus . util . FastMath . abs ( real ) ) < ( org . hipparchus . util . FastMath . abs ( imaginary ) ) ) { double q = ( real ) / ( imaginary ) ; double scale = 1.0 / ( ( ( real ) * q ) + ( imaginary ) ) ; return createComplex ( ( scale * q ) , ( - scale ) ) ; } else { double q = ( imaginary ) / ( real ) ; double scale = 1.0 / ( ( ( imaginary ) * q ) + ( real ) ) ; return createComplex ( scale , ( ( - scale ) * q ) ) ; } }
|
org . junit . Assert . assertEquals ( Complex . ZERO . reciprocal ( ) , Complex . INF )
|
testCallRemoteKieServerOperationWhenContainerSpecIsNull ( ) { final java . util . List < org . kie . server . controller . api . model . runtime . Container > containers = instanceManager . callRemoteKieServerOperation ( serverTemplate , null , operation ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return people . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( containers . isEmpty ( ) )
|
testGetText ( ) { opennlp . tools . parser . Parse p = opennlp . tools . parser . Parse . parseParse ( opennlp . tools . parser . ParseTest . PARSE_STRING ) ; java . lang . String expectedText = "She<sp>was<sp>just<sp>another<sp>freighter<sp>from<sp>the<sp>States<sp>,<sp>" + "and<sp>she<sp>seemed<sp>as<sp>commonplace<sp>as<sp>her<sp>name<sp>.<sp>" ; "<AssertPlaceHolder>" ; } getText ( ) { return text . toArray ( new java . lang . String [ text . size ( ) ] ) ; }
|
org . junit . Assert . assertEquals ( expectedText , p . getText ( ) )
|
test_without_createKeyIndexVertexType ( ) { final com . tinkerpop . blueprints . impls . orient . OrientGraph graph = new com . tinkerpop . blueprints . impls . orient . OrientGraph ( ( "memory:" + ( com . tinkerpop . blueprints . impls . orient . BlueprintsKeyIndexTest . class . getSimpleName ( ) ) ) ) ; graph . setWarnOnForceClosingTx ( false ) ; graph . createVertexType ( "Test" ) ; graph . createVertexType ( "Test1" ) ; try { final java . util . List < com . tinkerpop . blueprints . Vertex > rootNodes = com . tinkerpop . blueprints . impls . orient . BlueprintsKeyIndexTest . toArrayList ( graph . getVertices ( ( "Test." + ( com . tinkerpop . blueprints . impls . orient . BlueprintsKeyIndexTest . KEY_NAME ) ) , com . tinkerpop . blueprints . impls . orient . BlueprintsKeyIndexTest . ROOT_NODE_NAME ) ) ; "<AssertPlaceHolder>" ; } finally { graph . drop ( ) ; } } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; }
|
org . junit . Assert . assertEquals ( 1 , rootNodes . size ( ) )
|
testGenerateNextValue ( ) { "<AssertPlaceHolder>" ; fieldValueGenerator . generateNextValue ( lastDayInMonth ) ; } generateNextValue ( int ) { return 0 ; }
|
org . junit . Assert . assertEquals ( lastDayInMonth , fieldValueGenerator . generateNextValue ( 1 ) )
|
testInterruptedDuringNotification ( ) { java . util . concurrent . Callable < java . lang . Boolean > requestedShutdownCallable = buildRequestedShutdownCallable ( ) ; when ( notificationCompleteLatch . await ( anyLong ( ) , any ( java . util . concurrent . TimeUnit . class ) ) ) . thenAnswer ( ( invocation ) -> { java . lang . Thread . currentThread ( ) . interrupt ( ) ; return false ; } ) ; when ( notificationCompleteLatch . getCount ( ) ) . thenReturn ( 1L ) ; when ( shutdownCompleteLatch . getCount ( ) ) . thenReturn ( 1L ) ; "<AssertPlaceHolder>" ; verifyLatchAwait ( notificationCompleteLatch ) ; verify ( notificationCompleteLatch ) . getCount ( ) ; verifyLatchAwait ( shutdownCompleteLatch , never ( ) ) ; verify ( shutdownCompleteLatch ) . getCount ( ) ; verify ( scheduler , never ( ) ) . shutdown ( ) ; } call ( ) { int exitCode = 0 ; try { scheduler ( ) . run ( ) ; } catch ( java . lang . Throwable t ) { log . error ( "Caught<sp>throwable<sp>while<sp>processing<sp>data" , t ) ; exitCode = 1 ; } return exitCode ; }
|
org . junit . Assert . assertThat ( requestedShutdownCallable . call ( ) , org . hamcrest . CoreMatchers . equalTo ( false ) )
|
testRemoveAllEmpty ( ) { "<AssertPlaceHolder>" ; } removeAll ( java . lang . String ) { checkPointer ( ( key != null ) ) ; java . util . Set < V > value = map . remove ( key ) ; return value != null ? value : new java . util . HashSet ( ) ; }
|
org . junit . Assert . assertFalse ( set . removeAll ( java . util . Arrays . asList ( ) ) )
|
testStartOnline ( ) { System . out . println ( "startOnline" ) ; org . loadosophia . jmeter . LoadosophiaAPIClientEmul instance = new org . loadosophia . jmeter . LoadosophiaAPIClientEmul ( this ) ; net . sf . json . JSONObject resp = new net . sf . json . JSONObject ( ) ; resp . put ( "OnlineID" , "123123" ) ; instance . addEmul ( resp ) ; java . lang . String expResult = "http://localhost/gui/active/123123/" ; java . lang . String result = instance . startOnline ( ) ; "<AssertPlaceHolder>" ; } startOnline ( ) { if ( report . isAnonymousTest ( ) ) { notifier . notifyAbout ( "No<sp>BlazeMeter<sp>API<sp>key<sp>provided,<sp>will<sp>upload<sp>anonymously" ) ; test = new com . blazemeter . api . explorer . Test ( httpUtils ) ; return test . startAnonymousExternal ( ) ; } else { test . startExternal ( ) ; return report . isShareTest ( ) ? test . getMaster ( ) . makeReportPublic ( ) : ( ( httpUtils . getAddress ( ) ) + "/app/#/masters/" ) + ( test . getMaster ( ) . getId ( ) ) ; } }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testEquals1481087 ( ) { org . jfree . chart . labels . StandardCategoryItemLabelGenerator g1 = new org . jfree . chart . labels . StandardCategoryItemLabelGenerator ( "{0}" , new java . text . DecimalFormat ( "0.00" ) ) ; org . jfree . chart . labels . StandardCategoryToolTipGenerator g2 = new org . jfree . chart . labels . StandardCategoryToolTipGenerator ( "{0}" , new java . text . DecimalFormat ( "0.00" ) ) ; "<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 . assertFalse ( g1 . equals ( g2 ) )
|
testAuthorizeReturningTrue ( ) { edu . illinois . library . cantaloupe . resource . RequestContext context = new edu . illinois . library . cantaloupe . resource . RequestContext ( ) ; context . setIdentifier ( new edu . illinois . library . cantaloupe . image . Identifier ( "whatever" ) ) ; instance . setRequestContext ( context ) ; "<AssertPlaceHolder>" ; } authorize ( ) { final edu . illinois . library . cantaloupe . auth . Authorizer authorizer = new edu . illinois . library . cantaloupe . auth . AuthorizerFactory ( ) . newAuthorizer ( getDelegateProxy ( ) ) ; final edu . illinois . library . cantaloupe . auth . AuthInfo info = authorizer . authorize ( ) ; if ( info != null ) { final int code = info . getResponseStatus ( ) ; final java . lang . String location = info . getRedirectURI ( ) ; final edu . illinois . library . cantaloupe . image . ScaleConstraint scaleConstraint = info . getScaleConstraint ( ) ; if ( location != null ) { getResponse ( ) . setStatus ( code ) ; getResponse ( ) . setHeader ( "Cache-Control" , "no-cache" ) ; getResponse ( ) . setHeader ( "Location" , location ) ; new edu . illinois . library . cantaloupe . resource . StringRepresentation ( ( "Redirect:<sp>" + location ) ) . write ( getResponse ( ) . getOutputStream ( ) ) ; return false ; } else if ( scaleConstraint != null ) { edu . illinois . library . cantaloupe . http . Reference publicRef = getPublicReference ( scaleConstraint ) ; getResponse ( ) . setStatus ( code ) ; getResponse ( ) . setHeader ( "Cache-Control" , "no-cache" ) ; getResponse ( ) . setHeader ( "Location" , publicRef . toString ( ) ) ; new edu . illinois . library . cantaloupe . resource . StringRepresentation ( ( "Redirect:<sp>" + publicRef ) ) . write ( getResponse ( ) . getOutputStream ( ) ) ; return false ; } else if ( code >= 400 ) { getResponse ( ) . setStatus ( code ) ; getResponse ( ) . setHeader ( "Cache-Control" , "no-cache" ) ; if ( code == 401 ) { getResponse ( ) . setHeader ( "WWW-Authenticate" , info . getChallengeValue ( ) ) ; } throw new edu . illinois . library . cantaloupe . resource . ResourceException ( new edu . illinois . library . cantaloupe . http . Status ( code ) ) ; } } return true ; }
|
org . junit . Assert . assertTrue ( ( ( boolean ) ( instance . authorize ( ) ) ) )
|
testGetMaxCapacity ( ) { com . jmethods . catatumbo . impl . LRUCache < java . lang . Integer , java . lang . Integer > cache = new com . jmethods . catatumbo . impl . LRUCache ( 5 , 10 ) ; "<AssertPlaceHolder>" ; } getMaxCapacity ( ) { return maxCapacity ; }
|
org . junit . Assert . assertTrue ( ( ( cache . getMaxCapacity ( ) ) == 10 ) )
|
validateNoDelimiterSmallInitialBuffer ( ) { java . lang . String data = "Learn<sp>from<sp>yesterday,<sp>live<sp>for<sp>today,<sp>hope<sp>for<sp>tomorrow.<sp>The<sp>important<sp>thing<sp>is<sp>not<sp>to<sp>stop<sp>questioning." ; java . io . ByteArrayInputStream is = new java . io . ByteArrayInputStream ( data . getBytes ( StandardCharsets . UTF_8 ) ) ; org . apache . nifi . stream . io . util . StreamDemarcator scanner = new org . apache . nifi . stream . io . util . StreamDemarcator ( is , null , 1000 , 1 ) ; "<AssertPlaceHolder>" ; } nextToken ( ) { byte [ ] token = null ; int j = 0 ; nextTokenLoop : while ( ( token == null ) && ( ( this . availableBytesLength ) != ( - 1 ) ) ) { if ( ( this . index ) >= ( this . availableBytesLength ) ) { this . fill ( ) ; } if ( ( this . availableBytesLength ) != ( - 1 ) ) { byte byteVal ; int i ; for ( i = this . index ; i < ( this . availableBytesLength ) ; i ++ ) { byteVal = this . buffer [ i ] ; boolean delimiterFound = false ; if ( ( ( this . delimiterBytes ) != null ) && ( ( this . delimiterBytes [ j ] ) == byteVal ) ) { if ( ( ++ j ) == ( this . delimiterBytes . length ) ) { delimiterFound = true ; } } else { j = 0 ; } if ( delimiterFound ) { this . index = i + 1 ; int size = ( ( this . index ) - ( this . mark ) ) - ( this . delimiterBytes . length ) ; token = this . extractDataToken ( size ) ; this . mark = this . index ; j = 0 ; if ( token != null ) { break nextTokenLoop ; } } } this . index = i ; } else { token = this . extractDataToken ( ( ( this . index ) - ( this . mark ) ) ) ; } } return token ; }
|
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( data . getBytes ( StandardCharsets . UTF_8 ) , scanner . nextToken ( ) ) )
|
testMultiRowRangeFilterWithEmptyStopRow ( ) { tableName = org . apache . hadoop . hbase . TableName . valueOf ( name . getMethodName ( ) ) ; org . apache . hadoop . hbase . client . Table ht = org . apache . hadoop . hbase . filter . TestMultiRowRangeFilter . TEST_UTIL . createTable ( tableName , family , Integer . MAX_VALUE ) ; generateRows ( numRows , ht , family , qf , value ) ; org . apache . hadoop . hbase . client . Scan scan = new org . apache . hadoop . hbase . client . Scan ( ) ; scan . setMaxVersions ( ) ; java . util . List < org . apache . hadoop . hbase . filter . MultiRowRangeFilter . RowRange > ranges = new java . util . ArrayList ( ) ; ranges . add ( new org . apache . hadoop . hbase . filter . MultiRowRangeFilter . RowRange ( org . apache . hadoop . hbase . util . Bytes . toBytes ( 10 ) , true , org . apache . hadoop . hbase . util . Bytes . toBytes ( "" ) , false ) ) ; ranges . add ( new org . apache . hadoop . hbase . filter . MultiRowRangeFilter . RowRange ( org . apache . hadoop . hbase . util . Bytes . toBytes ( 30 ) , true , org . apache . hadoop . hbase . util . Bytes . toBytes ( 40 ) , false ) ) ; org . apache . hadoop . hbase . filter . MultiRowRangeFilter filter = new org . apache . hadoop . hbase . filter . MultiRowRangeFilter ( ranges ) ; scan . setFilter ( filter ) ; int resultsSize = getResultsSize ( ht , scan ) ; java . util . List < org . apache . hadoop . hbase . Cell > results1 = getScanResult ( org . apache . hadoop . hbase . util . Bytes . toBytes ( 10 ) , org . apache . hadoop . hbase . util . Bytes . toBytes ( "" ) , ht ) ; "<AssertPlaceHolder>" ; ht . close ( ) ; } size ( ) { return 0 ; }
|
org . junit . Assert . assertEquals ( results1 . size ( ) , resultsSize )
|
testTimeout ( ) { java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; org . nustaq . kontraktor . IPromise p = new org . nustaq . kontraktor . Promise ( ) . timeoutIn ( 1000 ) ; java . lang . Thread . sleep ( 2000 ) ; p . then ( new kontraktor . Callback ( ) { @ kontraktor . Override public void complete ( java . lang . Object result , java . lang . Object error ) { System . out . println ( ( ( ( "res:" + result ) + "<sp>err:" ) + error ) ) ; count . incrementAndGet ( ) ; } } ) . onTimeout ( new java . util . function . Consumer ( ) { @ kontraktor . Override public void accept ( java . lang . Object o ) { count . addAndGet ( 8 ) ; System . out . println ( "the<sp>EXPECTED<sp>timout" ) ; } } ) ; java . lang . Thread . sleep ( 500 ) ; "<AssertPlaceHolder>" ; } get ( ) { return ( ( T ) ( result ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( count . get ( ) ) == 9 ) )
|
testDecodePath ( ) { final java . lang . String ESCAPED_PATH = "/test%25+1%26%3Dtest?op=OPEN&foo=bar" ; final java . lang . String EXPECTED_PATH = "/test%+1&=test" ; org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; io . netty . handler . codec . http . QueryStringDecoder decoder = new io . netty . handler . codec . http . QueryStringDecoder ( ( ( WebHdfsHandler . WEBHDFS_PREFIX ) + ESCAPED_PATH ) ) ; org . apache . hadoop . hdfs . server . datanode . web . webhdfs . ParameterParser testParser = new org . apache . hadoop . hdfs . server . datanode . web . webhdfs . ParameterParser ( decoder , conf ) ; "<AssertPlaceHolder>" ; } path ( ) { return path ; }
|
org . junit . Assert . assertEquals ( EXPECTED_PATH , testParser . path ( ) )
|
ShouldCallGetWarnings ( ) { "<AssertPlaceHolder>" ; } getWarnings ( ) { if ( ( warnings ) == null ) { if ( ! ( results . hasWarnings ( ) ) ) { warnings = java . util . Collections . emptyList ( ) ; } else { java . util . List < java . lang . String > messages = new java . util . LinkedList < java . lang . String > ( ) ; for ( org . modeshape . common . collection . Problem problem : results . getProblems ( ) ) { if ( ( problem . getStatus ( ) ) == ( org . modeshape . common . collection . Problem . Status . WARNING ) ) { java . lang . String msg = problem . getMessageString ( ) ; if ( ! ( messages . contains ( msg ) ) ) messages . add ( msg ) ; } } warnings = java . util . Collections . unmodifiableList ( messages ) ; } } return warnings ; }
|
org . junit . Assert . assertNull ( conn . getWarnings ( ) )
|
givenDbConnectionL_whenFetch_thenCorrect ( ) { java . sql . PreparedStatement pstmt = null ; java . sql . ResultSet rs = null ; java . util . List < com . baeldung . jdbc . Employee > listOfEmployees = new java . util . ArrayList < com . baeldung . jdbc . Employee > ( ) ; try { pstmt = com . baeldung . jdbc . ResultSetLiveTest . dbConnection . prepareStatement ( "select<sp>*<sp>from<sp>employees" , ResultSet . TYPE_SCROLL_SENSITIVE , ResultSet . CONCUR_UPDATABLE ) ; pstmt . setFetchSize ( 1 ) ; rs = pstmt . executeQuery ( ) ; rs . setFetchSize ( 1 ) ; while ( rs . next ( ) ) { com . baeldung . jdbc . Employee employee = populateResultSet ( rs ) ; listOfEmployees . add ( employee ) ; } } catch ( java . lang . Exception e ) { throw e ; } finally { if ( rs != null ) rs . close ( ) ; if ( pstmt != null ) pstmt . close ( ) ; } "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , listOfEmployees . size ( ) )
|
testPutStatusFaildAllFlow ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) )
|
givenStringBuilder_whenAppended_thenModified ( ) { java . lang . StringBuilder test = new java . lang . StringBuilder ( ) ; test . append ( "a" ) ; int firstAddressOfTest = java . lang . System . identityHashCode ( test ) ; test . append ( "b" ) ; int secondAddressOfTest = java . lang . System . identityHashCode ( test ) ; "<AssertPlaceHolder>" ; } append ( ch . qos . logback . classic . spi . ILoggingEvent ) { com . baeldung . failureanalyzer . utils . ListAppender . events . add ( eventObject ) ; }
|
org . junit . Assert . assertEquals ( firstAddressOfTest , secondAddressOfTest )
|
testAmbiguityFromAutoValueType ( ) { com . google . auto . value . AutoValueTest . Optional autoOptional = com . google . auto . value . AutoValueTest . Optional . create ( com . google . common . base . Optional . absent ( ) ) ; "<AssertPlaceHolder>" ; } getOptional ( ) { return optional ; }
|
org . junit . Assert . assertEquals ( com . google . common . base . Optional . absent ( ) , autoOptional . getOptional ( ) )
|
testGetRampUp ( ) { System . out . println ( "getRampUp" ) ; kg . apc . jmeter . threads . SteppingThreadGroup instance = new kg . apc . jmeter . threads . SteppingThreadGroup ( ) ; java . lang . String expResult = "" ; java . lang . String result = instance . getRampUp ( ) ; "<AssertPlaceHolder>" ; } getRampUp ( ) { return getPropertyAsString ( com . blazemeter . jmeter . threads . AbstractDynamicThreadGroupModel . RAMP_UP , "" ) ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testUserExists ( ) { boolean b = dao . exists ( ( - 1L ) ) ; "<AssertPlaceHolder>" ; } exists ( PK extends java . io . Serializable ) { org . hibernate . Session sess = getSession ( ) ; org . hibernate . IdentifierLoadAccess byId = sess . byId ( persistentClass ) ; T entity = ( ( T ) ( byId . load ( id ) ) ) ; return entity != null ; }
|
org . junit . Assert . assertTrue ( b )
|
testGetAuthObjWithAzureCli ( ) { final com . microsoft . azure . maven . auth . AzureAuthHelper helper = new com . microsoft . azure . maven . auth . AzureAuthHelper ( mojo ) ; final com . microsoft . azure . maven . auth . AzureAuthHelper helperSpy = spy ( helper ) ; doReturn ( authenticated ) . when ( helperSpy ) . getAuthObjFromAzureCli ( ) ; "<AssertPlaceHolder>" ; verify ( helperSpy , never ( ) ) . getAuthObjFromServerId ( null , null ) ; verify ( helperSpy , never ( ) ) . getAuthObjFromFile ( null ) ; verify ( helperSpy , times ( 1 ) ) . getAuthObjFromAzureCli ( ) ; } getAuthObj ( ) { com . microsoft . azure . management . Azure . Authenticated auth ; final com . microsoft . azure . maven . auth . AuthenticationSetting authSetting = config . getAuthenticationSetting ( ) ; if ( authSetting != null ) { auth = getAuthObjFromServerId ( config . getSettings ( ) , authSetting . getServerId ( ) ) ; if ( auth == null ) { auth = getAuthObjFromFile ( authSetting . getFile ( ) ) ; } } else { auth = getAuthObjFromAzureCli ( ) ; } return auth ; }
|
org . junit . Assert . assertSame ( authenticated , helperSpy . getAuthObj ( ) )
|
upgradeFundingsToVrc2Test ( ) { javax . xml . bind . JAXBContext jaxbContext1 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_rc1 . Fundings . class ) ; javax . xml . bind . JAXBContext jaxbContext2 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_rc1 . Fundings . class ) ; javax . xml . bind . Unmarshaller jaxbUnmarshaller = jaxbContext1 . createUnmarshaller ( ) ; java . io . InputStream rc1Stream = org . orcid . record_2_0 . ConvertVrc1ToVrc2Test . class . getClassLoader ( ) . getResourceAsStream ( "test-fundings-2.0_rc1.xml" ) ; java . io . InputStream rc2Stream = org . orcid . record_2_0 . ConvertVrc1ToVrc2Test . class . getClassLoader ( ) . getResourceAsStream ( "test-fundings-2.0_rc2.xml" ) ; org . orcid . jaxb . model . record . summary_rc1 . Fundings rc1Fundings = ( ( org . orcid . jaxb . model . record . summary_rc1 . Fundings ) ( jaxbUnmarshaller . unmarshal ( rc1Stream ) ) ) ; jaxbUnmarshaller = jaxbContext2 . createUnmarshaller ( ) ; org . orcid . jaxb . model . record . summary_rc2 . Fundings rc2Fundings1 = ( ( org . orcid . jaxb . model . record . summary_rc2 . Fundings ) ( jaxbUnmarshaller . unmarshal ( rc2Stream ) ) ) ; org . orcid . core . version . V2Convertible result = versionConverterV2_0_rc1ToV2_0_rc2 . upgrade ( new org . orcid . core . version . V2Convertible ( rc1Fundings , "v2_rc1" ) ) ; org . orcid . jaxb . model . record . summary_rc2 . Fundings rc2Fundings2 = ( ( org . orcid . jaxb . model . record . summary_rc2 . Fundings ) ( result . getObjectToConvert ( ) ) ) ; "<AssertPlaceHolder>" ; } getLastModifiedDate ( ) { return lastModifiedDate ; }
|
org . junit . Assert . assertEquals ( rc2Fundings1 . getLastModifiedDate ( ) , rc2Fundings2 . getLastModifiedDate ( ) )
|
__A$Object_Exists ( ) { com . m3 . scalaflavor4j . SMap < java . lang . String , java . lang . Integer > map = com . m3 . scalaflavor4j . SMap . < java . lang . String , java . lang . Integer > apply ( ) . updated ( "foo" , 123 ) . updated ( "bar" , 234 ) ; java . lang . Integer v = map . apply ( "foo" ) ; "<AssertPlaceHolder>" ; } apply ( com . m3 . scalaflavor4j . CollectionLike ) { return new com . m3 . scalaflavor4j . ForComprehension1 < T1 > ( xs ) ; }
|
org . junit . Assert . assertThat ( v , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 123 ) ) )
|
classLoaderModelWithIncludeTestDependencies ( ) { D desc = createArtifactDescriptor ( ( ( getArtifactRootFolder ( ) ) + "/include-test-dependencies" ) ) ; org . mule . runtime . module . artifact . api . descriptor . ClassLoaderModel classLoaderModel = desc . getClassLoaderModel ( ) ; "<AssertPlaceHolder>" ; } isIncludeTestDependencies ( ) { return includeTestDependencies ; }
|
org . junit . Assert . assertThat ( classLoaderModel . isIncludeTestDependencies ( ) , org . hamcrest . core . Is . is ( true ) )
|
equalsReflexiveTest ( ) { System . out . print ( "-><sp>Reflexive<sp>equals<sp>-<sp>" ) ; ua . com . alexcoffee . model . position . SalePosition position = new ua . com . alexcoffee . model . position . SalePosition ( ) ; "<AssertPlaceHolder>" ; System . out . println ( "OK!" ) ; } equals ( java . lang . Object ) { boolean result = super . equals ( object ) ; if ( result ) { final ua . com . alexcoffee . model . position . SalePosition position = ( ( ua . com . alexcoffee . model . position . SalePosition ) ( object ) ) ; result = ( this . number ) == ( position . number ) ; if ( isNotNull ( this . product ) ) { result &= this . product . equals ( position . product ) ; } else { result &= isNull ( position . product ) ; } } return result ; }
|
org . junit . Assert . assertTrue ( position . equals ( position ) )
|
testViewInitialization ( ) { org . dashbuilder . dataset . filter . DataSetFilter filter = new org . dashbuilder . dataset . filter . DataSetFilter ( ) ; org . dashbuilder . dataset . filter . ColumnFilter filter1 = org . dashbuilder . dataset . filter . FilterFactory . equalsTo ( "column1" , "Test" ) ; filter . addFilterColumn ( filter1 ) ; org . dashbuilder . displayer . client . widgets . filter . DataSetFilterEditor filterEditor = new org . dashbuilder . displayer . client . widgets . filter . DataSetFilterEditor ( filterView , beanManager , changedEvent ) ; filterEditor . init ( filter , metadata ) ; "<AssertPlaceHolder>" ; verify ( filterView ) . showNewFilterHome ( ) ; verify ( filterView ) . addColumn ( "column1" ) ; verify ( filterView ) . addColumn ( "column2" ) ; verify ( filterView ) . addColumn ( "column3" ) ; verify ( filterView , times ( filter . getColumnFilterList ( ) . size ( ) ) ) . addColumnFilterEditor ( any ( org . dashbuilder . displayer . client . widgets . filter . ColumnFilterEditor . class ) ) ; }
|
org . junit . Assert . assertEquals ( filterView , filterEditor . view )
|
testLooseInvocationRightBoxing ( ) { java . util . List < net . sourceforge . pmd . lang . java . typeresolution . typeinference . BoundOrConstraint > result = new net . sourceforge . pmd . lang . java . typeresolution . typeinference . Constraint ( number , primitiveInt , LOOSE_INVOCATION ) . reduce ( ) ; "<AssertPlaceHolder>" ; testBoundOrConstraint ( result . get ( 0 ) , number , integer , net . sourceforge . pmd . typeresolution . EQUALITY , net . sourceforge . pmd . lang . java . typeresolution . typeinference . Constraint . class ) ; } size ( ) { return rules . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , result . size ( ) )
|
testQueryableChain ( ) { final java . util . Iterator < java . lang . Integer > expected = java . util . Arrays . asList ( 2 , 2 , 2 ) . iterator ( ) ; me . josephzhu . java8inaction . test . queryable . Queryable . of ( data ) . distinct ( ) . filter ( ( w ) -> ! ( w . startsWith ( "-" ) ) ) . map ( String :: length ) . limit ( 3 ) . forEach ( ( l ) -> "<AssertPlaceHolder>" ) ; } limit ( long ) { final int [ ] count = new int [ ] { 0 } ; return ( action ) -> ( ( count [ 0 ] ) ++ ) < maxSize ? tryAdvance ( action ) : false ; }
|
org . junit . Assert . assertEquals ( expected . next ( ) , l )
|
getPentahoMapReduceReducerClass ( ) { "<AssertPlaceHolder>" ; } getPentahoMapReduceReducerClass ( ) { org . junit . Assert . assertEquals ( org . pentaho . hadoop . mapreduce . GenericTransReduce . class , new org . pentaho . hadoop . shim . common . CommonHadoopShim ( ) . getPentahoMapReduceReducerClass ( ) ) ; }
|
org . junit . Assert . assertEquals ( org . pentaho . hadoop . mapreduce . GenericTransReduce . class , new org . pentaho . hadoop . shim . common . CommonHadoopShim ( ) . getPentahoMapReduceReducerClass ( ) )
|
testIO ( ) { ivory . bloomir . data . Bits bits = new ivory . bloomir . data . Bits ( 40 ) ; int [ ] indexes = new int [ ] { 0 , 5 , 10 , 38 } ; for ( int i : indexes ) { bits . set ( i ) ; } java . io . ByteArrayOutputStream byteOut = new java . io . ByteArrayOutputStream ( ) ; java . io . DataOutputStream dataOut = new java . io . DataOutputStream ( byteOut ) ; bits . write ( dataOut ) ; dataOut . close ( ) ; java . io . ByteArrayInputStream byteIn = new java . io . ByteArrayInputStream ( byteOut . toByteArray ( ) ) ; java . io . DataInputStream dataIn = new java . io . DataInputStream ( byteIn ) ; ivory . bloomir . data . Bits bitsCopy = new ivory . bloomir . data . Bits ( ) ; bitsCopy . readFields ( dataIn ) ; "<AssertPlaceHolder>" ; } readFields ( java . io . DataInput ) { signature = new ivory . lsh . data . NBitSignature ( ) ; try { permNo = in . readInt ( ) ; } catch ( java . io . IOException e1 ) { e1 . printStackTrace ( ) ; throw new java . lang . RuntimeException ( "Could<sp>not<sp>read<sp>permNo<sp>in<sp>PairOfIntSignature" ) ; } try { signature . readFields ( in ) ; } catch ( java . io . IOException e ) { ivory . lsh . data . PairOfIntNBitSignature . logger . warn ( "NULL<sp>SIGNATURE!" ) ; signature = null ; } }
|
org . junit . Assert . assertEquals ( bits , bitsCopy )
|
testCloseListener1 ( ) { final java . util . concurrent . atomic . AtomicInteger acc = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; com . moilioncircle . redis . replicator . Replicator replicator = new com . moilioncircle . redis . replicator . RedisReplicator ( new com . moilioncircle . redis . replicator . io . RateLimitInputStream ( com . moilioncircle . redis . replicator . RedisSocketReplicatorTest . class . getClassLoader ( ) . getResourceAsStream ( "dumpV6.rdb" ) , 1000 ) , FileType . RDB , com . moilioncircle . redis . replicator . Configuration . defaultSetting ( ) ) ; replicator . addCloseListener ( new com . moilioncircle . redis . replicator . CloseListener ( ) { @ com . moilioncircle . redis . replicator . Override public void handle ( com . moilioncircle . redis . replicator . Replicator replicator ) { acc . incrementAndGet ( ) ; } } ) ; replicator . open ( ) ; "<AssertPlaceHolder>" ; } open ( ) { com . moilioncircle . redis . replicator . Replicator replicator = new com . moilioncircle . redis . replicator . RedisReplicator ( new com . moilioncircle . redis . replicator . io . RateLimitInputStream ( com . moilioncircle . redis . replicator . RedisSocketReplicatorTest . class . getClassLoader ( ) . getResourceAsStream ( "appendonly1.aof" ) , 1000 ) , FileType . AOF , com . moilioncircle . redis . replicator . Configuration . defaultSetting ( ) ) ; final java . util . concurrent . atomic . AtomicInteger acc = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; replicator . addEventListener ( new com . moilioncircle . redis . replicator . event . EventListener ( ) { @ com . moilioncircle . redis . replicator . Override public void onEvent ( com . moilioncircle . redis . replicator . Replicator replicator , com . moilioncircle . redis . replicator . event . Event event ) { if ( event instanceof com . moilioncircle . redis . replicator . cmd . Command ) { acc . incrementAndGet ( ) ; } } } ) ; replicator . open ( ) ; org . junit . Assert . assertEquals ( 4 , acc . get ( ) ) ; }
|
org . junit . Assert . assertEquals ( 1 , acc . get ( ) )
|
testDeleteWordFromList ( ) { System . out . println ( "deleteWordFromList" ) ; java . lang . String permalink = net . jeremybrooks . knicker . WordListApiTest . testList . getPermalink ( ) ; java . lang . String word = "test" ; net . jeremybrooks . knicker . WordListApi . deleteWordFromList ( net . jeremybrooks . knicker . WordListApiTest . token , permalink , word ) ; java . util . List < net . jeremybrooks . knicker . dto . WordListWord > result = net . jeremybrooks . knicker . WordListApi . getWordsFromList ( net . jeremybrooks . knicker . WordListApiTest . token , permalink ) ; net . jeremybrooks . knicker . logger . KnickerLogger . getLogger ( ) . log ( "****************************************" ) ; net . jeremybrooks . knicker . logger . KnickerLogger . getLogger ( ) . log ( result . toString ( ) ) ; net . jeremybrooks . knicker . logger . KnickerLogger . getLogger ( ) . log ( "****************************************" ) ; "<AssertPlaceHolder>" ; } log ( java . lang . String ) { System . out . println ( message ) ; }
|
org . junit . Assert . assertEquals ( result . size ( ) , 0 )
|
testFromStringValid ( ) { java . lang . String [ ] validCpfCnpjs = new java . lang . String [ ] { "855.826.525-90" 9 , "60.871.888/0001-60" 0 , "60.871.888/0001-60" 1 , "855.826.525-90" 1 , "855.826.525-90" 5 , "04642835903" , "023.750.169-47" , "02375016947" , "855.826.525-90" , "855.826.525-90" 2 , "06.305.901/0001-78" , "855.826.525-90" 6 , "855.826.525-90" 7 , "60.871.888/0001-60" 3 , "46.868.328/0001-25" , "855.826.525-90" 8 , "58.647.246/0001-30" , "37.961.612/0001-50" , "855.826.525-90" 4 , "24.152.237/0001-56" , "60.871.888/0001-60" , "855.826.525-90" 3 , "855.826.525-90" 0 , "60.871.888/0001-60" 2 } ; for ( java . lang . String cpfCnpj : validCpfCnpjs ) { "<AssertPlaceHolder>" ; } } fromString ( java . lang . String ) { try { br . com . insula . opes . Cpf cpf = br . com . insula . opes . Cpf . fromString ( s ) ; return new br . com . insula . opes . CpfCnpj ( cpf ) ; } catch ( java . lang . IllegalArgumentException ex ) { } try { br . com . insula . opes . Cnpj cnpj = br . com . insula . opes . Cnpj . fromString ( s ) ; return new br . com . insula . opes . CpfCnpj ( cnpj ) ; } catch ( java . lang . IllegalArgumentException ex ) { } throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "CPF/CNPJ<sp>inválido:<sp>%s." , s ) ) ; }
|
org . junit . Assert . assertNotNull ( br . com . insula . opes . CpfCnpj . fromString ( cpfCnpj ) )
|
shouldReturnNotEqual ( ) { org . eclipse . jgit . lib . Repository leftRepo = lookupRepository ( leftRepoFile ) ; org . eclipse . jgit . lib . Repository rightRepo = lookupRepository ( rightRepoFile ) ; org . eclipse . egit . ui . internal . synchronize . model . GitModelRepository left = new org . eclipse . egit . ui . internal . synchronize . model . GitModelRepository ( getGSD ( leftRepo ) ) ; org . eclipse . egit . ui . internal . synchronize . model . GitModelRepository right = new org . eclipse . egit . ui . internal . synchronize . model . GitModelRepository ( getGSD ( rightRepo ) ) ; boolean actual = left . equals ( right ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } org . eclipse . egit . ui . CommitMessageWithCaretPosition other = ( ( org . eclipse . egit . ui . CommitMessageWithCaretPosition ) ( obj ) ) ; return ( ( caretPosition ) == ( other . caretPosition ) ) && ( java . util . Objects . equals ( message , other . message ) ) ; }
|
org . junit . Assert . assertFalse ( actual )
|
testMarshalObject ( ) { java . lang . String result = ( ( java . lang . String ) ( producerTemplate . sendBody ( "direct:internal1" , ExchangePattern . InOut , "message" ) ) ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( "message" , result )
|
testReadNoType ( ) { com . github . anno4j . Anno4j anno4j = new com . github . anno4j . Anno4j ( new org . openrdf . repository . sail . SailRepository ( new org . openrdf . sail . memory . MemoryStore ( ) ) , null , false ) ; org . openrdf . repository . RepositoryConnection repoConnection = anno4j . getRepository ( ) . getConnection ( ) ; repoConnection . add ( new org . openrdf . model . impl . StatementImpl ( new org . openrdf . model . impl . URIImpl ( "urn:anno4j_test:p1" ) , new org . openrdf . model . impl . URIImpl ( FOAF . MBOX ) , new org . openrdf . model . impl . LiteralImpl ( "alice@example.org" ) ) ) ; com . github . anno4j . model . impl . agent . Person p = anno4j . findByID ( com . github . anno4j . model . impl . agent . Person . class , "urn:anno4j_test:p1" ) ; "<AssertPlaceHolder>" ; } findByID ( java . lang . Class , java . lang . String ) { com . github . anno4j . Transaction transaction = createTransaction ( ) ; if ( ( defaultContext ) != null ) { transaction . setAllContexts ( defaultContext ) ; } return transaction . findByID ( type , id ) ; }
|
org . junit . Assert . assertNull ( p )
|
usesCustomCollectionIfGiven ( ) { org . springframework . data . mongodb . repository . query . MongoEntityInformation < org . springframework . data . mongodb . repository . Person , java . lang . Long > information = new org . springframework . data . mongodb . repository . support . MappingMongoEntityInformation < org . springframework . data . mongodb . repository . Person , java . lang . Long > ( info , "foobar" ) ; "<AssertPlaceHolder>" ; } getCollectionName ( ) { return collectionName ; }
|
org . junit . Assert . assertThat ( information . getCollectionName ( ) , org . hamcrest . CoreMatchers . is ( "foobar" ) )
|
shouldBeAbleToExportArchive ( ) { java . lang . String content = org . jboss . shrinkwrap . api . ShrinkWrap . create ( org . jboss . shrinkwrap . api . spec . WebArchive . class , "test.jar" ) . addAsResource ( new java . io . File ( "src/test/resources/tooling/arquillian.xml" ) , org . jboss . shrinkwrap . api . ArchivePaths . create ( "resource.xml" ) ) . addAsResource ( "tooling/arquillian.xml" , org . jboss . shrinkwrap . api . ArchivePaths . create ( "resource2.xml" ) ) . addAsResource ( new java . io . File ( "src/test/resources/tooling/arquillian.xml" ) . toURI ( ) . toURL ( ) , org . jboss . shrinkwrap . api . ArchivePaths . create ( "resource3.xml" ) ) . addClass ( org . jboss . arquillian . container . test . impl . client . deployment . tool . ToolingDeploymentFormatterTestCase . class ) . addAsServiceProvider ( org . jboss . arquillian . container . test . impl . client . deployment . tool . ToolingDeploymentFormatterTestCase . Service . class , org . jboss . arquillian . container . test . impl . client . deployment . tool . ToolingDeploymentFormatterTestCase . ServiceImpl . class ) . addAsLibrary ( org . jboss . shrinkwrap . api . ShrinkWrap . create ( org . jboss . shrinkwrap . api . spec . JavaArchive . class , "test.jar" ) . addClass ( org . jboss . arquillian . container . test . impl . client . deployment . tool . ToolingDeploymentFormatter . class ) ) . toString ( new org . jboss . arquillian . container . test . impl . client . deployment . tool . ToolingDeploymentFormatter ( getClass ( ) ) ) ; "<AssertPlaceHolder>" ; System . out . println ( content ) ; } toString ( java . util . Collection ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( org . jboss . arquillian . core . spi . ExtensionLoader loader : loaders ) { sb . append ( loader . getClass ( ) . getName ( ) ) . append ( ",<sp>" ) ; } return sb . toString ( ) ; }
|
org . junit . Assert . assertNotNull ( content )
|
testInvalidPort ( ) { node . getAttributes ( ) . put ( "port" , "1234567890" ) ; "<AssertPlaceHolder>" ; } buildPlugin ( ) { return ( ( org . apache . logging . log4j . core . config . plugins . validation . HostAndPort ) ( new org . apache . logging . log4j . core . config . plugins . util . PluginBuilder ( plugin ) . setConfiguration ( new org . apache . logging . log4j . core . config . NullConfiguration ( ) ) . setConfigurationNode ( node ) . build ( ) ) ) ; }
|
org . junit . Assert . assertNull ( buildPlugin ( ) )
|
testOk ( ) { final nl . bzk . migratiebrp . bericht . model . sync . impl . BlokkeringAntwoordBericht antwoord = new nl . bzk . migratiebrp . bericht . model . sync . impl . BlokkeringAntwoordBericht ( ) ; antwoord . setStatus ( StatusType . OK ) ; final java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap ( ) ; parameters . put ( "blokkeringAntwoordBericht" , berichtenDao . bewaarBericht ( antwoord ) ) ; "<AssertPlaceHolder>" ; } execute ( java . util . Map ) { nl . bzk . migratiebrp . isc . jbpm . uc1003 . MaakZoekPersoonBerichtAction . LOG . debug ( "execute(parameters={})" , parameters ) ; final java . lang . Long berichtId = ( ( java . lang . Long ) ( parameters . get ( "input" ) ) ) ; final nl . bzk . migratiebrp . bericht . model . lo3 . Lo3Bericht input = ( ( nl . bzk . migratiebrp . bericht . model . lo3 . Lo3Bericht ) ( berichtenDao . leesBericht ( berichtId ) ) ) ; final nl . bzk . migratiebrp . bericht . model . sync . SyncBericht verzoek = maakZoekPersoonVerzoekBericht ( input ) ; final java . lang . Long verzoekId = berichtenDao . bewaarBericht ( verzoek ) ; final java . util . Map < java . lang . String , java . lang . Object > result = new java . util . HashMap ( ) ; result . put ( "zoekPersoonVerzoek" , verzoekId ) ; nl . bzk . migratiebrp . isc . jbpm . uc1003 . MaakZoekPersoonBerichtAction . LOG . debug ( "result:<sp>{}" , result ) ; return result ; }
|
org . junit . Assert . assertEquals ( null , subject . execute ( parameters ) )
|
addPlayerShouldHaveSurvivalKey ( ) { org . bukkit . entity . Player player = mockPlayer ( "playah" , GameMode . SURVIVAL ) ; me . gnat008 . perworldinventory . groups . Group group = me . gnat008 . perworldinventory . TestHelper . mockGroup ( "test" ) ; given ( settings . getProperty ( PwiProperties . SEPARATE_GAMEMODE_INVENTORIES ) ) . willReturn ( true ) ; java . lang . String result = playerManager . makeKey ( player . getUniqueId ( ) , group , GameMode . SURVIVAL ) ; java . lang . String expected = ( me . gnat008 . perworldinventory . TestHelper . TEST_UUID ) + ".test.survival" ; "<AssertPlaceHolder>" ; } makeKey ( java . util . UUID , me . gnat008 . perworldinventory . groups . Group , org . bukkit . GameMode ) { java . lang . String key = ( ( ( uuid . toString ( ) ) + "." ) + ( group . getName ( ) ) ) + "." ; if ( settings . getProperty ( PwiProperties . SEPARATE_GAMEMODE_INVENTORIES ) ) key += gameMode . toString ( ) . toLowerCase ( ) ; else key += "survival" ; return key ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( expected ) )
|
test_simple_replace_3 ( ) { final java . lang . String input = "{{!PREFIX<sp>local:<sp><http://localhost/local/>" + ( ( "PREFIX<sp>:<sp><http://default/>}}\n" + "{{:name}}\n" ) + "{{local:name}}" ) ; final java . lang . String expected = "\n" + ( "{{http://default/name}}\n" + "{{http://localhost/local/name}}" ) ; "<AssertPlaceHolder>" ; } expand ( java . lang . String ) { final java . lang . StringBuffer commentBuffer = new java . lang . StringBuffer ( 64 ) ; final java . lang . StringBuffer queryBuffer = new java . lang . StringBuffer ( queryString . length ( ) ) ; com . linkedpipes . plugin . transformer . mustachechunked . MustacheTemplatePrefixExpander . parseCommentQuery ( queryString , commentBuffer , queryBuffer ) ; final java . util . Map < java . lang . String , java . lang . String > prefixes = com . linkedpipes . plugin . transformer . mustachechunked . MustacheTemplatePrefixExpander . readPrefixes ( commentBuffer . toString ( ) ) ; return com . linkedpipes . plugin . transformer . mustachechunked . MustacheTemplatePrefixExpander . expand ( prefixes , queryBuffer . toString ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , com . linkedpipes . plugin . transformer . mustachechunked . MustacheTemplatePrefixExpander . expand ( input ) )
|
testGetParametersWithDefaultEntityAndDisabledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . specoffer . SpecOfferType entity = new org . lnu . is . domain . specoffer . SpecOfferType ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "userGroups" , groups ) ; 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 )
|
givenLUAScript_thenExecuteScriptOnRedis ( ) { com . baeldung . RedissonIntegrationTest . client . getBucket ( "foo" ) . set ( "bar" ) ; java . lang . String result = com . baeldung . RedissonIntegrationTest . client . getScript ( ) . eval ( RScript . Mode . READ_ONLY , "return<sp>redis.call('get',<sp>'foo')" , RScript . ReturnType . VALUE ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ! ( obj instanceof com . baeldung . jackson . entities . MyPair ) ) { return false ; } com . baeldung . jackson . entities . MyPair other = ( ( com . baeldung . jackson . entities . MyPair ) ( obj ) ) ; if ( ( first ) == null ) { if ( ( other . first ) != null ) { return false ; } } else if ( ! ( first . equals ( other . first ) ) ) { return false ; } if ( ( second ) == null ) { if ( ( other . second ) != null ) { return false ; } } else if ( ! ( second . equals ( other . second ) ) ) { return false ; } return true ; }
|
org . junit . Assert . assertTrue ( result . equals ( "bar" ) )
|
redundant ( ) { java . util . List < de . hu . berlin . wbi . objects . MutationMention > mutationMentions = seth . findMutations ( "Mention<sp>with<sp>hyphens:<sp>(rs1001),<sp>colon<sp>:rs123,<sp>slash<sp>/rs754;<sp>" ) ; "<AssertPlaceHolder>" ; } findMutations ( java . lang . String ) { seth . Set < seth . MutationMention > mutations = new seth . HashSet < seth . MutationMention > ( ) ; if ( ( seth ) != null ) mutations . addAll ( seth . extractMutations ( text ) ) ; if ( ( snpRecognizer ) != null ) mutations . addAll ( snpRecognizer . extractMutations ( text ) ) ; if ( ( bl ) != null ) mutations . addAll ( bl . extractMutations ( text ) ) ; try { seth . Map < edu . uchsc . ccp . nlp . ei . mutation . Mutation , seth . Set < int [ ] > > map = mf . extractMutations ( text ) ; for ( edu . uchsc . ccp . nlp . ei . mutation . Mutation mutation : map . keySet ( ) ) { edu . uchsc . ccp . nlp . ei . mutation . PointMutation pm = ( ( edu . uchsc . ccp . nlp . ei . mutation . PointMutation ) ( mutation ) ) ; for ( int [ ] location : map . get ( mutation ) ) { java . lang . String originalMatch = text . substring ( location [ 0 ] , location [ 1 ] ) ; seth . MutationMention tmpMutation = new seth . MutationMention ( location [ 0 ] , location [ 1 ] , originalMatch , null , pm . getPosition ( ) , java . lang . String . valueOf ( pm . getWtResidue ( ) ) , java . lang . String . valueOf ( pm . getMutResidue ( ) ) , seth . ner . wrapper . Type . SUBSTITUTION , MutationMention . Tool . MUTATIONFINDER ) ; tmpMutation . setPatternId ( pm . getId ( ) ) ; if ( pm . isMatchesLongForm ( ) ) { tmpMutation . setPsm ( true ) ; tmpMutation . setAmbiguous ( false ) ; tmpMutation . setNsm ( false ) ; } mutations . add ( tmpMutation ) ; } } } catch ( edu . uchsc . ccp . nlp . ei . mutation . MutationException e ) { e . printStackTrace ( ) ; java . lang . System . exit ( 1 ) ; } seth . List < seth . MutationMention > result = new seth . ArrayList < seth . MutationMention > ( mutations . size ( ) ) ; for ( seth . MutationMention mm : mutations ) { boolean contained = false ; loop : for ( seth . MutationMention m : result ) { boolean equal = false ; equal = ( ( seth . Objects . equals ( mm . getPosition ( ) , m . getPosition ( ) ) ) && ( seth . Objects . equals ( mm . getMutResidue ( ) , m . getMutResidue ( ) ) ) ) && ( seth . Objects . equals ( mm . getWtResidue ( ) , m . getWtResidue ( ) ) ) ; if ( ( ( mm . getStart ( ) ) == ( m . getStart ( ) ) ) && ( ( mm . getEnd ( ) ) == ( m . getEnd ( ) ) ) ) { if ( ( ( mm . getTool ( ) ) == ( MutationMention . Tool . SETH ) ) && ( ( m . getTool ( ) ) == ( MutationMention . Tool . DBSNP ) ) ) { contained = true ; break loop ; } else if ( ( ( m . getTool ( ) ) == ( MutationMention . Tool . SETH ) ) && ( ( mm . getTool ( ) ) == ( MutationMention . Tool . DBSNP ) ) ) { result . remove ( m ) ; break loop ; } } else if ( ( ( ( mm . getStart ( ) ) >= ( m . getStart ( ) ) ) && ( ( mm . getEnd ( ) ) <= ( m . getEnd ( ) ) ) ) && equal ) { contained = true ; break loop ; } else if ( ( ( ( m . getStart ( ) ) >= ( mm . getStart ( ) ) ) && ( ( m . getEnd ( ) ) <= ( mm . getEnd ( ) ) ) ) && equal ) { result . remove ( m ) ; break loop ; } } if ( ! contained ) result . add ( mm ) ; } return result ; }
|
org . junit . Assert . assertEquals ( mutationMentions . size ( ) , 3 )
|
testResizeVolumeCommandException2 ( ) { final java . lang . String path = "nfs:/127.0.0.1/storage/secondary" ; final com . cloud . legacymodel . to . StorageFilerTO pool = org . mockito . Mockito . mock ( com . cloud . legacymodel . to . StorageFilerTO . class ) ; final java . lang . Long currentSize = 100L ; final java . lang . Long newSize = 200L ; final boolean shrinkOk = false ; final java . lang . String vmInstance = "Test" ; final com . cloud . legacymodel . communication . command . ResizeVolumeCommand command = new com . cloud . legacymodel . communication . command . ResizeVolumeCommand ( path , pool , currentSize , newSize , shrinkOk , vmInstance ) ; final com . cloud . agent . resource . kvm . storage . KvmStoragePoolManager storagePoolMgr = org . mockito . Mockito . mock ( com . cloud . agent . resource . kvm . storage . KvmStoragePoolManager . class ) ; final com . cloud . agent . resource . kvm . storage . KvmStoragePool storagePool = org . mockito . Mockito . mock ( com . cloud . agent . resource . kvm . storage . KvmStoragePool . class ) ; when ( this . libvirtComputingResource . getStoragePoolMgr ( ) ) . thenReturn ( storagePoolMgr ) ; when ( storagePoolMgr . getStoragePool ( pool . getType ( ) , pool . getUuid ( ) ) ) . thenReturn ( storagePool ) ; when ( storagePool . getPhysicalDisk ( path ) ) . thenThrow ( com . cloud . legacymodel . exceptions . CloudRuntimeException . class ) ; final com . cloud . agent . resource . kvm . wrapper . LibvirtRequestWrapper wrapper = com . cloud . agent . resource . kvm . wrapper . LibvirtRequestWrapper . getInstance ( ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { return com . cloud . agent . resource . kvm . wrapper . LibvirtRequestWrapper . instance ; }
|
org . junit . Assert . assertNotNull ( wrapper )
|
createsRole ( ) { org . springframework . data . jpa . domain . sample . Role reference = new org . springframework . data . jpa . domain . sample . Role ( "ADMIN" ) ; org . springframework . data . jpa . domain . sample . Role result = repository . save ( reference ) ; "<AssertPlaceHolder>" ; } save ( org . springframework . data . jpa . repository . cdi . Person ) { unqualifiedRepo . save ( person ) ; qualifiedRepo . save ( person ) ; }
|
org . junit . Assert . assertThat ( result , is ( reference ) )
|
testRelocationsWithArtifact ( ) { final java . util . Properties p = new java . util . Properties ( ) ; p . setProperty ( ( ( RelocationState . DEPENDENCY_RELOCATIONS ) + "oldGroupId:oldArtifactId@newGroupId:newArtifactId" ) , "1.10" ) ; final org . commonjava . maven . ext . core . state . RelocationState state = new org . commonjava . maven . ext . core . state . RelocationState ( p ) ; "<AssertPlaceHolder>" ; } isEnabled ( ) { return ( ( ( incrementalSerialSuffix ) != null ) || ( ( suffix ) != null ) ) || ( ( override ) != null ) ; }
|
org . junit . Assert . assertThat ( state . isEnabled ( ) , org . hamcrest . CoreMatchers . equalTo ( true ) )
|
testSearchByNameAndDescription ( ) { addStructure ( com . liferay . dynamic . data . mapping . service . test . DDMStructureLocalServiceTest . _classNameId , "Contact" , "Contact" ) ; addStructure ( com . liferay . dynamic . data . mapping . service . test . DDMStructureLocalServiceTest . _classNameId , "Event" , "Event" ) ; java . util . List < com . liferay . dynamic . data . mapping . model . DDMStructure > structures = com . liferay . dynamic . data . mapping . service . DDMStructureLocalServiceUtil . search ( com . liferay . portal . kernel . test . util . TestPropsValues . getCompanyId ( ) , new long [ ] { group . getGroupId ( ) } , com . liferay . dynamic . data . mapping . service . test . DDMStructureLocalServiceTest . _classNameId , "Contact" , "Event" , null , DDMStructureConstants . TYPE_DEFAULT , WorkflowConstants . STATUS_APPROVED , true , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( structures . toString ( ) , 2 , structures . size ( ) )
|
testGetLogSegments ( ) { java . util . List < org . apache . distributedlog . LogSegmentMetadata > segments = mock ( java . util . List . class ) ; when ( impl . getLogSegments ( ) ) . thenReturn ( segments ) ; "<AssertPlaceHolder>" ; verify ( impl , times ( 1 ) ) . getLogSegments ( ) ; } getLogSegments ( ) { return org . apache . distributedlog . util . Utils . ioResult ( getLogSegmentsAsync ( ) ) ; }
|
org . junit . Assert . assertEquals ( segments , manager . getLogSegments ( ) )
|
testConstants_1 ( ) { org . jinstagram . realtime . Constants result = new org . jinstagram . realtime . Constants ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( result )
|
getPrefix_shouldReturnNullIfObscure_patientsIsSetToTrue ( ) { org . openmrs . util . OpenmrsConstants . OBSCURE_PATIENTS = true ; org . openmrs . PersonName pn = new org . openmrs . PersonName ( ) ; pn . setPrefix ( "a<sp>non-null<sp>name" ) ; "<AssertPlaceHolder>" ; org . openmrs . util . OpenmrsConstants . OBSCURE_PATIENTS = false ; } getPrefix ( ) { if ( org . openmrs . util . OpenmrsConstants . OBSCURE_PATIENTS ) { return null ; } return prefix ; }
|
org . junit . Assert . assertNull ( pn . getPrefix ( ) )
|
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . workflow . kaleo . model . KaleoTaskInstanceToken . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "kaleoTaskInstanceTokenId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "kaleoTaskInstanceTokenId" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
|
testSameX ( ) { java . util . List < org . openpnp . model . Placement > points = new java . util . ArrayList ( ) ; points . add ( ReferenceFiducialLocatorTest . createPlacement ( 10 , 0 ) ) ; points . add ( ReferenceFiducialLocatorTest . createPlacement ( 10 , 100 ) ) ; points . add ( ReferenceFiducialLocatorTest . createPlacement ( 10 , 200 ) ) ; long t = java . lang . System . currentTimeMillis ( ) ; java . util . List < org . openpnp . model . Placement > results = org . openpnp . machine . reference . vision . ReferenceFiducialLocator . getBestFiducials ( points ) ; "<AssertPlaceHolder>" ; System . out . println ( ( ( ( "testSameX<sp>" + results ) + "<sp>in<sp>" ) + ( ( java . lang . System . currentTimeMillis ( ) ) - t ) ) ) ; } getBestFiducials ( java . util . List ) { if ( ( fiducials . size ( ) ) < 3 ) { return fiducials ; } try { java . util . Map < org . openpnp . model . Point , org . openpnp . model . Placement > pointsToPlacements = new java . util . HashMap ( ) ; for ( org . openpnp . model . Placement placement : fiducials ) { org . openpnp . model . Point point = placement . getLocation ( ) . convertToUnits ( LengthUnit . Millimeters ) . getXyPoint ( ) ; pointsToPlacements . put ( point , placement ) ; } java . util . List < org . openpnp . model . Point > points = org . openpnp . util . QuickHull . quickHull ( new java . util . ArrayList ( pointsToPlacements . keySet ( ) ) ) ; fiducials = new java . util . ArrayList ( ) ; for ( org . openpnp . model . Point point : points ) { fiducials . add ( pointsToPlacements . get ( point ) ) ; } } catch ( java . lang . Exception e ) { return org . openpnp . util . Utils2D . mostDistantPair ( fiducials ) ; } org . openpnp . model . Placement [ ] bestPoints = null ; double bestArea = 0 ; for ( java . util . Set < org . openpnp . model . Placement > tri : com . google . common . collect . Sets . powerSet ( com . google . common . collect . Sets . newHashSet ( fiducials ) ) ) { if ( ( tri . size ( ) ) != 3 ) { continue ; } org . openpnp . model . Placement [ ] triPoints = tri . toArray ( new org . openpnp . model . Placement [ ] { } ) ; double a = org . openpnp . util . Utils2D . triangleArea ( triPoints [ 0 ] , triPoints [ 1 ] , triPoints [ 2 ] ) ; if ( ( bestPoints == null ) || ( a > bestArea ) ) { bestPoints = triPoints ; bestArea = a ; } } if ( bestArea == 0 ) { return org . openpnp . util . Utils2D . mostDistantPair ( fiducials ) ; } return java . util . Arrays . asList ( bestPoints ) ; }
|
org . junit . Assert . assertEquals ( results . size ( ) , 2 )
|
testDelete4_delete_black ( ) { tree . delete ( tree . search ( 4 ) ) ; "<AssertPlaceHolder>" ; validateTree ( tree . getRoot ( ) , 2 ) ; } search ( int ) { chapter5 . binarysearchtree . Node result = treeSearch ( node , searchKey ) ; if ( result != null ) { return "success" ; } else { return "fail" ; } }
|
org . junit . Assert . assertNull ( tree . search ( 4 ) )
|
testMergeOfRangesAndSingleValues ( ) { org . antlr . v4 . runtime . misc . IntervalSet s = org . antlr . v4 . runtime . misc . IntervalSet . of ( 0 , 41 ) ; s . add ( 42 ) ; s . add ( 43 , 65534 ) ; java . lang . String expecting = "{0..65534}" ; java . lang . String result = s . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getTarget ( ) ) + ":" ) + ( getTestName ( ) ) ; }
|
org . junit . Assert . assertEquals ( expecting , result )
|
getNoPaymentTypeAvailableMSG_Admin ( ) { org . oscm . ui . model . Service service = new org . oscm . ui . model . Service ( new org . oscm . internal . vo . VOService ( ) ) ; service . setSubscribable ( true ) ; model . setService ( service ) ; when ( userBean . isLoggedInAndAdmin ( ) ) . thenReturn ( Boolean . TRUE ) ; java . lang . String result = ctrl . getNoPaymentTypeAvailableMSG ( ) ; "<AssertPlaceHolder>" ; } getNoPaymentTypeAvailableMSG ( ) { if ( userBean . isLoggedInAndAdmin ( ) ) return SubscriptionDetailsCtrlConstants . MESSAGE_NO_PAYMENT_TYPE_ENABLED ; else return SubscriptionDetailsCtrlConstants . MESSAGE_NO_PAYMENT_TYPE_AVAILABLE ; }
|
org . junit . Assert . assertEquals ( result , SubscriptionDetailsCtrlConstants . MESSAGE_NO_PAYMENT_TYPE_ENABLED )
|
creatingGroupsFromNoSourcePaths ( ) { com . google . common . collect . ImmutableList < com . facebook . buck . apple . GroupedSource > expected = com . google . common . collect . ImmutableList . of ( ) ; com . facebook . buck . core . sourcepath . resolver . SourcePathResolver resolver = com . facebook . buck . core . sourcepath . resolver . impl . DefaultSourcePathResolver . from ( new com . facebook . buck . core . rules . SourcePathRuleFinder ( new com . facebook . buck . core . rules . resolver . impl . TestActionGraphBuilder ( ) ) ) ; com . google . common . collect . ImmutableList < com . facebook . buck . apple . GroupedSource > actual = com . facebook . buck . apple . RuleUtils . createGroupsFromSourcePaths ( resolver :: getRelativePath , com . google . common . collect . ImmutableList . of ( ) , com . google . common . collect . ImmutableList . of ( ) , com . google . common . collect . ImmutableList . of ( ) , com . google . common . collect . ImmutableList . of ( ) , com . google . common . collect . ImmutableList . of ( ) ) ; "<AssertPlaceHolder>" ; } of ( ) { return new com . facebook . buck . rules . coercer . VersionMatchedCollection ( com . google . common . collect . ImmutableList . of ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
update_by_form_1 ( ) { org . apache . jena . sparql . engine . http . Params params = new org . apache . jena . sparql . engine . http . Params ( ) . addParam ( "update" , "INSERT<sp>DATA{}" ) ; try ( org . apache . jena . atlas . web . TypedInputStream in = org . apache . jena . riot . web . HttpOp . execHttpPostFormStream ( org . apache . jena . fuseki . ServerCtl . serviceUpdate ( ) , params , "*" ) ) { "<AssertPlaceHolder>" ; } } serviceUpdate ( ) { return ( ( "http://localhost:" + ( org . apache . jena . fuseki . ServerCtl . port ( ) ) ) + ( org . apache . jena . fuseki . ServerCtl . datasetPath ( ) ) ) + "/update" ; }
|
org . junit . Assert . assertNotNull ( in )
|
testGetColumnHeader ( ) { mmarquee . automation . AutomationElement element = org . mockito . Mockito . mock ( mmarquee . automation . AutomationElement . class ) ; mmarquee . automation . pattern . Value value = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Value . class ) ; mmarquee . automation . pattern . Grid grid = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Grid . class ) ; mmarquee . automation . pattern . Table table = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Table . class ) ; mmarquee . automation . pattern . Selection selection = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Selection . class ) ; when ( grid . isAvailable ( ) ) . thenReturn ( true ) ; when ( table . isAvailable ( ) ) . thenReturn ( true ) ; java . util . List < mmarquee . automation . AutomationElement > elementList = new java . util . ArrayList ( ) ; mmarquee . automation . AutomationElement element1 = org . mockito . Mockito . mock ( mmarquee . automation . AutomationElement . class ) ; mmarquee . automation . AutomationElement element2 = org . mockito . Mockito . mock ( mmarquee . automation . AutomationElement . class ) ; when ( element1 . getName ( ) ) . thenReturn ( "CELL-01" ) ; when ( element2 . getName ( ) ) . thenReturn ( "CELL-02" ) ; elementList . add ( element1 ) ; elementList . add ( element2 ) ; when ( table . getCurrentColumnHeaders ( ) ) . thenReturn ( elementList ) ; when ( grid . columnCount ( ) ) . thenReturn ( elementList . size ( ) ) ; mmarquee . automation . uiautomation . IUIAutomation mocked_automation = org . mockito . Mockito . mock ( mmarquee . automation . uiautomation . IUIAutomation . class ) ; mmarquee . automation . UIAutomation instance = new mmarquee . automation . UIAutomation ( mocked_automation ) ; mmarquee . automation . controls . AutomationDataGrid dataGrid = new mmarquee . automation . controls . AutomationDataGrid ( new mmarquee . automation . controls . ElementBuilder ( element ) . addPattern ( value , grid , table , selection ) . automation ( instance ) ) ; mmarquee . automation . controls . AutomationDataGridCell item = dataGrid . getColumnHeader ( 0 ) ; logger . info ( item . getValue ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return this . value ; }
|
org . junit . Assert . assertTrue ( item . getValue ( ) . equals ( "CELL-01" ) )
|
testGetRequestData ( ) { System . out . println ( "getRequestData" ) ; java . lang . String expResult = "" ; java . lang . String result = instance . getRequestData ( ) ; "<AssertPlaceHolder>" ; } getRequestData ( ) { return getPropertyAsString ( kg . apc . jmeter . samplers . DummySampler . REQUEST_DATA ) ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testCreate ( ) { org . oscarehr . common . model . ScheduleHoliday entity = new org . oscarehr . common . model . ScheduleHoliday ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; entity . setId ( new java . util . Date ( ) ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
|
org . junit . Assert . assertNotNull ( entity . getId ( ) )
|
testDeleteAttachmentRetryOnce ( ) { _resource . configure ( "BigSwitchBcfResource" , _parameters ) ; when ( _bigswitchBcfApi . deleteAttachment ( ( ( java . lang . String ) ( any ( ) ) ) , ( ( java . lang . String ) ( any ( ) ) ) , ( ( java . lang . String ) ( any ( ) ) ) ) ) . thenThrow ( new com . cloud . network . bigswitch . BigSwitchBcfApiException ( ) ) . thenReturn ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; com . cloud . agent . api . BcfAnswer ans = ( ( com . cloud . agent . api . BcfAnswer ) ( _resource . executeRequest ( new com . cloud . agent . api . DeleteBcfAttachmentCommand ( "networkId" , "portid" , "tenantid" ) ) ) ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return this . result ; }
|
org . junit . Assert . assertTrue ( ans . getResult ( ) )
|
deleteRequestBody ( ) { org . apache . camel . CamelContext camelctx = createCamelContext ( ) ; camelctx . addRoutes ( new org . apache . camel . builder . RouteBuilder ( ) { @ org . wildfly . camel . test . elasticsearch . Override public void configure ( ) throws org . wildfly . camel . test . elasticsearch . Exception { from ( "direct:index" ) . to ( ( "elasticsearch-rest://elasticsearch?operation=Index&indexName=twitter&indexType=tweet&hostAddresses=" + ( getElasticsearchHost ( ) ) ) ) ; from ( "direct:delete" ) . to ( ( "elasticsearch-rest://elasticsearch?operation=Delete&indexName=twitter&indexType=tweet&hostAddresses=" + ( getElasticsearchHost ( ) ) ) ) ; } } ) ; camelctx . start ( ) ; try { org . apache . camel . ProducerTemplate template = camelctx . createProducerTemplate ( ) ; org . elasticsearch . action . delete . DeleteRequest request = new org . elasticsearch . action . delete . DeleteRequest ( ( ( org . wildfly . camel . test . elasticsearch . ElasticsearchIntegrationTest . PREFIX ) + "foo" ) ) . type ( ( ( org . wildfly . camel . test . elasticsearch . ElasticsearchIntegrationTest . PREFIX ) + "bar" ) ) ; java . lang . String documentId = template . requestBody ( "direct:index" , new org . elasticsearch . action . index . IndexRequest ( ( ( "" + ( org . wildfly . camel . test . elasticsearch . ElasticsearchIntegrationTest . PREFIX ) ) + "foo" ) , ( ( "" + ( org . wildfly . camel . test . elasticsearch . ElasticsearchIntegrationTest . PREFIX ) ) + "bar" ) , ( ( "" + ( org . wildfly . camel . test . elasticsearch . ElasticsearchIntegrationTest . PREFIX ) ) + "testId" ) ) . source ( ( ( org . wildfly . camel . test . elasticsearch . ElasticsearchIntegrationTest . PREFIX ) + "content" ) , ( ( org . wildfly . camel . test . elasticsearch . ElasticsearchIntegrationTest . PREFIX ) + "hello" ) ) , java . lang . String . class ) ; org . elasticsearch . action . delete . DeleteResponse . Result response = template . requestBody ( "direct:delete" , request . id ( documentId ) , DeleteResponse . Result . class ) ; "<AssertPlaceHolder>" ; } finally { camelctx . stop ( ) ; } } start ( ) { sshServer . start ( ) ; setupKnownHosts ( ) ; }
|
org . junit . Assert . assertNotNull ( response )
|
testIntervalBucketing ( ) { java . io . File tmpDir = temporaryFolder . newFolder ( ) ; java . io . File tmpFile = java . io . File . createTempFile ( "druid" , "index" , tmpDir ) ; try ( java . io . BufferedWriter writer = com . google . common . io . Files . newWriter ( tmpFile , StandardCharsets . UTF_8 ) ) { writer . write ( "2014-01-01T07:59:59.977Z,a,1\n" ) ; writer . write ( "2014-01-01T08:00:00.000Z,b,1\n" ) ; } org . apache . druid . indexing . common . task . IndexTask indexTask = new org . apache . druid . indexing . common . task . IndexTask ( null , null , createIngestionSpec ( tmpDir , null , new org . apache . druid . segment . indexing . granularity . UniformGranularitySpec ( org . apache . druid . java . util . common . granularity . Granularities . HOUR , org . apache . druid . java . util . common . granularity . Granularities . HOUR , java . util . Collections . singletonList ( org . apache . druid . java . util . common . Intervals . of ( "2014-01-01T08:00:00Z/2014-01-01T09:00:00Z" ) ) ) , org . apache . druid . indexing . common . task . IndexTaskTest . createTuningConfigWithMaxRowsPerSegment ( 50 , true ) , false ) , null , org . apache . druid . server . security . AuthTestUtils . TEST_AUTHORIZER_MAPPER , null , rowIngestionMetersFactory ) ; final java . util . List < org . apache . druid . timeline . DataSegment > segments = runTask ( indexTask ) . rhs ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( size ) < 0 ) { size = 0 ; for ( int i = 0 ; i <= ( lastWordIndex ) ; i ++ ) { int w = words [ i ] ; if ( org . apache . druid . extendedset . intset . ConciseSet . isLiteral ( w ) ) { size += org . apache . druid . extendedset . intset . ConciseSet . getLiteralBitCount ( w ) ; } else { if ( org . apache . druid . extendedset . intset . ConciseSet . isZeroSequence ( w ) ) { if ( ! ( org . apache . druid . extendedset . intset . ConciseSet . isSequenceWithNoBits ( w ) ) ) { ( size ) ++ ; } } else { size += org . apache . druid . extendedset . intset . ConciseSet . maxLiteralLengthMultiplication ( ( ( org . apache . druid . extendedset . intset . ConciseSet . getSequenceCount ( w ) ) + 1 ) ) ; if ( ! ( org . apache . druid . extendedset . intset . ConciseSet . isSequenceWithNoBits ( w ) ) ) { ( size ) -- ; } } } } } return size ; }
|
org . junit . Assert . assertEquals ( 1 , segments . size ( ) )
|
shouldRunLoadJobInTestMode ( ) { final com . google . cloud . bigquery . TableId dstTable = com . google . cloud . bigquery . TableId . of ( "foo" , "bar" , "baz" ) ; final java . lang . String srcUri = "gs://foo/bar" ; final com . spotify . flo . Task < com . google . cloud . bigquery . TableId > task = com . spotify . flo . Task . named ( "task" ) . ofType ( com . google . cloud . bigquery . TableId . class ) . operator ( com . spotify . flo . contrib . bigquery . BigQueryOperator . create ( ) ) . process ( ( bq ) -> bq . job ( com . google . cloud . bigquery . JobInfo . of ( com . google . cloud . bigquery . LoadJobConfiguration . of ( dstTable , srcUri ) ) ) . success ( ( response ) -> dstTable ) ) ; try ( com . spotify . flo . TestScope scope = com . spotify . flo . FloTesting . scope ( ) ) { final com . google . cloud . bigquery . TableId result = com . spotify . flo . context . FloRunner . runTask ( task ) . future ( ) . get ( 30 , com . spotify . flo . contrib . bigquery . SECONDS ) ; "<AssertPlaceHolder>" ; } } future ( ) { return future ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( dstTable ) )
|
testJTPSync4 ( ) { final java . util . concurrent . atomic . AtomicBoolean ok = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; org . jrebirth . af . core . concurrent . JRebirth . runIntoJTPSync ( new org . jrebirth . af . core . concurrent . JrbReferenceRunnable ( "JTP_Sync<sp>test<sp>4" , ( ) -> { org . jrebirth . af . core . concurrent . ThreadTest . LOGGER . info ( ( "Running<sp>into<sp>" + ( java . lang . Thread . currentThread ( ) . getName ( ) ) ) ) ; ok . set ( org . jrebirth . af . core . concurrent . JRebirth . isJTPSlot ( ) ) ; } ) ) ; "<AssertPlaceHolder>" ; } get ( ) { return builder ( ) . get ( this ) ; }
|
org . junit . Assert . assertEquals ( true , ok . get ( ) )
|
update ( ) { org . jdom2 . Document xml1 = new org . jdom2 . Document ( new org . jdom2 . Element ( "root" ) ) ; org . mycore . datamodel . ifs2 . MCRStoredMetadata sm = getMetaDataStore ( ) . create ( new org . mycore . common . content . MCRJDOMContent ( xml1 ) ) ; org . jdom2 . Document xml2 = new org . jdom2 . Document ( new org . jdom2 . Element ( "update" ) ) ; sm . update ( new org . mycore . common . content . MCRJDOMContent ( xml2 ) ) ; org . mycore . common . content . MCRContent xml3 = getMetaDataStore ( ) . retrieve ( sm . getID ( ) ) . getMetadata ( ) ; "<AssertPlaceHolder>" ; } asString ( ) { return this . text ; }
|
org . junit . Assert . assertEquals ( new org . mycore . common . content . MCRJDOMContent ( xml2 ) . asString ( ) , xml3 . asString ( ) )
|
getOptionsFromStrings ( ) { org . apache . pdfbox . pdmodel . interactive . form . PDChoice choiceField = new org . apache . pdfbox . pdmodel . interactive . form . PDComboBox ( acroForm ) ; org . apache . pdfbox . cos . COSArray choiceFieldOptions = new org . apache . pdfbox . cos . COSArray ( ) ; choiceFieldOptions . add ( new org . apache . pdfbox . cos . COSString ( "<sp>" ) ) ; choiceFieldOptions . add ( new org . apache . pdfbox . cos . COSString ( "A" ) ) ; choiceFieldOptions . add ( new org . apache . pdfbox . cos . COSString ( "B" ) ) ; choiceField . getCOSObject ( ) . setItem ( COSName . OPT , choiceFieldOptions ) ; "<AssertPlaceHolder>" ; } getOptions ( ) { org . apache . pdfbox . cos . COSBase values = getCOSObject ( ) . getDictionaryObject ( COSName . OPT ) ; return org . apache . pdfbox . pdmodel . interactive . form . FieldUtils . getPairableItems ( values , 0 ) ; }
|
org . junit . Assert . assertEquals ( options , choiceField . getOptions ( ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.