input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
classloader_context_Test ( ) { java . net . URL [ ] urls = new java . net . URL [ ] { new java . net . URL ( "file:test-resources/classpath/single1/beans.jar" ) } ; java . net . URLClassLoader classLoader = new java . net . URLClassLoader ( urls , this . getClass ( ) . getClassLoader ( ) ) ; org . openl . rules . project . instantiation . SimpleProjectEngineFactory < java . lang . Object > factory = new org . openl . rules . project . instantiation . SimpleProjectEngineFactory . SimpleProjectEngineFactoryBuilder ( ) . setClassLoader ( classLoader ) . setProvideRuntimeContext ( true ) . setProject ( "test-resources/classpath/single2" ) . build ( ) ; java . lang . Object instance = factory . newInstance ( ) ; "<AssertPlaceHolder>" ; } newInstance ( ) { return type . newInstance ( openl . getVm ( ) . getRuntimeEnv ( ) ) ; }
|
org . junit . Assert . assertNotNull ( instance )
|
testUnsigned128Bits ( ) { final long [ ] size = new long [ ] { 5 , 5 } ; final net . imglib2 . img . array . ArrayImg < net . imglib2 . type . numeric . integer . Unsigned128BitType , net . imglib2 . img . basictypeaccess . array . LongArray > img = net . imglib2 . img . array . ArrayImgs . unsigned128Bits ( size ) ; java . math . BigInteger previous = java . math . BigInteger . ONE ; java . math . BigInteger current = java . math . BigInteger . ONE ; java . math . BigInteger next = java . math . BigInteger . ZERO ; java . math . BigInteger modulus = java . math . BigInteger . valueOf ( 2 ) ; modulus = modulus . pow ( 128 ) ; for ( final net . imglib2 . type . numeric . integer . Unsigned128BitType t : img ) { t . set ( current . mod ( modulus ) ) ; next = current . add ( previous . multiply ( java . math . BigInteger . valueOf ( 579 ) ) ) ; previous = current ; current = next ; } final long [ ] expected = new long [ ] { 1L , 0L , 580L , 0L , 1159L , 0L , 336979L , 0L , 1008040L , 0L , 196118881L , 0L , 779774041L , 0L , 114332606140L , 0L , 565821775879L , 0L , 66764400730939L , 0L , 394375208964880L , 0L , 39050963232178561L , 0L , 267394209222844081L , 0L , 4431157846944679284L , 1L , - 6768291676414562361L , 9L , - 5225324541072931549L , 727L , 5090282515029955640L , 6305L , 4893401322169053793L , 427653L , 687925730985110793L , 4078408L , - 6831296084403691924L , 251689648L , 4096076608074873287L , 2613087902L , - 3621124487818704885L , 148341394458L , 6823990152710321440L , 1661319289845L , - 5325007965140474367L , 87550986681492L , - 1837941319708406431L , 1049454855501961L } ; final long [ ] actual = img . update ( null ) . getCurrentStorageArray ( ) ; "<AssertPlaceHolder>" ; } getCurrentStorageArray ( ) { return data ; }
|
org . junit . Assert . assertArrayEquals ( expected , actual )
|
testGetNotInstalledModulesRunnableListOfModuleNeededListOfModuleToInstallBoolean ( ) { java . util . List < org . talend . core . model . general . ModuleNeeded > neededModules = new java . util . ArrayList < org . talend . core . model . general . ModuleNeeded > ( ) ; org . talend . core . model . general . ModuleNeeded m1 = new org . talend . core . model . general . ModuleNeeded ( "tMysqlInput" , "mysql.jar" , "" , true , null , null , "mvn:org.talend.libraries/mysql/6.0.0" ) ; org . talend . core . model . general . ModuleNeeded m2 = new org . talend . core . model . general . ModuleNeeded ( "tMysqlInput" , "mysql.jar" , "" , true , null , null , "mvn:org.talend.libraries/mysql/6.1.0" ) ; org . talend . core . model . general . ModuleNeeded m3 = new org . talend . core . model . general . ModuleNeeded ( "tMyComponent1" , "test.jar" , "" , true , null , null , "mvn:org.talend.libraries/test/6.0.0" ) ; org . talend . core . model . general . ModuleNeeded m4 = new org . talend . core . model . general . ModuleNeeded ( "tMyComponent2" , "test.jar" , "" , true , null , null , "mvn:org.talend.libraries/test/6.0.0" ) ; org . talend . core . model . general . ModuleNeeded m5 = new org . talend . core . model . general . ModuleNeeded ( "tMyComponent3" , "mysql.jar" 0 , "" , true , null , null , "mvn:org.talend.libraries/test/6.0.0" ) ; neededModules . add ( m1 ) ; neededModules . add ( m2 ) ; neededModules . add ( m3 ) ; neededModules . add ( m4 ) ; neededModules . add ( m5 ) ; java . util . List < org . talend . core . model . general . ModuleToInstall > toInstall1 = new java . util . ArrayList < org . talend . core . model . general . ModuleToInstall > ( ) ; org . eclipse . jface . operation . IRunnableWithProgress notInstalledModulesRunnable = org . talend . librariesmanager . utils . RemoteModulesHelper . getInstance ( ) . getNotInstalledModulesRunnable ( neededModules , toInstall1 , false ) ; notInstalledModulesRunnable . run ( new org . eclipse . core . runtime . NullProgressMonitor ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return list . size ( ) ; }
|
org . junit . Assert . assertEquals ( 4 , toInstall1 . size ( ) )
|
AllConceptSources_shouldReturnAllUnretiredConceptSources ( ) { "<AssertPlaceHolder>" ; } getAllConceptSources ( boolean ) { org . hibernate . Criteria criteria = sessionFactory . getCurrentSession ( ) . createCriteria ( org . openmrs . ConceptSource . class ) ; if ( ! includeRetired ) { criteria . add ( org . hibernate . criterion . Restrictions . eq ( "retired" , false ) ) ; } return criteria . list ( ) ; }
|
org . junit . Assert . assertEquals ( dao . getAllConceptSources ( false ) . size ( ) , 3 )
|
test12_8 ( ) { int maxParts = java . lang . Runtime . getRuntime ( ) . availableProcessors ( ) ; int maxLength = 12 ; java . util . List < java . lang . Integer > list = new java . util . ArrayList < java . lang . Integer > ( maxLength ) ; for ( int j = 0 ; j < maxLength ; j ++ ) { list . add ( j ) ; } java . util . List < java . util . List < java . lang . Integer > > out = org . cubedb . utils . CubeUtils . partitionList ( list , maxParts ) ; org . cubedb . utils . CubeUtilsTest . log . info ( "Out<sp>is<sp>{}" , out ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . map . size ( ) ; }
|
org . junit . Assert . assertEquals ( maxParts , out . size ( ) )
|
testSetSeriesToolTipGenerator ( ) { org . jfree . chart . plot . CategoryPlot plot = ( ( org . jfree . chart . plot . CategoryPlot ) ( this . chart . getPlot ( ) ) ) ; org . jfree . chart . renderer . category . CategoryItemRenderer renderer = plot . getRenderer ( ) ; org . jfree . chart . labels . StandardCategoryToolTipGenerator tt = new org . jfree . chart . labels . StandardCategoryToolTipGenerator ( ) ; renderer . setSeriesToolTipGenerator ( 0 , tt ) ; org . jfree . chart . labels . CategoryToolTipGenerator tt2 = renderer . getToolTipGenerator ( 0 , 0 ) ; "<AssertPlaceHolder>" ; } getToolTipGenerator ( int , int ) { org . jfree . chart . labels . CategoryToolTipGenerator result ; if ( ( this . toolTipGenerator ) != null ) { result = this . toolTipGenerator ; } else { result = getSeriesToolTipGenerator ( row ) ; if ( result == null ) { result = this . baseToolTipGenerator ; } } return result ; }
|
org . junit . Assert . assertTrue ( ( tt2 == tt ) )
|
testVariableDirectoryOrder ( ) { final java . lang . String s = "" + ( ( ( ( ( "c<sp>3<sp>Baz\n" + "c<sp>2<sp>Bar\n" ) + "c<sp>1<sp>Foo\n" ) + "p<sp>cnf<sp>3<sp>2\n" ) + "1<sp>-3<sp>0\n" ) + "2<sp>3<sp>-1<sp>0" ) ; final de . ovgu . featureide . fm . core . io . dimacs . DimacsReader r = new de . ovgu . featureide . fm . core . io . dimacs . DimacsReader ( ) ; r . setReadingVariableDirectory ( true ) ; final org . prop4j . Node actual = r . read ( s ) ; final org . prop4j . Node expected = new org . prop4j . And ( new org . prop4j . Or ( "Foo" , new org . prop4j . Literal ( "Baz" , false ) ) , new org . prop4j . Or ( "Bar" , "Baz" , new org . prop4j . Literal ( "Foo" , false ) ) ) ; "<AssertPlaceHolder>" ; } read ( java . nio . file . Path ) { return de . ovgu . featureide . fm . core . io . manager . FeatureModelManager . load ( modelFilePath ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testAuhtenticationForWrongPassword ( ) { final com . bahadirakin . entities . User userStub = new com . bahadirakin . entities . User ( ) ; userStub . setUsername ( "bhdrkn" ) ; userStub . setPassword ( "passowrd" ) ; com . bahadirakin . controllers . Mockito . when ( userService . authenticate ( userStub ) ) . thenReturn ( false ) ; final java . lang . String redirect = loginController . authenticate ( userStub ) ; "<AssertPlaceHolder>" ; com . bahadirakin . controllers . Mockito . verify ( userService , new org . mockito . internal . verification . Times ( 1 ) ) . authenticate ( com . bahadirakin . controllers . Mockito . any ( com . bahadirakin . entities . User . class ) ) ; } authenticate ( com . bahadirakin . entities . User ) { try { if ( userService . authenticate ( user ) ) { return "homePage" ; } else { return "errorPage?message=wrongPassword" ; } } catch ( com . bahadirakin . exceptions . UserNotFoundException e ) { com . bahadirakin . controllers . LoginController . logger . error ( "User<sp>not<sp>found<sp>for<sp>usernmae:<sp>{}" , user . getUsername ( ) , e ) ; return "errorPage?message=userNotFound" ; } }
|
org . junit . Assert . assertEquals ( redirect , "errorPage?message=wrongPassword" )
|
testRemoveFromStringArray ( ) { java . lang . String [ ] array = new java . lang . String [ ] { "a" , "b" , "c" } ; array = com . liferay . portal . kernel . util . ArrayUtil . remove ( array , "c" ) ; "<AssertPlaceHolder>" ; } remove ( boolean [ ] , boolean ) { return com . liferay . portal . kernel . util . ArrayUtil . remove ( array , value ) ; }
|
org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "a" , "b" } , array )
|
testInitStartupProbes ( ) { removeRemoteObject ( org . eclipse . rap . rwt . internal . textsize . MeasurementOperator . TYPE ) ; createProbe ( org . eclipse . rap . rwt . internal . textsize . MeasurementOperator_Test . FONT_DATA_1 ) ; org . eclipse . rap . rwt . internal . textsize . MeasurementOperator measurementOperator = new org . eclipse . rap . rwt . internal . textsize . MeasurementOperator ( ) ; "<AssertPlaceHolder>" ; } getProbeCount ( ) { return probes . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , measurementOperator . getProbeCount ( ) )
|
testEasyrecDataModel_hasPreferenceValues ( ) { org . easyrec . mahout . model . EasyrecDataModel easyrecDataModel = new org . easyrec . mahout . model . EasyrecDataModel ( org . easyrec . mahout . EasyrecDataModelTest . TENANT_ID , org . easyrec . mahout . EasyrecDataModelTest . RATE_ACTION_TYPE_ID , org . easyrec . mahout . EasyrecDataModelTest . HAS_RATING_VALUES , mahoutDataModelMappingDAO ) ; boolean hasPreferenceValues = easyrecDataModel . hasPreferenceValues ( ) ; "<AssertPlaceHolder>" ; } hasPreferenceValues ( ) { return inMemoryDelegate . hasPreferenceValues ( ) ; }
|
org . junit . Assert . assertEquals ( true , hasPreferenceValues )
|
testPerformance ( ) { for ( final int limit : limits ) { final java . util . List < java . util . Map < java . lang . String , java . lang . Object > > records = holder . getRecords ( limit ) ; final net . meisen . dissertation . model . data . TidaModel model = loader . loadViaXslt ( "/net/meisen/dissertation/performance/implementations/model/tida-model-minute.xml" ) ; net . meisen . dissertation . performance . implementations . concrete . Tida . loadRecords ( model , records ) ; for ( final java . lang . String query : queries ) { final net . meisen . dissertation . impl . parser . query . select . SelectQuery parsedQuery = queryFactory . < net . meisen . dissertation . impl . parser . query . select . SelectQuery > parseQuery ( query ) ; net . meisen . dissertation . impl . time . series . TimeSeriesCollection oldRes = null ; net . meisen . dissertation . impl . time . series . TimeSeriesCollection res = null ; for ( final java . lang . Class < ? extends net . meisen . dissertation . performance . implementations . IImplementation > impl : impls ) { final java . lang . reflect . Constructor < ? extends net . meisen . dissertation . performance . implementations . IImplementation > cstr = impl . getConstructor ( net . meisen . dissertation . model . data . TidaModel . class , java . util . List . class , int . class , int . class , net . meisen . dissertation . model . parser . query . IQueryFactory . class ) ; final net . meisen . dissertation . performance . implementations . IImplementation conImpl = cstr . newInstance ( model , records , INIT_RUNS , RUNS , queryFactory ) ; final net . meisen . dissertation . performance . PerformanceResult pRes = new net . meisen . dissertation . performance . PerformanceResult ( limit , net . meisen . dissertation . performance . implementations . concrete . Tida . getCount ( queryFactory , parsedQuery ) , records . size ( ) , impl . getSimpleName ( ) , query ) ; oldRes = res ; res = conImpl . run ( parsedQuery , pRes ) ; if ( oldRes != null ) { "<AssertPlaceHolder>" ; } } } loader . unloadAll ( ) ; } } run ( net . meisen . dissertation . impl . parser . query . select . SelectQuery , net . meisen . dissertation . performance . PerformanceResult ) { final long [ ] results = new long [ runs ] ; net . meisen . dissertation . help . Performance performance ; net . meisen . dissertation . impl . time . series . TimeSeriesCollection tsc = null ; for ( int i = 0 ; i < ( ( runs ) + ( initRuns ) ) ; i ++ ) { performance = new net . meisen . dissertation . help . Performance ( ) ; if ( i >= ( initRuns ) ) { performance . start ( false ) ; } tsc = measure ( query ) ; if ( i >= ( initRuns ) ) { results [ ( i - ( initRuns ) ) ] = performance . stop ( false ) [ 0 ] ; } } setResults ( results , pRes ) ; java . lang . System . gc ( ) ; return tsc ; }
|
org . junit . Assert . assertEquals ( oldRes , res )
|
testSerialization ( ) { org . jfree . data . DefaultKeyedValue v1 = new org . jfree . data . DefaultKeyedValue ( "Test" , new java . lang . Double ( 25.3 ) ) ; org . jfree . data . DefaultKeyedValue v2 = ( ( org . jfree . data . DefaultKeyedValue ) ( org . jfree . chart . TestUtils . serialised ( v1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( v1 , v2 )
|
successTopic ( ) { config . setTopic ( "x" ) ; config . setSuccessTopic ( "y" ) ; "<AssertPlaceHolder>" ; } getSuccessTopic ( ) { return ( successTopic ) == null ? topic : successTopic ; }
|
org . junit . Assert . assertThat ( config . getSuccessTopic ( ) , org . hamcrest . CoreMatchers . is ( "y" ) )
|
testSimple ( ) { org . apache . uima . analysis_engine . AnalysisEngine engine = org . apache . uima . fit . factory . AnalysisEngineFactory . createEngine ( org . cleartk . opennlp . tools . PosTaggerAnnotator . getDescription ( ) ) ; tokenBuilder . buildTokens ( jCas , "The<sp>brown<sp>fox<sp>jumped<sp>quickly<sp>over<sp>the<sp>lazy<sp>dog." , "The<sp>brown<sp>fox<sp>jumped<sp>quickly<sp>over<sp>the<sp>lazy<sp>dog<sp>." ) ; engine . process ( jCas ) ; java . util . List < java . lang . String > expected = java . util . Arrays . asList ( "DT<sp>JJ<sp>NN<sp>VBD<sp>RB<sp>IN<sp>DT<sp>JJ<sp>NN<sp>." . split ( "<sp>" ) ) ; java . util . List < java . lang . String > actual = new java . util . ArrayList < java . lang . String > ( ) ; for ( org . cleartk . token . type . Token token : org . apache . uima . fit . util . JCasUtil . select ( jCas , org . cleartk . token . type . Token . class ) ) { actual . add ( token . getPos ( ) ) ; } "<AssertPlaceHolder>" ; } add ( double ) { ( this . n ) ++ ; if ( x < ( min ) ) { this . min = x ; } if ( x > ( max ) ) { this . max = x ; } }
|
org . junit . Assert . assertEquals ( expected , actual )
|
clearAssociationMessage ( ) { org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveMultiAssociationCommandClass cls = ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveMultiAssociationCommandClass ) ( getCommandClass ( CommandClass . COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION ) ) ) ; org . openhab . binding . zwave . internal . protocol . transaction . ZWaveCommandClassTransactionPayload msg ; byte [ ] expectedResponseV1 = new byte [ ] { - 114 , 4 , 1 } ; cls . setVersion ( 1 ) ; msg = cls . clearAssociationMessage ( 1 ) ; "<AssertPlaceHolder>" ; } getPayloadBuffer ( ) { return payload ; }
|
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( msg . getPayloadBuffer ( ) , expectedResponseV1 ) )
|
testHybridFormat ( ) { try ( java . io . InputStream in = getJsonStream ( "org/ojai/test/data/hybridFormat.json" ) ; org . ojai . DocumentStream stream = org . ojai . json . Json . newDocumentStream ( in ) ) { int documentCount = getDocumentCount ( stream . documentReaders ( ) ) ; "<AssertPlaceHolder>" ; } } documentReaders ( ) { checkStateForIteration ( ) ; iteratorOpened = true ; return new org . ojai . json . impl . JsonDocumentReaderIterable ( this ) ; }
|
org . junit . Assert . assertEquals ( 6 , documentCount )
|
of_BD ( ) { org . javamoney . calc . common . Rate r = org . javamoney . calc . common . Rate . of ( java . math . BigDecimal . valueOf ( 0.0567 ) ) ; "<AssertPlaceHolder>" ; } of ( java . math . BigDecimal ) { return new org . javamoney . calc . common . Rate ( rate , null ) ; }
|
org . junit . Assert . assertNotNull ( r )
|
testValidateExternalToken ( ) { java . lang . String rand = org . apache . commons . lang . RandomStringUtils . randomAlphanumeric ( 10 ) ; final java . lang . String username = "user_" + rand ; management ( ) . orgs ( ) . post ( new org . apache . usergrid . rest . management . Organization ( username , username , ( username + "@example.com" ) , username , "password" , null ) ) ; org . apache . usergrid . rest . management . Map < java . lang . String , java . lang . Object > loginInfo = new org . apache . usergrid . rest . management . HashMap < java . lang . String , java . lang . Object > ( ) { { put ( "username" , username ) ; put ( "password" , "password" ) ; put ( "grant_type" , "password" ) ; } } ; com . fasterxml . jackson . databind . JsonNode accessInfoNode = management . token ( ) . post ( com . fasterxml . jackson . databind . JsonNode . class , loginInfo ) ; java . lang . String accessToken = accessInfoNode . get ( "access_token" ) . asText ( ) ; java . lang . String suToken = clientSetup . getSuperuserToken ( ) . getAccessToken ( ) ; org . apache . usergrid . rest . management . Map < java . lang . String , java . lang . String > props = new org . apache . usergrid . rest . management . HashMap < java . lang . String , java . lang . String > ( ) ; props . put ( org . apache . usergrid . rest . management . USERGRID_EXTERNAL_SSO_PROVIDER_URL , getBaseURI ( ) . toURL ( ) . toExternalForm ( ) ) ; pathResource ( "testproperties" ) . post ( props ) ; com . fasterxml . jackson . databind . JsonNode node = pathResource ( "/management/me" ) . get ( com . fasterxml . jackson . databind . JsonNode . class , new org . apache . usergrid . rest . management . QueryParameters ( ) . addParam ( "access_token" , accessToken ) ) ; org . apache . usergrid . rest . management . ManagementResourceIT . logger . info ( "node:<sp>{}" , node ) ; java . lang . String token = node . get ( "access_token" ) . asText ( ) ; "<AssertPlaceHolder>" ; props . put ( org . apache . usergrid . rest . management . USERGRID_EXTERNAL_SSO_PROVIDER_URL , "" ) ; pathResource ( "testproperties" ) . post ( props ) ; } get ( java . lang . Object ) { return getDynamicProperties ( ) . get ( key ) ; }
|
org . junit . Assert . assertNotNull ( token )
|
testInitialConnect ( ) { com . spotify . folsom . reconnect . ReconnectingClientTest . FakeClient delegate = new com . spotify . folsom . reconnect . ReconnectingClientTest . FakeClient ( true , false ) ; com . spotify . folsom . BackoffFunction backoffFunction = mock ( com . spotify . folsom . BackoffFunction . class ) ; when ( backoffFunction . getBackoffTimeMillis ( 0 ) ) . thenReturn ( 0L ) ; when ( backoffFunction . getBackoffTimeMillis ( 1 ) ) . thenReturn ( 123L ) ; com . spotify . folsom . reconnect . Connector connector = mock ( com . spotify . folsom . reconnect . Connector . class ) ; when ( connector . connect ( ) ) . thenReturn ( com . spotify . futures . CompletableFutures . exceptionallyCompletedFuture ( new java . lang . RuntimeException ( ) ) ) . thenReturn ( com . spotify . futures . CompletableFutures . exceptionallyCompletedFuture ( new java . lang . RuntimeException ( ) ) ) . thenReturn ( java . util . concurrent . CompletableFuture . completedFuture ( delegate ) ) ; com . spotify . folsom . reconnect . ReconnectingClient client = new com . spotify . folsom . reconnect . ReconnectingClient ( backoffFunction , scheduledExecutorService , connector , com . spotify . folsom . guava . HostAndPort . fromString ( "localhost:123" ) ) ; verify ( connector , times ( 3 ) ) . connect ( ) ; verify ( scheduledExecutorService , times ( 1 ) ) . schedule ( org . mockito . Mockito . < java . lang . Runnable > any ( ) , eq ( 0L ) , eq ( TimeUnit . MILLISECONDS ) ) ; verify ( scheduledExecutorService , times ( 1 ) ) . schedule ( org . mockito . Mockito . < java . lang . Runnable > any ( ) , eq ( 123L ) , eq ( TimeUnit . MILLISECONDS ) ) ; verify ( backoffFunction , times ( 1 ) ) . getBackoffTimeMillis ( 0 ) ; verify ( backoffFunction , times ( 1 ) ) . getBackoffTimeMillis ( 1 ) ; verifyNoMoreInteractions ( connector , scheduledExecutorService , backoffFunction ) ; "<AssertPlaceHolder>" ; } isConnected ( ) { return rawMemcacheClient . isConnected ( ) ; }
|
org . junit . Assert . assertTrue ( client . isConnected ( ) )
|
testIsEqual ( ) { com . eclipsesource . tabris . tracking . OrderItem item = new com . eclipsesource . tabris . tracking . OrderItem ( "foo" ) ; com . eclipsesource . tabris . tracking . OrderItem item2 = new com . eclipsesource . tabris . tracking . OrderItem ( "foo" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( item , item2 )
|
size_bicyclo ( ) { int [ ] [ ] bicyclo = org . openscience . cdk . graph . InitialCyclesTest . bicyclo ( ) ; org . openscience . cdk . graph . MinimumCycleBasis mcb = new org . openscience . cdk . graph . MinimumCycleBasis ( bicyclo ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells . size ( ) ; }
|
org . junit . Assert . assertThat ( mcb . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
|
testCopyActionServiceGeneration ( ) { java . lang . Boolean actionServiceRegistered = false ; java . util . List < it . geosolutions . geobatch . annotations . GenericActionService > actionList = it . geosolutions . geobatch . annotations . ActionServicePostProcessor . getActionList ( ) ; for ( it . geosolutions . geobatch . annotations . GenericActionService action : actionList ) { if ( it . geosolutions . geobatch . actions . commons . CopyConfiguration . class . getSimpleName ( ) . equals ( action . getId ( ) ) ) { actionServiceRegistered = true ; break ; } } "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
|
org . junit . Assert . assertTrue ( actionServiceRegistered )
|
testMeanEdgeCase2_F ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 60 , 60 , DataType . DOUBLE ) . reshape ( new int [ ] { 3 , 10 , 2 } ) . dup ( 'f' ) ; org . nd4j . linalg . api . ndarray . INDArray arr2 = arr . mean ( 2 ) ; org . nd4j . linalg . api . ndarray . INDArray exp = arr . get ( org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . point ( 0 ) ) ; exp . addi ( arr . get ( org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . point ( 1 ) ) ) ; exp . divi ( 2 ) ; "<AssertPlaceHolder>" ; } divi ( org . nd4j . autodiff . samediff . SDVariable ) { return divi ( sameDiff . generateNewVarName ( DivOp . OP_NAME , 0 ) , sameDiffVariable ) ; }
|
org . junit . Assert . assertEquals ( exp , arr2 )
|
testPluginname ( ) { rule . setXPath ( "//VariableDeclaratorId[string-length(@Image)<sp><<sp>3]" ) ; rule . setMessage ( "{0}" ) ; net . sourceforge . pmd . Report report = net . sourceforge . pmd . lang . java . rule . XPathRuleTest . getReportForTestString ( rule , net . sourceforge . pmd . lang . java . rule . XPathRuleTest . TEST1 ) ; net . sourceforge . pmd . RuleViolation rv = report . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { return description ; }
|
org . junit . Assert . assertEquals ( "a" , rv . getDescription ( ) )
|
testEvalXmlDocuments ( ) { com . intuit . karate . core . ScenarioContext ctx = getContext ( ) ; org . w3c . dom . Document doc = com . intuit . karate . XmlUtils . toXmlDoc ( "<root><foo>bar</foo><hello>world</hello></root>" ) ; ctx . vars . put ( "myXml" , doc ) ; com . intuit . karate . ScriptValue value = com . intuit . karate . Script . evalJsExpression ( "myXml.root.foo" , ctx ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return get ( com . intuit . karate . http . Cookie . VALUE ) ; }
|
org . junit . Assert . assertEquals ( "bar" , value . getValue ( ) )
|
formatPath ( ) { loghub . VarFormatter vf = new loghub . VarFormatter ( "${a.b}" , java . util . Locale . ENGLISH ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . Object > > obj = java . util . Collections . singletonMap ( "a" , java . util . Collections . singletonMap ( "b" , "c" ) ) ; java . lang . String formatted = vf . format ( obj ) ; "<AssertPlaceHolder>" ; } format ( java . lang . Object ) { java . util . Map < java . lang . String , java . lang . Object > variables ; java . lang . Object mapperType = mapper . keySet ( ) . stream ( ) . findAny ( ) . orElse ( "" ) ; if ( ( mapperType instanceof java . lang . Number ) && ( ! ( arg instanceof java . util . List ) ) ) { throw new java . lang . IllegalArgumentException ( "Given<sp>a<sp>non-list<sp>to<sp>a<sp>format<sp>expecting<sp>only<sp>a<sp>list" ) ; } else if ( arg instanceof java . util . Map ) { variables = ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( arg ) ) ; } else { variables = java . util . Collections . emptyMap ( ) ; } java . lang . Object [ ] resolved = new java . lang . Object [ mapper . size ( ) ] ; for ( Map . Entry < java . lang . Object , java . lang . Integer > mapping : mapper . entrySet ( ) ) { if ( "." . equals ( mapping . getKey ( ) ) ) { resolved [ mapping . getValue ( ) ] = checkIsArray ( arg ) ; continue ; } if ( mapperType instanceof java . lang . Number ) { int i = ( ( java . lang . Number ) ( mapping . getKey ( ) ) ) . intValue ( ) ; int j = ( ( java . lang . Number ) ( mapping . getValue ( ) ) ) . intValue ( ) ; java . util . List < java . lang . Object > l = ( ( java . util . List < java . lang . Object > ) ( arg ) ) ; if ( j > ( l . size ( ) ) ) { throw new java . lang . IllegalArgumentException ( "index<sp>out<sp>of<sp>range" ) ; } resolved [ i ] = checkIsArray ( l . get ( ( j - 1 ) ) ) ; } else { java . lang . String [ ] path = mapping . getKey ( ) . toString ( ) . split ( "\\." ) ; if ( ( path . length ) == 1 ) { if ( ! ( variables . containsKey ( mapping . getKey ( ) ) ) ) { throw new java . lang . IllegalArgumentException ( ( "invalid<sp>values<sp>for<sp>format<sp>key<sp>" + ( mapping . getKey ( ) ) ) ) ; } resolved [ mapping . getValue ( ) ] = checkIsArray ( variables . get ( mapping . getKey ( ) ) ) ; } else { java . util . Map < java . lang . String , java . lang . Object > current = variables ; java . lang . String key = path [ 0 ] ; for ( int i = 0 ; i < ( ( path . length ) - 1 ) ; i ++ ) { java . util . Map < java . lang . String , java . lang . Object > next = ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( current . get ( key ) ) ) ; if ( ( next == null ) || ( ! ( next instanceof java . util . Map ) ) ) { throw new java . lang . IllegalArgumentException ( ( "invalid<sp>values<sp>for<sp>format<sp>key<sp>" + ( mapping . getKey ( ) ) ) ) ; } current = next ; key = path [ ( i + 1 ) ] ; } if ( current != null ) { resolved [ mapping . getValue ( ) ] = checkIsArray ( current . get ( key ) ) ; } } } } return mf . format ( resolved , new java . lang . StringBuffer ( ) , new java . text . FieldPosition ( 0 ) ) . toString ( ) ; }
|
org . junit . Assert . assertEquals ( "c" , formatted )
|
testToEbXMLEmpty ( ) { transformer . toEbXML ( new org . openehealth . ipf . commons . ihe . xds . core . requests . query . GetDocumentsAndAssociationsQuery ( ) , ebXML ) ; "<AssertPlaceHolder>" ; } getSlots ( ) { return getSlotList ( ) . getSlots ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , ebXML . getSlots ( ) . size ( ) )
|
getDefaultIconWhenInCache ( ) { org . xwiki . icon . IconSet iconSet = new org . xwiki . icon . IconSet ( "default" ) ; when ( iconSetCache . get ( "default" ) ) . thenReturn ( iconSet ) ; org . xwiki . icon . IconSet result = mocker . getComponentUnderTest ( ) . getDefaultIconSet ( ) ; "<AssertPlaceHolder>" ; verify ( iconSetLoader , never ( ) ) . loadIconSet ( any ( java . io . InputStreamReader . class ) , any ( ) ) ; } getDefaultIconSet ( ) { org . xwiki . icon . IconSet iconSet = new org . xwiki . icon . IconSet ( "default" ) ; when ( iconSetLoader . loadIconSet ( any ( java . io . Reader . class ) , eq ( "default" ) ) ) . thenReturn ( iconSet ) ; java . io . InputStream is = getClass ( ) . getResourceAsStream ( "/test.iconset" ) ; when ( xwiki . getResourceAsStream ( "/resources/icons/default.iconset" ) ) . thenReturn ( is ) ; org . junit . Assert . assertEquals ( iconSet , mocker . getComponentUnderTest ( ) . getIconSet ( "default" ) ) ; verifyZeroInteractions ( queryManager ) ; }
|
org . junit . Assert . assertEquals ( iconSet , result )
|
testGetCacheSize ( ) { org . eclipse . tracecompass . tmf . ctf . core . trace . CtfTmfTrace emptyFixture = new org . eclipse . tracecompass . tmf . ctf . core . trace . CtfTmfTrace ( ) ; int result = emptyFixture . getCacheSize ( ) ; "<AssertPlaceHolder>" ; emptyFixture . dispose ( ) ; } getCacheSize ( ) { return fCacheSize ; }
|
org . junit . Assert . assertEquals ( 1000 , result )
|
testSerialization ( ) { org . jfree . data . time . TimePeriodValuesCollection c1 = new org . jfree . data . time . TimePeriodValuesCollection ( ) ; org . jfree . data . time . TimePeriodValuesCollection c2 = ( ( org . jfree . data . time . TimePeriodValuesCollection ) ( org . jfree . chart . TestUtilities . serialised ( c1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( c1 , c2 )
|
testGenerator_Default2 ( ) { java . lang . String first = "anything<sp>\n<sp>\nother" ; java . lang . String second = "anything\n\nother" ; com . github . difflib . text . DiffRowGenerator generator = com . github . difflib . text . DiffRowGenerator . create ( ) . columnWidth ( 0 ) . build ( ) ; java . util . List < com . github . difflib . text . DiffRow > rows = generator . generateDiffRows ( split ( first ) , split ( second ) ) ; print ( rows ) ; "<AssertPlaceHolder>" ; } size ( ) { return lines . size ( ) ; }
|
org . junit . Assert . assertEquals ( 3 , rows . size ( ) )
|
jsonSerializationPartitionOffset ( ) { org . apache . crunch . kafka . offset . hdfs . Offsets . PartitionOffset partitionOffset = Offsets . PartitionOffset . Builder . newBuilder ( ) . setTopic ( testName . getMethodName ( ) ) . setOffset ( 12L ) . setPartition ( 1 ) . build ( ) ; org . apache . commons . io . output . ByteArrayOutputStream baos = new org . apache . commons . io . output . ByteArrayOutputStream ( ) ; org . apache . crunch . kafka . offset . hdfs . OffsetsTest . mapper . writeValue ( baos , partitionOffset ) ; org . apache . crunch . kafka . offset . hdfs . Offsets . PartitionOffset readOffset = org . apache . crunch . kafka . offset . hdfs . OffsetsTest . mapper . readValue ( baos . toByteArray ( ) , Offsets . PartitionOffset . class ) ; "<AssertPlaceHolder>" ; } build ( ) { return new org . apache . crunch . contrib . io . jdbc . DataBaseSource < T > ( inputClass , driverClass , url , username , password , selectClause , countClause ) ; }
|
org . junit . Assert . assertThat ( readOffset , org . hamcrest . core . Is . is ( partitionOffset ) )
|
getPreferredName_shouldReturnTheFullySpecifiedNameIfNoNameIsExplicitlyMarkedAsLocalePreferred ( ) { org . openmrs . Concept testConcept = createConcept ( 1 , Locale . US ) ; org . openmrs . ConceptName preferredNameEN_US = createConceptName ( 3 , "Aspirin" , Locale . US , null , false ) ; testConcept . addName ( preferredNameEN_US ) ; java . lang . String fullySpecName = testConcept . getFullySpecifiedName ( Locale . US ) . getName ( ) ; org . openmrs . ConceptName preferredNameEN = createConceptName ( 4 , "Doctor" , new java . util . Locale ( "en" ) , null , false ) ; testConcept . addName ( preferredNameEN ) ; "<AssertPlaceHolder>" ; } getPreferredName ( java . util . Locale ) { if ( org . openmrs . Concept . log . isDebugEnabled ( ) ) { org . openmrs . Concept . log . debug ( ( "Getting<sp>preferred<sp>conceptName<sp>for<sp>locale:<sp>" + forLocale ) ) ; } if ( getNames ( forLocale ) . isEmpty ( ) ) { if ( org . openmrs . Concept . log . isDebugEnabled ( ) ) { org . openmrs . Concept . log . debug ( ( ( ( "there<sp>are<sp>no<sp>names<sp>defined<sp>for<sp>concept<sp>with<sp>id:<sp>" + ( conceptId ) ) + "<sp>in<sp>the<sp>locale:<sp>" ) + forLocale ) ) ; } return null ; } else if ( forLocale == null ) { org . openmrs . Concept . log . warn ( "Locale<sp>cannot<sp>be<sp>null" ) ; return null ; } for ( org . openmrs . ConceptName nameInLocale : getNames ( forLocale ) ) { if ( org . springframework . util . ObjectUtils . nullSafeEquals ( nameInLocale . getLocalePreferred ( ) , true ) ) { return nameInLocale ; } } org . openmrs . ConceptName bestMatch = null ; for ( org . openmrs . ConceptName nameInLocale : getPartiallyCompatibleNames ( forLocale ) ) { if ( org . springframework . util . ObjectUtils . nullSafeEquals ( nameInLocale . getLocalePreferred ( ) , true ) ) { java . util . Locale nameLocale = nameInLocale . getLocale ( ) ; if ( forLocale . getLanguage ( ) . equals ( nameLocale . getLanguage ( ) ) ) { return nameInLocale ; } else { bestMatch = nameInLocale ; } } } if ( bestMatch != null ) { return bestMatch ; } return getFullySpecifiedName ( forLocale ) ; }
|
org . junit . Assert . assertEquals ( fullySpecName , testConcept . getPreferredName ( Locale . US ) . getName ( ) )
|
testBinaryAnnotations ( ) { org . apache . parquet . schema . OriginalType . OriginalType [ ] types = new org . apache . parquet . schema . OriginalType . OriginalType [ ] { UTF8 , JSON , BSON } ; for ( final org . apache . parquet . schema . OriginalType . OriginalType logicalType : types ) { org . apache . parquet . schema . PrimitiveType expected = new org . apache . parquet . schema . PrimitiveType ( REQUIRED , BINARY , "col" , logicalType ) ; org . apache . parquet . schema . PrimitiveType string = org . apache . parquet . schema . Types . required ( org . apache . parquet . schema . BINARY ) . as ( logicalType ) . named ( "col" ) ; "<AssertPlaceHolder>" ; } }
|
org . junit . Assert . assertEquals ( expected , string )
|
testGetEndInsertionCode ( ) { org . openscience . cdk . interfaces . IPDBStructure structure = org . openscience . cdk . interfaces . AbstractPDBStructureTest . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IPDBStructure . class ) ; "<AssertPlaceHolder>" ; } getEndInsertionCode ( ) { return endInsertionCode ; }
|
org . junit . Assert . assertNull ( structure . getEndInsertionCode ( ) )
|
testGetMVS ( ) { final ch . cyberduck . core . ftp . parser . CompositeFileEntryParser parser = new ch . cyberduck . core . ftp . FTPParserSelector ( ) . getParser ( "MVS<sp>is<sp>the<sp>operating<sp>system<sp>of<sp>this<sp>server.<sp>FTP<sp>Server<sp>is<sp>running<sp>on<sp>z/OS." ) ; final java . lang . String line = "drwxr-xr-x<sp>6<sp>START2<sp>SYS1<sp>8192<sp>Oct<sp>28<sp>2008<sp>ADCD" ; parser . preParse ( java . util . Arrays . asList ( "total<sp>66" , line ) ) ; "<AssertPlaceHolder>" ; } parseFTPEntry ( java . lang . String ) { if ( matches ( entry ) ) { java . lang . String typeStr = group ( 1 ) ; java . lang . String usr = group ( 16 ) ; java . lang . String grp = group ( 17 ) ; java . lang . String filesize = group ( 20 ) ; java . lang . String datestr = ( ( group ( 21 ) ) + "<sp>" ) + ( group ( 22 ) ) ; java . lang . String name = group ( 23 ) ; java . lang . String endtoken = group ( 24 ) ; return super . parseFTPEntry ( typeStr , usr , grp , filesize , datestr , name , endtoken ) ; } return null ; }
|
org . junit . Assert . assertNotNull ( parser . parseFTPEntry ( line ) )
|
testRemoveWithIteratorInComplexPatternReverse ( ) { for ( org . sweble . wom3 . impl . SiblingRangeCollectionTest . ChildNode e : nodes ) c . add ( e ) ; java . util . ListIterator < org . sweble . wom3 . impl . SiblingRangeCollectionTest . ChildNode > i = c . listIterator ( c . size ( ) ) ; while ( i . hasPrevious ( ) ) { i . previous ( ) ; i . remove ( ) ; if ( i . hasPrevious ( ) ) i . previous ( ) ; } "<AssertPlaceHolder>" ; while ( i . hasNext ( ) ) { i . next ( ) ; i . remove ( ) ; } } size ( ) { return size ; }
|
org . junit . Assert . assertEquals ( ( ( nodes . size ( ) ) / 2 ) , c . size ( ) )
|
testPublicClientIdOnly ( ) { java . lang . String pubPort = org . apache . cxf . systest . jaxrs . security . oauth2 . grants . JAXRSOAuth2Test . JCACHE_PORT_PUBLIC ; if ( org . apache . cxf . systest . jaxrs . security . oauth2 . grants . JAXRSOAuth2Test . JWT_JCACHE_PORT . equals ( port ) ) { pubPort = org . apache . cxf . systest . jaxrs . security . oauth2 . grants . JAXRSOAuth2Test . JWT_JCACHE_PORT_PUBLIC ; } else if ( org . apache . cxf . systest . jaxrs . security . oauth2 . grants . JAXRSOAuth2Test . JPA_PORT . equals ( port ) ) { pubPort = org . apache . cxf . systest . jaxrs . security . oauth2 . grants . JAXRSOAuth2Test . JPA_PORT_PUBLIC ; } else if ( org . apache . cxf . systest . jaxrs . security . oauth2 . grants . JAXRSOAuth2Test . JWT_NON_PERSIST_JCACHE_PORT . equals ( port ) ) { pubPort = org . apache . cxf . systest . jaxrs . security . oauth2 . grants . JAXRSOAuth2Test . JWT_NON_PERSIST_JCACHE_PORT_PUBLIC ; } java . lang . String address = ( "http://localhost:" + pubPort ) + "/oauth2Public/token" ; org . apache . cxf . jaxrs . client . WebClient wc = org . apache . cxf . jaxrs . client . WebClient . create ( address ) ; org . apache . cxf . rs . security . oauth2 . common . ClientAccessToken at = org . apache . cxf . rs . security . oauth2 . client . OAuthClientUtils . getAccessToken ( wc , new org . apache . cxf . rs . security . oauth2 . client . Consumer ( "fredPublic" ) , new org . apache . cxf . systest . jaxrs . security . oauth2 . grants . JAXRSOAuth2Test . CustomGrant ( ) , false ) ; "<AssertPlaceHolder>" ; } getTokenKey ( ) { return tokenString ; }
|
org . junit . Assert . assertNotNull ( at . getTokenKey ( ) )
|
testFieldsIsSet_null ( ) { fixture . setFields ( ( ( org . eclipse . tracecompass . ctf . core . event . types . StructDeclaration ) ( null ) ) ) ; boolean result = fixture . fieldsIsSet ( ) ; "<AssertPlaceHolder>" ; } fieldsIsSet ( ) { return ( fFields ) != null ; }
|
org . junit . Assert . assertFalse ( result )
|
testHyphenationRemoverInPipelineReaderWriter ( ) { java . io . File outputPath = testContext . getTestOutputFolder ( ) ; final java . lang . String language = "de" ; final java . lang . String variant = "maxent" ; java . lang . String sourcePath = "src/test/resources/texts/test3.txt" ; final java . lang . String expected = "Ich<sp>habe<sp>einen<sp>super-tollen<sp>Bären<sp>.\n" + "Für<sp>eine<sp>Registrierung<sp>einer<sp>Organisation<sp>und<sp>eine<sp>EMail<sp>Adresse<sp>.\n" ; final org . apache . uima . collection . CollectionReader reader = createReader ( de . tudarmstadt . ukp . dkpro . core . io . text . TextReader . class , TextReader . PARAM_LANGUAGE , language , TextReader . PARAM_SOURCE_LOCATION , sourcePath ) ; org . apache . uima . analysis_engine . AnalysisEngineDescription hyphenationRemover = createEngineDescription ( de . tudarmstadt . ukp . dkpro . core . textnormalizer . transformation . HyphenationRemover . class , HyphenationRemover . PARAM_MODEL_LOCATION , de . tudarmstadt . ukp . dkpro . core . textnormalizer . transformation . HyphenationRemoverTest . RESOURCE_GERMAN_DICTIONARY ) ; org . apache . uima . analysis_engine . AnalysisEngineDescription segmenter = createEngineDescription ( de . tudarmstadt . ukp . dkpro . core . opennlp . OpenNlpSegmenter . class , OpenNlpSegmenter . PARAM_VARIANT , variant ) ; org . apache . uima . analysis_engine . AnalysisEngineDescription writer = createEngineDescription ( de . tudarmstadt . ukp . dkpro . core . io . text . TokenizedTextWriter . class , TokenizedTextWriter . PARAM_TARGET_LOCATION , new java . io . File ( outputPath , "test3.txt" ) , TokenizedTextWriter . PARAM_SINGULAR_TARGET , true , TokenizedTextWriter . PARAM_OVERWRITE , true ) ; org . apache . uima . fit . pipeline . SimplePipeline . runPipeline ( reader , hyphenationRemover , segmenter , writer ) ; java . lang . String actual = org . apache . commons . io . FileUtils . readFileToString ( new java . io . File ( outputPath , "test3.txt" ) , "UTF-8" ) ; actual = de . tudarmstadt . ukp . dkpro . core . testing . EOLUtils . normalizeLineEndings ( actual ) ; "<AssertPlaceHolder>" ; } normalizeLineEndings ( java . lang . String ) { java . lang . String result = text . replaceAll ( "\\r\\n" , "\n" ) ; result = result . replaceAll ( "\\r" , "\n" ) ; return result ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
showCarbon_SingleCarbonTest ( ) { org . openscience . cdk . interfaces . IAtomContainer atomContainer = super . makeSingleAtom ( "C" ) ; org . openscience . cdk . interfaces . IAtom carbon = atomContainer . getAtom ( 0 ) ; "<AssertPlaceHolder>" ; } showCarbon ( org . openscience . cdk . interfaces . IAtom , org . openscience . cdk . interfaces . IAtomContainer , org . openscience . cdk . renderer . RendererModel ) { java . lang . Integer massNumber = atom . getMassNumber ( ) ; if ( massNumber != null ) { try { java . lang . Integer expectedMassNumber = org . openscience . cdk . config . Isotopes . getInstance ( ) . getMajorIsotope ( atom . getSymbol ( ) ) . getMassNumber ( ) ; if ( ! ( massNumber . equals ( expectedMassNumber ) ) ) return true ; } catch ( java . io . IOException e ) { logger . warn ( e ) ; } } return super . showCarbon ( atom , container , model ) ; }
|
org . junit . Assert . assertTrue ( generator . showCarbon ( carbon , atomContainer , model ) )
|
test_matchSubUrls_fail_two_params ( ) { java . util . Map < java . lang . String , java . lang . String > params = urlMarcher . matchSubUrls ( "{id}_{key}" , "abc-test" ) ; "<AssertPlaceHolder>" ; } matchSubUrls ( java . lang . String , java . lang . String ) { boolean canContinue = true ; java . util . Map < java . lang . String , java . lang . String > result = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; while ( canContinue ) { int dpos = subUrlPattern . indexOf ( '{' ) ; if ( dpos >= 0 ) { if ( dpos > 0 ) { if ( subUrl . startsWith ( subUrlPattern . substring ( 0 , dpos ) ) ) { subUrl = subUrl . substring ( dpos ) ; subUrlPattern = subUrlPattern . substring ( ( dpos + 1 ) ) ; } else { return null ; } } else { subUrlPattern = subUrlPattern . substring ( 1 ) ; } dpos = subUrlPattern . indexOf ( '}' ) ; int epos = subUrlPattern . indexOf ( '{' ) ; if ( ( epos >= 0 ) && ( dpos > epos ) ) { return null ; } if ( dpos >= 0 ) { java . lang . String parameter = subUrlPattern . substring ( 0 , dpos ) ; subUrlPattern = subUrlPattern . substring ( ( dpos + 1 ) ) ; if ( ( subUrlPattern . length ( ) ) > 0 ) { int tempPos = subUrlPattern . indexOf ( '{' ) ; if ( tempPos >= 0 ) { java . lang . String fixedValue = subUrlPattern . substring ( 0 , tempPos ) ; int fixedPos = - 1 ; if ( parameter . equals ( "*" ) ) { fixedPos = subUrl . lastIndexOf ( fixedValue ) ; } else { fixedPos = subUrl . indexOf ( fixedValue ) ; } if ( fixedPos >= 0 ) { java . lang . String parameterValue = subUrl . substring ( 0 , fixedPos ) ; result . put ( parameter , parameterValue ) ; subUrl = subUrl . substring ( fixedPos ) ; } else { return null ; } } else { if ( subUrl . endsWith ( subUrlPattern ) ) { subUrl = subUrl . substring ( 0 , ( ( subUrl . length ( ) ) - ( subUrlPattern . length ( ) ) ) ) ; result . put ( parameter , subUrl ) ; return result ; } else { return null ; } } } else { result . put ( parameter , subUrl ) ; return result ; } } else { return null ; } } else { if ( subUrl . equals ( subUrlPattern ) ) { return result ; } else { return null ; } } } return null ; }
|
org . junit . Assert . assertTrue ( ( params == null ) )
|
shouldStartWithTreeFocused ( ) { org . infinitest . intellij . plugin . swingui . TreeFocusListener listener = new org . infinitest . intellij . plugin . swingui . TreeFocusListener ( ) { @ org . infinitest . intellij . plugin . swingui . Override protected void setFocus ( org . infinitest . intellij . plugin . swingui . Component c ) { focusedComponent = c ; } } ; listener . windowGainedFocus ( new org . infinitest . intellij . plugin . swingui . WindowEvent ( mainFrame , 0 ) ) ; "<AssertPlaceHolder>" ; } getTree ( ) { return resultsPane . getTree ( ) ; }
|
org . junit . Assert . assertEquals ( resultsPane . getTree ( ) , focusedComponent )
|
test01 ( ) { com . ebay . cloud . cms . metadata . model . MetaClass metadata = raptorMetaService . getMetaClass ( "ServiceInstance" ) ; com . ebay . cloud . cms . dal . search . SearchGroup group = new com . ebay . cloud . cms . dal . search . SearchGroup ( ) ; group . addGroupField ( createGroupField ( metadata , "healthStatus" ) ) ; group . addGroupField ( createGroupField ( metadata , "manifestDiff" ) ) ; com . ebay . cloud . cms . dal . search . impl . field . AggregationField max_ports = createAggregationField ( metadata , AggFuncEnum . MAX , "port" ) ; group . addAggregationField ( max_ports ) ; com . ebay . cloud . cms . dal . search . SearchProjection projection = new com . ebay . cloud . cms . dal . search . SearchProjection ( ) ; projection . addField ( max_ports ) ; com . ebay . cloud . cms . dal . search . SearchCriteria criteria = new com . ebay . cloud . cms . dal . search . impl . criteria . FieldSearchCriteria ( max_ports , com . ebay . cloud . cms . dal . search . impl . criteria . FieldSearchCriteria . FieldOperatorEnum . GT , "123" ) ; com . ebay . cloud . cms . dal . search . ISearchQuery query = new com . ebay . cloud . cms . dal . search . impl . query . SearchQuery ( metadata , null , projection , group , criteria , strategy ) ; com . ebay . cloud . cms . dal . search . SearchOption option = new com . ebay . cloud . cms . dal . search . SearchOption ( ) ; com . ebay . cloud . cms . dal . search . SearchResult result = searchService . search ( query , option , raptorContext ) ; "<AssertPlaceHolder>" ; } getResultSize ( ) { return resultSet . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , result . getResultSize ( ) )
|
ensureShutdownWithBlockedQueue ( ) { try { java . util . concurrent . ExecutorService service = java . util . concurrent . Executors . newSingleThreadExecutor ( ) ; int before = java . lang . Thread . activeCount ( ) ; final org . apache . streams . core . StreamBuilder builder = new org . apache . streams . local . builders . LocalStreamBuilder ( ) ; builder . newPerpetualStream ( "prov1" , new org . apache . streams . local . test . providers . NumericMessageProvider ( 30 ) ) . addStreamsProcessor ( "proc1" , new org . apache . streams . local . test . processors . SlowProcessor ( ) , 1 , "prov1" ) . addStreamsPersistWriter ( "w1" , new org . apache . streams . local . test . writer . SystemOutWriter ( ) , 1 , "proc1" ) ; service . submit ( builder :: start ) ; java . lang . Thread . sleep ( 500 ) ; builder . stop ( ) ; service . shutdownNow ( ) ; service . awaitTermination ( 30000 , TimeUnit . MILLISECONDS ) ; "<AssertPlaceHolder>" ; } finally { java . lang . String provClass = "-" + ( org . apache . streams . local . test . providers . NumericMessageProvider . class . getCanonicalName ( ) ) ; java . lang . String procClass = "-" + ( org . apache . streams . local . test . processors . PassthroughDatumCounterProcessor . class . getCanonicalName ( ) ) ; java . lang . String writerClass = "-" + ( org . apache . streams . local . test . writer . DatumCounterWriter . class . getCanonicalName ( ) ) ; removeRegisteredMBeans ( "prov1" , "proc1" , "w1" ) ; } } stop ( ) { stopInternal ( false ) ; }
|
org . junit . Assert . assertThat ( java . lang . Thread . activeCount ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( before ) ) )
|
configureDatabaseNameTestCustomDbName ( ) { java . lang . String configuredDbName = "dbName" ; java . net . URI uri = new java . net . URI ( ( ( com . cloud . server . StatsCollectorTest . URL ) + configuredDbName ) ) ; java . lang . String dbName = statsCollector . configureDatabaseName ( uri ) ; "<AssertPlaceHolder>" ; } configureDatabaseName ( java . net . URI ) { java . lang . String dbname = org . apache . commons . lang . StringUtils . removeStart ( uri . getPath ( ) , "/" ) ; if ( org . apache . commons . lang . StringUtils . isBlank ( dbname ) ) { return com . cloud . server . StatsCollector . DEFAULT_DATABASE_NAME ; } else { return dbname ; } }
|
org . junit . Assert . assertEquals ( configuredDbName , dbName )
|
testThatNoPortWorks ( ) { youTrackInstance = new com . ontometrics . integrations . configuration . YouTrackInstance . Builder ( ) . baseUrl ( "http://ontometrics.com" ) . build ( ) ; "<AssertPlaceHolder>" ; } getBaseUrl ( ) { java . net . URL url ; try { url = new java . net . URL ( baseUrl ) ; } catch ( java . net . MalformedURLException e ) { throw new java . lang . RuntimeException ( e ) ; } return url ; }
|
org . junit . Assert . assertThat ( youTrackInstance . getBaseUrl ( ) , org . hamcrest . CoreMatchers . is ( new java . net . URL ( "http://ontometrics.com" ) ) )
|
tesGroepen13 ( ) { final java . lang . String message = maakLo3VerblijfplaatsInhoud ( new nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3GemeenteCode ( nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3VerblijfplaatsInhoudTest . "adres3" 234 ) , new nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3Datum ( 20120101 ) , null , null , null , null , null , null , null , null , null , null , null , null , null , null , new nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3LandCode ( nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3VerblijfplaatsInhoudTest . "adres3" 234 ) , new nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3Datum ( 20120101 ) , nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3String . wrap ( "adres1" ) , nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3String . wrap ( "adres2" ) , nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3String . wrap ( "adres3" ) , null , null , Lo3AangifteAdreshoudingEnum . AMBSTHALVE . asElement ( ) , null ) ; "<AssertPlaceHolder>" ; } asElement ( ) { return new nl . moderniseringgba . migratie . conversie . model . lo3 . element . Lo3AangifteAdreshouding ( code ) ; }
|
org . junit . Assert . assertEquals ( "" , message )
|
testBadPassword_PreHashedServer ( ) { java . util . Map < java . lang . String , java . lang . Object > serverProps = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; serverProps . put ( org . wildfly . security . sasl . digest . DigestTest . REALM_PROPERTY , "TestRealm" ) ; serverProps . put ( org . wildfly . security . sasl . digest . DigestTest . PRE_DIGESTED_PROPERTY , "true" ) ; javax . security . sasl . SaslServer server = new org . wildfly . security . sasl . test . SaslServerBuilder ( org . wildfly . security . sasl . digest . DigestServerFactory . class , org . wildfly . security . sasl . digest . DigestTest . DIGEST ) . setUserName ( "George" ) . setPassword ( DigestPassword . ALGORITHM_DIGEST_MD5 , getDigestKeySpec ( "George" , "gpwd" , "TestRealm" ) ) . setProperties ( serverProps ) . setProtocol ( "TestProtocol" ) . setServerName ( "TestServer" ) . build ( ) ; javax . security . auth . callback . CallbackHandler clientCallback = org . wildfly . security . sasl . digest . DigestCallbackHandlerUtils . createClearPwdClientCallbackHandler ( "George" , "bad" , null ) ; javax . security . sasl . SaslClient client = javax . security . sasl . Sasl . createSaslClient ( new java . lang . String [ ] { org . wildfly . security . sasl . digest . DigestTest . DIGEST } , "George" , "TestProtocol" , "TestServer" , java . util . Collections . < java . lang . String , java . lang . Object > emptyMap ( ) , clientCallback ) ; "<AssertPlaceHolder>" ; byte [ ] message = server . evaluateResponse ( new byte [ 0 ] ) ; org . wildfly . security . sasl . digest . DigestTest . log . debug ( ( "Challenge:" + ( new java . lang . String ( message , java . nio . charset . StandardCharsets . ISO_8859_1 ) ) ) ) ; message = client . evaluateChallenge ( message ) ; org . wildfly . security . sasl . digest . DigestTest . log . debug ( ( "Client<sp>response:" + ( new java . lang . String ( message , java . nio . charset . StandardCharsets . ISO_8859_1 ) ) ) ) ; try { server . evaluateResponse ( message ) ; org . junit . Assert . fail ( "Expection<sp>exception<sp>not<sp>thrown." ) ; } catch ( java . io . IOException e ) { } } hasInitialResponse ( ) { return delegate . hasInitialResponse ( ) ; }
|
org . junit . Assert . assertFalse ( client . hasInitialResponse ( ) )
|
testOnException ( ) { java . util . concurrent . atomic . AtomicReference < org . slieb . throwables . java . lang . Throwable > reference = new java . util . concurrent . atomic . AtomicReference ( ) ; org . slieb . throwables . java . lang . Exception expected = new org . slieb . throwables . java . lang . Exception ( "expected" ) ; try { org . slieb . throwables . BiFunctionWithThrowable . castBiFunctionWithThrowable ( ( v1 , v2 ) -> { throw expected ; } ) . onException ( reference :: set ) . apply ( null , null ) ; } catch ( java . lang . Throwable ignored ) { } "<AssertPlaceHolder>" ; } get ( ) { try { return getWithThrowable ( ) ; } catch ( java . lang . RuntimeException | java . lang . Error exception ) { throw exception ; } catch ( final java . lang . Throwable throwable ) { throw new org . slieb . throwables . SuppressedException ( throwable ) ; } }
|
org . junit . Assert . assertEquals ( expected , reference . get ( ) )
|
checkSchemaRefresh ( ) { final com . orientechnologies . orient . core . db . OPartitionedDatabasePool pool = new com . orientechnologies . orient . core . db . OPartitionedDatabasePool ( dbo . getURL ( ) , "admin" , "admin" ) ; try { com . orientechnologies . orient . core . db . document . ODatabaseDocument db = pool . acquire ( ) ; com . orientechnologies . orient . core . db . document . ExecutorService exec = com . orientechnologies . orient . core . db . document . Executors . newSingleThreadExecutor ( ) ; com . orientechnologies . orient . core . db . document . Future f = exec . submit ( new com . orientechnologies . orient . core . db . document . Callable < java . lang . Object > ( ) { @ com . orientechnologies . orient . core . db . document . Override public java . lang . Object call ( ) throws com . orientechnologies . orient . core . db . document . Exception { com . orientechnologies . orient . core . db . document . ODatabaseDocument db1 = pool . acquire ( ) ; db1 . getMetadata ( ) . getSchema ( ) . createClass ( "Test" ) ; db1 . close ( ) ; return null ; } } ) ; f . get ( ) ; exec . shutdown ( ) ; db . activateOnCurrentThread ( ) ; com . orientechnologies . orient . core . metadata . schema . OClass clazz = db . getMetadata ( ) . getSchema ( ) . getClass ( "Test" ) ; "<AssertPlaceHolder>" ; db . close ( ) ; } finally { pool . close ( ) ; } } getClass ( java . lang . Class ) { if ( iClass == null ) return null ; return getClass ( iClass . getSimpleName ( ) ) ; }
|
org . junit . Assert . assertNotNull ( clazz )
|
shouldNotCacheAllAuthors ( ) { int first = - 1 ; int second = - 1 ; org . apache . ibatis . session . SqlSession session = org . apache . ibatis . session . SqlSessionTest . sqlMapper . openSession ( ) ; try { java . util . List < org . apache . ibatis . domain . blog . Author > authors = session . selectList ( "org.apache.ibatis.domain.blog.mappers.AuthorMapper.selectAllAuthors" ) ; first = java . lang . System . identityHashCode ( authors ) ; } finally { session . close ( ) ; } session = org . apache . ibatis . session . SqlSessionTest . sqlMapper . openSession ( ) ; try { java . util . List < org . apache . ibatis . domain . blog . Author > authors = session . selectList ( "org.apache.ibatis.domain.blog.mappers.AuthorMapper.selectAllAuthors" ) ; second = java . lang . System . identityHashCode ( authors ) ; } finally { session . close ( ) ; } "<AssertPlaceHolder>" ; } close ( ) { try { executor . close ( isCommitOrRollbackRequired ( false ) ) ; closeCursors ( ) ; dirty = false ; } finally { org . apache . ibatis . executor . ErrorContext . instance ( ) . reset ( ) ; } }
|
org . junit . Assert . assertTrue ( ( first != second ) )
|
selectComplexNestedCollectionOfComplexWithMetadataNone ( ) { final java . lang . String METADATA_TEXT = "@odata." ; final org . apache . olingo . commons . api . edm . EdmEntitySet edmEntitySet = org . apache . olingo . server . core . serializer . json . ODataJsonSerializerTest . entityContainer . getEntitySet ( "ESCompCollComp" ) ; final org . apache . olingo . commons . api . data . EntityCollection entitySet = data . readAll ( edmEntitySet ) ; java . io . InputStream result = serializerNoMetadata . entityCollection ( org . apache . olingo . server . core . serializer . json . ODataJsonSerializerTest . metadata , edmEntitySet . getEntityType ( ) , entitySet , org . apache . olingo . server . api . serializer . EntityCollectionSerializerOptions . with ( ) . contextURL ( org . apache . olingo . commons . api . data . ContextURL . with ( ) . entitySet ( edmEntitySet ) . build ( ) ) . build ( ) ) . getContent ( ) ; final java . lang . String resultString = org . apache . commons . io . IOUtils . toString ( result ) ; "<AssertPlaceHolder>" ; } contains ( org . apache . olingo . ext . proxy . commons . EntityInvocationHandler ) { return keys . contains ( key ) ; }
|
org . junit . Assert . assertEquals ( false , resultString . contains ( METADATA_TEXT ) )
|
testRead ( ) { ca . corefacility . bioinformatics . irida . utils . model . IdentifiableTestEntity i = new ca . corefacility . bioinformatics . irida . utils . model . IdentifiableTestEntity ( ) ; i . setId ( new java . lang . Long ( 1 ) ) ; i . setNonNull ( "Definitely<sp>not<sp>null" ) ; when ( crudRepository . findOne ( i . getId ( ) ) ) . thenReturn ( i ) ; try { i = crudService . read ( i . getId ( ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . IllegalArgumentException e ) { org . junit . Assert . fail ( ) ; } } getId ( ) { return this . id ; }
|
org . junit . Assert . assertNotNull ( i )
|
testExtFun3 ( ) { java . lang . String init = "prefix<sp>ex:<sp><http://example.org/><sp>" + ( ( "insert<sp>data<sp>{" + "ex:John<sp>rdf:value<sp>1,<sp>2<sp>" ) + "}" ) ; java . lang . String q = "prefix<sp>ex:<sp><http://example.org/><sp>" + ( ( ( ( ( ( ( "select<sp>*<sp>" + "where<sp>{" ) + "?x<sp>rdf:value<sp>?n<sp>" ) + "filter<sp>exists<sp>{<sp>?y<sp>?p<sp>?n<sp>filter<sp>(!<sp>xt:fun(?n))<sp>}<sp>" ) + "}" ) + "filter<sp>exists<sp>{<sp>?y<sp>?p<sp>?n<sp>filter<sp>(!<sp>xt:fun(?n))<sp>}<sp>" 0 ) + "exists<sp>{<sp>?n<sp>?q<sp>?x<sp>}<sp>" ) + "}<sp>" ) ; fr . inria . corese . core . Graph g = createGraph ( ) ; fr . inria . corese . core . query . QueryProcess exec = fr . inria . corese . core . query . QueryProcess . create ( g ) ; exec . query ( init ) ; fr . inria . corese . kgram . core . Mappings map = exec . query ( q ) ; "<AssertPlaceHolder>" ; } size ( ) { return tests . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , map . size ( ) )
|
test1Jan1900Previous ( ) { org . jfree . data . time . Day jan1st1900 = new org . jfree . data . time . Day ( 1 , org . jfree . date . MonthConstants . JANUARY , 1900 ) ; org . jfree . data . time . Day previous = ( ( org . jfree . data . time . Day ) ( jan1st1900 . previous ( ) ) ) ; "<AssertPlaceHolder>" ; } previous ( ) { synchronized ( checkClosed ( ) . getConnectionMutex ( ) ) { if ( this . onInsertRow ) { this . onInsertRow = false ; } if ( this . doingUpdates ) { this . doingUpdates = false ; } return prev ( ) ; } }
|
org . junit . Assert . assertNull ( previous )
|
testSerial ( ) { org . apache . commons . math4 . fraction . BigFractionField field = org . apache . commons . math4 . fraction . BigFractionField . getInstance ( ) ; "<AssertPlaceHolder>" ; } serializeAndRecover ( java . lang . Object ) { try { java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream so = new java . io . ObjectOutputStream ( bos ) ; so . writeObject ( o ) ; java . io . ByteArrayInputStream bis = new java . io . ByteArrayInputStream ( bos . toByteArray ( ) ) ; java . io . ObjectInputStream si = new java . io . ObjectInputStream ( bis ) ; return si . readObject ( ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } }
|
org . junit . Assert . assertTrue ( ( field == ( org . apache . commons . math4 . TestUtils . serializeAndRecover ( field ) ) ) )
|
shouldStillZeroAfterEatStone ( ) { scores = new com . codenjoy . dojo . snake . services . Scores ( 0 , settings ) ; snakeEatStone ( ) ; "<AssertPlaceHolder>" ; } score ( ) { return killed ; }
|
org . junit . Assert . assertEquals ( 0 , score ( ) )
|
testAccountInactive ( ) { org . whispersystems . textsecuregcm . storage . Account oldPrimaryAccount = new org . whispersystems . textsecuregcm . storage . Account ( "+14152222222" , new java . util . HashSet < org . whispersystems . textsecuregcm . storage . Device > ( ) { { add ( oldMasterDevice ) ; add ( oldSecondaryDevice ) ; } } , "1234" . getBytes ( ) ) ; "<AssertPlaceHolder>" ; } isActive ( ) { boolean hasChannel = ( ( fetchesMessages ) || ( ! ( org . whispersystems . textsecuregcm . util . Util . isEmpty ( getApnId ( ) ) ) ) ) || ( ! ( org . whispersystems . textsecuregcm . util . Util . isEmpty ( getGcmId ( ) ) ) ) ; return ( ( ( ( id ) == ( org . whispersystems . textsecuregcm . storage . Device . MASTER_ID ) ) && hasChannel ) && ( ( signedPreKey ) != null ) ) || ( ( ( ( ( id ) != ( org . whispersystems . textsecuregcm . storage . Device . MASTER_ID ) ) && hasChannel ) && ( ( signedPreKey ) != null ) ) && ( ! ( isIdleInactive ( ) ) ) ) ; }
|
org . junit . Assert . assertFalse ( oldPrimaryAccount . isActive ( ) )
|
testParse ( ) { com . KnappTech . xml . SimpleNode n = com . KnappTech . xml . NodeParser . parse ( textXML ) ; System . out . println ( ( "Original:\n" + ( textXML ) ) ) ; System . out . println ( ( "Produced:\n" + n ) ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { com . KnappTech . xml . SimpleSAJHandler p = new com . KnappTech . xml . SimpleSAJHandler ( ) ; javax . xml . parsers . SAXParserFactory f = javax . xml . parsers . SAXParserFactory . newInstance ( ) ; java . io . InputStream is = null ; try { javax . xml . parsers . SAXParser s = f . newSAXParser ( ) ; is = new java . io . ByteArrayInputStream ( xml . getBytes ( ) ) ; s . parse ( is , p ) ; } catch ( org . xml . sax . SAXException e ) { e . printStackTrace ( ) ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } catch ( javax . xml . parsers . ParserConfigurationException e ) { e . printStackTrace ( ) ; } finally { if ( is != null ) try { is . close ( ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } } return p . getRoot ( ) ; }
|
org . junit . Assert . assertTrue ( ( n != null ) )
|
testExcessReduceContainerAssign ( ) { final org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; conf . setFloat ( MRJobConfig . COMPLETED_MAPS_FOR_REDUCE_SLOWSTART , 0.0F ) ; final org . apache . hadoop . mapreduce . v2 . app . rm . TestRMContainerAllocator . MyResourceManager2 rm = new org . apache . hadoop . mapreduce . v2 . app . rm . TestRMContainerAllocator . MyResourceManager2 ( conf ) ; rm . start ( ) ; final org . apache . hadoop . yarn . server . resourcemanager . rmapp . RMApp app = rm . submitApp ( 2048 ) ; rm . drainEvents ( ) ; final java . lang . String host = "host1" ; final org . apache . hadoop . yarn . server . resourcemanager . MockNM nm = rm . registerNode ( java . lang . String . format ( "%s:1234" , host ) , 4096 ) ; nm . nodeHeartbeat ( true ) ; rm . drainEvents ( ) ; final org . apache . hadoop . yarn . api . records . ApplicationAttemptId appAttemptId = app . getCurrentAppAttempt ( ) . getAppAttemptId ( ) ; rm . sendAMLaunched ( appAttemptId ) ; rm . drainEvents ( ) ; final org . apache . hadoop . mapreduce . v2 . api . records . JobId jobId = org . apache . hadoop . mapreduce . v2 . util . MRBuilderUtils . newJobId ( appAttemptId . getApplicationId ( ) , 0 ) ; final org . apache . hadoop . mapreduce . v2 . app . job . Job mockJob = mock ( org . apache . hadoop . mapreduce . v2 . app . job . Job . class ) ; when ( mockJob . getReport ( ) ) . thenReturn ( org . apache . hadoop . mapreduce . v2 . util . MRBuilderUtils . newJobReport ( jobId , "job" , "user" , JobState . RUNNING , 0 , 0 , 0 , 0 , 0 , 0 , 0 , "jobfile" , null , false , "" ) ) ; final org . apache . hadoop . mapreduce . v2 . app . rm . TestRMContainerAllocator . MyContainerAllocator allocator = new org . apache . hadoop . mapreduce . v2 . app . rm . TestRMContainerAllocator . MyContainerAllocator ( rm , conf , appAttemptId , mockJob , org . apache . hadoop . yarn . util . SystemClock . getInstance ( ) ) ; final java . lang . String [ ] locations = new java . lang . String [ ] { host } ; allocator . sendRequest ( org . apache . hadoop . mapreduce . v2 . app . rm . ContainerRequestCreator . createRequest ( jobId , 0 , org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , locations , false , true ) ) ; allocator . scheduleAllReduces ( ) ; allocator . makeRemoteRequest ( ) ; nm . nodeHeartbeat ( true ) ; rm . drainEvents ( ) ; allocator . sendRequest ( org . apache . hadoop . mapreduce . v2 . app . rm . ContainerRequestCreator . createRequest ( jobId , 1 , org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , locations , false , false ) ) ; int assignedContainer ; for ( assignedContainer = 0 ; assignedContainer < 1 ; ) { assignedContainer += allocator . schedule ( ) . size ( ) ; nm . nodeHeartbeat ( true ) ; rm . drainEvents ( ) ; } "<AssertPlaceHolder>" ; } drainEvents ( ) { org . apache . hadoop . yarn . event . Dispatcher rmDispatcher = getRmDispatcher ( ) ; if ( rmDispatcher instanceof org . apache . hadoop . yarn . event . DrainDispatcher ) { ( ( org . apache . hadoop . yarn . event . DrainDispatcher ) ( rmDispatcher ) ) . await ( ) ; } else { throw new java . lang . UnsupportedOperationException ( "Not<sp>a<sp>Drain<sp>Dispatcher!" ) ; } }
|
org . junit . Assert . assertEquals ( assignedContainer , 1 )
|
testInitialize ( ) { org . talend . components . salesforce . runtime . SalesforceSourceOrSink salesforceSourceOrSink = new org . talend . components . salesforce . runtime . SalesforceSourceOrSink ( ) ; org . talend . components . salesforce . tsalesforceinput . TSalesforceInputProperties properties = new org . talend . components . salesforce . tsalesforceinput . TSalesforceInputProperties ( null ) ; salesforceSourceOrSink . initialize ( null , properties ) ; "<AssertPlaceHolder>" ; } getConnectionProperties ( ) { return connection . getEffectiveConnectionProperties ( ) ; }
|
org . junit . Assert . assertEquals ( properties . connection , salesforceSourceOrSink . getConnectionProperties ( ) )
|
isChannelPresentTest ( ) { java . lang . String channel = "aidr_predict.mock_collection" + ( new java . util . Date ( ) ) ; boolean result = qa . qcri . aidr . output . getdata . TestGetBufferedAIDRData . getBufferedAIDRData . isChannelPresent ( channel ) ; "<AssertPlaceHolder>" ; } isChannelPresent ( java . lang . String ) { java . util . Set < java . lang . String > channelList = qa . qcri . aidr . output . getdata . GetBufferedAIDRData . cbManager . getActiveChannelsList ( ) ; if ( channelList != null ) { return channelList . contains ( channel ) ; } return false ; }
|
org . junit . Assert . assertFalse ( result )
|
replaceData_pastEnd ( ) { final org . exist . dom . memtree . MemTreeBuilder builder = new org . exist . dom . memtree . MemTreeBuilder ( ) ; builder . startDocument ( ) ; builder . startElement ( new org . exist . dom . QName ( "p" , null , null ) , null ) ; builder . characters ( "hello" ) ; builder . startElement ( new org . exist . dom . QName ( "span" , null , null ) , null ) ; builder . characters ( "goodbye" ) ; builder . endElement ( ) ; builder . endElement ( ) ; builder . endDocument ( ) ; final org . w3c . dom . Document doc = builder . getDocument ( ) ; final org . w3c . dom . Text text = ( ( org . w3c . dom . Text ) ( doc . getDocumentElement ( ) . getFirstChild ( ) ) ) ; "<AssertPlaceHolder>" ; text . insertData ( 10 , "world" ) ; } getTextContent ( ) { final java . lang . StringBuilder result = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < ( this . getChildCount ( ) ) ; i ++ ) { final org . w3c . dom . Node child = getChildNodes ( ) . item ( i ) ; if ( child instanceof org . w3c . dom . Text ) { if ( i > 0 ) { result . append ( "<sp>" ) ; } result . append ( ( ( org . w3c . dom . Text ) ( child ) ) . getData ( ) ) ; } } return result . toString ( ) ; }
|
org . junit . Assert . assertEquals ( "hello" , text . getTextContent ( ) )
|
testGetParametersWithDisabledDEfaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . Long personId = 1L ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; person . setId ( personId ) ; java . lang . Long degreeTypeId = 2L ; org . lnu . is . domain . degree . type . DegreeType degreeType = new org . lnu . is . domain . degree . type . DegreeType ( ) ; degreeType . setId ( degreeTypeId ) ; org . lnu . is . domain . degree . Degree entity = new org . lnu . is . domain . degree . Degree ( ) ; entity . setPerson ( person ) ; entity . setDegreeType ( degreeType ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "person" , person ) ; expected . put ( "degreeType" , degreeType ) ; when ( degreeTypeDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( degreeType ) ; when ( personDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( person ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; verify ( personDao ) . getEntityById ( personId ) ; verify ( degreeTypeDao ) . getEntityById ( degreeTypeId ) ; "<AssertPlaceHolder>" ; } getEntityById ( KEY ) { org . lnu . is . dao . dao . DefaultDao . LOG . info ( "Getting<sp>{}.entity<sp>wit<sp>id" , getEntityClass ( ) . getSimpleName ( ) , id ) ; return persistenceManager . findById ( getEntityClass ( ) , id ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
getRealm ( ) { com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDSFailover . c , "getRealm" , "Checking<sp>expected<sp>realm" ) ; "<AssertPlaceHolder>" ; } getRealm ( ) { com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDSFailover . c , "getRealm" , "Checking<sp>expected<sp>realm" ) ; org . junit . Assert . assertEquals ( "SampleLdapIDSRealm" , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDSFailover . servlet . getRealm ( ) ) ; }
|
org . junit . Assert . assertEquals ( "SampleLdapIDSRealm" , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDSFailover . servlet . getRealm ( ) )
|
testGetStringValue ( ) { org . wikidata . wdtk . datamodel . implementation . StringValue o1 = new org . wikidata . wdtk . datamodel . implementation . StringValueImpl ( "foo" ) ; org . wikidata . wdtk . datamodel . implementation . StringValue o2 = factory . getStringValue ( "foo" ) ; "<AssertPlaceHolder>" ; } getStringValue ( java . lang . String ) { return new org . wikidata . wdtk . datamodel . implementation . StringValueImpl ( string ) ; }
|
org . junit . Assert . assertEquals ( o1 , o2 )
|
removeTrailingSlashes_withTwoSlashes ( ) { java . lang . StringBuffer url = new java . lang . StringBuffer ( ) ; url . append ( ( ( org . oscm . internal . passwordrecovery . PasswordRecoveryLinkTest . BASE_URL ) + "//" ) ) ; link . removeTrailingSlashes ( url ) ; "<AssertPlaceHolder>" ; } removeTrailingSlashes ( java . lang . StringBuffer ) { while ( ( ( url . length ( ) ) > 0 ) && ( ( url . charAt ( ( ( url . length ( ) ) - 1 ) ) ) == '/' ) ) { url . replace ( ( ( url . length ( ) ) - 1 ) , url . length ( ) , "" ) ; } }
|
org . junit . Assert . assertEquals ( org . oscm . internal . passwordrecovery . PasswordRecoveryLinkTest . BASE_URL . length ( ) , url . length ( ) )
|
testGetPoolsBySubIdNull ( ) { org . candlepin . model . Owner owner2 = createOwner ( ) ; ownerCurator . create ( owner2 ) ; createPool ( owner2 , "id123" ) ; java . util . List < org . candlepin . model . Pool > result = poolCurator . getPoolsBySubscriptionId ( null ) . list ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return backingMap . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( result . isEmpty ( ) )
|
consolidate ( ) { org . apache . jackrabbit . oak . api . Root root = session . getLatestRoot ( ) ; org . apache . jackrabbit . oak . api . Tree t = root . getTree ( "/" ) ; org . apache . jackrabbit . oak . api . Tree counter = t . addChild ( "counter" ) ; counter . setProperty ( org . apache . jackrabbit . JcrConstants . JCR_MIXINTYPES , of ( org . apache . jackrabbit . oak . jcr . MIX_ATOMIC_COUNTER ) , org . apache . jackrabbit . oak . jcr . NAMES ) ; root . commit ( ) ; root = session . getLatestRoot ( ) ; counter = root . getTree ( "/counter" ) ; counter . setProperty ( "oak:increment" , 1 ) ; counter . setProperty ( "foo" , "bar" ) ; root . commit ( ) ; for ( int i = 0 ; i < 50 ; i ++ ) { if ( ( org . apache . jackrabbit . oak . jcr . AtomicCounterIT . counterValue ( session , counter . getPath ( ) ) ) != 0 ) { break ; } java . lang . Thread . sleep ( 100 ) ; } "<AssertPlaceHolder>" ; } counterValue ( org . apache . jackrabbit . oak . api . ContentSession , java . lang . String ) { org . apache . jackrabbit . oak . api . Tree counter = s . getLatestRoot ( ) . getTree ( path ) ; if ( counter . hasProperty ( "oak:counter" ) ) { return counter . getProperty ( "oak:counter" ) . getValue ( org . apache . jackrabbit . oak . jcr . LONG ) ; } return 0 ; }
|
org . junit . Assert . assertEquals ( 1 , org . apache . jackrabbit . oak . jcr . AtomicCounterIT . counterValue ( session , counter . getPath ( ) ) )
|
testGetLocalizedStringExactMatchLanguageCountryVariantFrench ( ) { org . pentaho . metadata . model . concept . types . LocalizedString s = new org . pentaho . metadata . model . concept . types . LocalizedString ( ) ; s . setString ( "fr_FR_WIN" , "fr_FR_WIN<sp>value" ) ; s . setString ( "fr_FR" , "fr_FR<sp>value" ) ; s . setString ( "fr" , "fr<sp>value" ) ; s . setString ( LocalizedString . DEFAULT_LOCALE , "default<sp>value" ) ; "<AssertPlaceHolder>" ; } getLocalizedString ( java . lang . String ) { java . lang . String str = getString ( locale ) ; java . lang . String tmpLocale = locale ; while ( ( ( stringIsEmpty ( str ) ) && ( tmpLocale != null ) ) && ( ( tmpLocale . indexOf ( '_' ) ) > 0 ) ) { tmpLocale = tmpLocale . substring ( 0 , tmpLocale . lastIndexOf ( '_' ) ) ; str = getString ( tmpLocale ) ; } if ( ! ( stringIsEmpty ( str ) ) ) { return str ; } else { return getString ( org . pentaho . metadata . model . concept . types . LocalizedString . DEFAULT_LOCALE ) ; } }
|
org . junit . Assert . assertEquals ( "fr_FR_WIN<sp>value" , s . getLocalizedString ( "fr_FR_WIN" ) )
|
testEvaluateTwoIndexDiffVarsDirProd ( ) { final java . lang . String indexSparqlString = "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 0 + ( ( ( ( "SELECT<sp>?pig<sp>?dog<sp>?chicken<sp>" + "{" ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 3 ) + "<sp>?dog<sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?pig<sp>" ) + "}" ) ; final java . lang . String indexSparqlString2 = "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 0 + ( ( ( ( "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 1 + "{" ) + "<sp>?fish<sp><uri:talksTo><sp>?turkey<sp>.<sp>" ) + "<sp>?turkey<sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?ant<sp>" ) + "}" ) ; final java . lang . String queryString = "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 0 + ( ( ( ( ( ( ( "SELECT<sp>?e<sp>?c<sp>?l<sp>?o<sp>?f<sp>?g<sp>" + "{" ) + "<sp>?e<sp>a<sp>?c<sp>.<sp>" ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 2 ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 4 ) + "<sp>?f<sp><uri:talksTo><sp>?g<sp>.<sp>" ) + "}" ) ; final org . eclipse . rdf4j . query . parser . sparql . SPARQLParser sp = new org . eclipse . rdf4j . query . parser . sparql . SPARQLParser ( ) ; final org . eclipse . rdf4j . query . parser . ParsedQuery index1 = sp . parseQuery ( indexSparqlString , null ) ; final org . eclipse . rdf4j . query . parser . ParsedQuery index2 = sp . parseQuery ( indexSparqlString2 , null ) ; final java . util . List < org . apache . rya . indexing . external . tupleSet . ExternalTupleSet > index = com . google . common . collect . Lists . newArrayList ( ) ; final org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ais1 = new org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ( ( ( org . eclipse . rdf4j . query . algebra . Projection ) ( index1 . getTupleExpr ( ) ) ) ) ; final org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ais2 = new org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ( ( ( org . eclipse . rdf4j . query . algebra . Projection ) ( index2 . getTupleExpr ( ) ) ) ) ; index . add ( ais1 ) ; index . add ( ais2 ) ; final org . eclipse . rdf4j . query . parser . ParsedQuery pq = sp . parseQuery ( queryString , null ) ; final org . eclipse . rdf4j . query . algebra . TupleExpr tup = pq . getTupleExpr ( ) . clone ( ) ; provider . setIndices ( index ) ; final org . apache . rya . indexing . pcj . matching . PCJOptimizer pcj = new org . apache . rya . indexing . pcj . matching . PCJOptimizer ( index , false , provider ) ; pcj . optimize ( tup , null , null ) ; final org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator ipv = new org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator ( true ) ; "<AssertPlaceHolder>" ; } isValid ( org . eclipse . rdf4j . query . algebra . TupleExpr ) { org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator . TupleValidateVisitor tv = new org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator . TupleValidateVisitor ( ) ; te . visit ( tv ) ; return tv . isValid ( ) ; }
|
org . junit . Assert . assertEquals ( false , ipv . isValid ( tup ) )
|
testEquals ( ) { java . lang . String str1 = "test" ; java . lang . String str2 = "test" ; int result = org . evosuite . instrumentation . testability . StringHelper . StringEquals ( str1 , str2 ) ; "<AssertPlaceHolder>" ; } StringEquals ( java . lang . String , java . lang . Object ) { if ( first == null ) { throw new java . lang . NullPointerException ( "StringEquals<sp>is<sp>not<sp>supposed<sp>to<sp>work<sp>on<sp>a<sp>null<sp>caller" ) ; } if ( second == null ) { return - ( BooleanHelper . K ) ; } if ( first . equals ( second ) ) { return BooleanHelper . K ; } else { org . evosuite . seeding . ConstantPoolManager . getInstance ( ) . addDynamicConstant ( first ) ; org . evosuite . seeding . ConstantPoolManager . getInstance ( ) . addDynamicConstant ( second ) ; double distance = - ( org . evosuite . instrumentation . testability . StringHelper . getDistanceBasedOnLeftAlignmentCharacterDistance ( first , second . toString ( ) ) ) ; double d2 = distance / ( 1.0 + ( java . lang . Math . abs ( distance ) ) ) ; return ( ( int ) ( java . lang . Math . round ( ( ( BooleanHelper . K ) * d2 ) ) ) ) ; } }
|
org . junit . Assert . assertTrue ( ( result > 0 ) )
|
testEqualsObjectNull ( ) { java . lang . Object obj = null ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . o3project . odenos . remoteobject . event . EventSubscription ) ) { return false ; } org . o3project . odenos . remoteobject . event . EventSubscription eventSubscription = ( ( org . o3project . odenos . remoteobject . event . EventSubscription ) ( obj ) ) ; return this . subscriberId . equals ( eventSubscription . getSubscriberId ( ) ) ; }
|
org . junit . Assert . assertThat ( target . equals ( obj ) , org . hamcrest . CoreMatchers . is ( false ) )
|
merge ( ) { int [ ] a = new int [ ] { 1 , 2 , 3 } ; int [ ] b = new int [ ] { 2 , 3 } ; int [ ] newArray = creatArrayUtil ( ) . merge ( a , b ) ; info ( newArray ) ; "<AssertPlaceHolder>" ; } info ( int [ ] ) { System . out . println ( java . util . Arrays . toString ( array ) ) ; }
|
org . junit . Assert . assertArrayEquals ( new int [ ] { 1 , 2 , 3 } , newArray )
|
shouldFailOnInvalidInput ( ) { java . util . Collection < java . lang . String > expressions = java . util . Arrays . asList ( "2x" , "f(x,)" , "~3" , "" , "*2" , "f(3,<sp>x" ) ; for ( java . lang . String expression : expressions ) { boolean isFailed = false ; try { org . qcri . rheem . core . util . mathex . ExpressionBuilder . parse ( expression ) ; } catch ( org . qcri . rheem . core . util . mathex . exceptions . ParseException e ) { isFailed = true ; } finally { "<AssertPlaceHolder>" ; } } } parse ( java . lang . String ) { org . qcri . rheem . core . mathex . MathExLexer lexer = new org . qcri . rheem . core . mathex . MathExLexer ( new org . qcri . rheem . core . util . mathex . ANTLRInputStream ( specification ) ) ; lexer . removeErrorListeners ( ) ; lexer . addErrorListener ( new org . qcri . rheem . core . util . mathex . BaseErrorListener ( ) { @ org . qcri . rheem . core . util . mathex . Override public void syntaxError ( org . qcri . rheem . core . util . mathex . Recognizer < ? , ? > recognizer , java . lang . Object offendingSymbol , int line , int charPositionInLine , java . lang . String msg , org . qcri . rheem . core . util . mathex . RecognitionException e ) { throw new org . qcri . rheem . core . util . mathex . exceptions . ParseException ( "Syntax<sp>error." , e ) ; } } ) ; org . qcri . rheem . core . mathex . MathExParser parser = new org . qcri . rheem . core . mathex . MathExParser ( new org . qcri . rheem . core . util . mathex . CommonTokenStream ( lexer ) ) ; parser . removeErrorListeners ( ) ; parser . addErrorListener ( new org . qcri . rheem . core . util . mathex . BaseErrorListener ( ) { @ org . qcri . rheem . core . util . mathex . Override public void syntaxError ( org . qcri . rheem . core . util . mathex . Recognizer < ? , ? > recognizer , java . lang . Object o , int i , int i1 , java . lang . String s , org . qcri . rheem . core . util . mathex . RecognitionException e ) { throw new org . qcri . rheem . core . util . mathex . exceptions . ParseException ( "Syntax<sp>error." , e ) ; } } ) ; org . qcri . rheem . core . mathex . MathExParser . ExpressionContext expressionContext = parser . expression ( ) ; return new org . qcri . rheem . core . util . mathex . ExpressionBuilder ( ) . visit ( expressionContext ) ; }
|
org . junit . Assert . assertTrue ( isFailed )
|
testUploadJar ( ) { java . util . Map < java . lang . String , java . lang . String > config = new java . util . HashMap ( ) ; config . put ( HdfsFileStorage . CONFIG_FSURL , "file:///" ) ; fileStorage . init ( config ) ; java . io . File file = java . io . File . createTempFile ( "test" , ".tmp" ) ; file . deleteOnExit ( ) ; java . util . List < java . lang . String > lines = java . util . Arrays . asList ( "test-line-1" , "test-line-2" ) ; java . nio . file . Files . write ( file . toPath ( ) , lines , java . nio . charset . Charset . forName ( "UTF-8" ) ) ; java . lang . String jarFileName = "test.jar" ; fileStorage . delete ( jarFileName ) ; fileStorage . upload ( new java . io . FileInputStream ( file ) , jarFileName ) ; java . io . InputStream inputStream = fileStorage . download ( jarFileName ) ; java . util . List < java . lang . String > actual = org . apache . commons . io . IOUtils . readLines ( inputStream ) ; "<AssertPlaceHolder>" ; } download ( java . lang . String ) { org . apache . hadoop . fs . Path filePath = new org . apache . hadoop . fs . Path ( directory , name ) ; return hdfsFileSystem . open ( filePath ) ; }
|
org . junit . Assert . assertEquals ( lines , actual )
|
letsMockListSize ( ) { java . util . List list = mock ( java . util . List . class ) ; when ( list . size ( ) ) . thenReturn ( 10 ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 10 , list . size ( ) )
|
testGetConnectionProperties ( ) { org . talend . components . marklogic . tmarklogicconnection . MarkLogicConnectionProperties connectionProperties = new org . talend . components . marklogic . tmarklogicconnection . MarkLogicConnectionProperties ( "connectionProperties" ) ; connectionProperties . init ( ) ; testOutputProperties . init ( ) ; testOutputProperties . connection . referencedComponent . setReference ( connectionProperties ) ; "<AssertPlaceHolder>" ; } getConnectionProperties ( ) { return connection . getEffectiveConnectionProperties ( ) ; }
|
org . junit . Assert . assertEquals ( connectionProperties , testOutputProperties . getConnectionProperties ( ) )
|
shouldHashSha512 ( ) { java . lang . String [ ] correctHashes = new java . lang . String [ ] { "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" , "b109f3bbbc244eb82441917ed06d618b9008dd09b3befd1b5e07394c706a8bb980b1d7785e5976ec049b46df5f1326af5a2ea6d103fd07c95385ffab0cacbc86" , "ae9942149995a8171391625b36da134d5e288c721650d7c8d2d464fb49a49f3f551e4916ab1e097d9dd1201b01d69b1dccdefa3d2524a66092fb61b3df6e7e71" , "8c4f3df78db191142d819a72c16058b9e1ea41ae9b1649e1184eb89e30344c51c9c71039c483cf2f1b76b51480d8459d7eb3cfbaa24b07f2041d1551af4ead75" } ; java . util . List < java . lang . String > result = new java . util . ArrayList ( ) ; for ( java . lang . String password : fr . xephi . authme . security . HashUtilsTest . GIVEN_PASSWORDS ) { result . add ( fr . xephi . authme . security . HashUtils . sha512 ( password ) ) ; } "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { return ( getObject ( path ) ) != null ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . contains ( correctHashes ) )
|
testEqualPredicate ( ) { com . feilong . store . member . User user = new com . feilong . store . member . User ( 2L ) ; org . apache . commons . collections4 . Predicate < com . feilong . store . member . User > equalPredicate = com . feilong . core . util . predicate . BeanPredicateUtil . equalPredicate ( "id" , 2L ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . reflect . Field ) { int modifiers = field . getModifiers ( ) ; boolean isStatic = java . lang . reflect . Modifier . isStatic ( modifiers ) ; java . lang . String pattern = "[{}.{}],modifiers:[{}]{}" ; com . feilong . core . lang . reflect . FieldUtil . LOGGER . trace ( pattern , klass . getSimpleName ( ) , field . getName ( ) , modifiers , ( isStatic ? "<sp>[isStatic]" : org . apache . commons . lang3 . StringUtils . EMPTY ) ) ; return isStatic ; }
|
org . junit . Assert . assertEquals ( true , equalPredicate . evaluate ( user ) )
|
testEqualsForNotEqualityOfPrimitiveArrays ( ) { double [ ] a1 = new double [ ] { 1.0 , 2.0 , 3.0 , 4.0 } ; double [ ] a2 = new double [ ] { 4.0 , 3.0 , 2.0 , 1.0 } ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object , java . lang . Object ) { if ( ( array1 == null ) || ( array2 == null ) ) { return false ; } if ( ( ! ( array1 . getClass ( ) . isArray ( ) ) ) || ( ! ( array2 . getClass ( ) . isArray ( ) ) ) ) { return false ; } if ( array1 == array2 ) { return true ; } int len = java . lang . reflect . Array . getLength ( array1 ) ; if ( len != ( java . lang . reflect . Array . getLength ( array2 ) ) ) { return false ; } for ( int i = 0 ; i < len ; i ++ ) { java . lang . Object value1 = java . lang . reflect . Array . get ( array1 , i ) ; java . lang . Object value2 = java . lang . reflect . Array . get ( array2 , i ) ; if ( value1 == null ) { if ( value2 != null ) { return false ; } continue ; } else if ( value2 == null ) { return false ; } if ( value1 . getClass ( ) . isArray ( ) ) { if ( ! ( cz . zcu . kiv . jop . util . ArrayUtils . equals ( value1 , value2 ) ) ) { return false ; } continue ; } if ( ! ( value1 . equals ( value2 ) ) ) { return false ; } } return true ; }
|
org . junit . Assert . assertFalse ( cz . zcu . kiv . jop . util . ArrayUtils . equals ( a1 , a2 ) )
|
shouldRejectHostMachines ( ) { cluster . setNumberOfHostMachines ( 2 ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = cTest . validate ( cluster , org . openstack . atlas . api . mgmt . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ! ( result . passedValidation ( ) ) ) { java . util . List < org . openstack . atlas . api . validation . results . ExpectationResult > ers = result . getValidationResults ( ) ; sb . append ( java . lang . String . format ( "ON<sp>%s<sp>result.withMessage([" , ctx . toString ( ) ) ) ; for ( org . openstack . atlas . api . validation . results . ExpectationResult er : ers ) { sb . append ( java . lang . String . format ( "%s" , er . getMessage ( ) ) ) ; sb . append ( "])" ) ; } } else { sb . append ( java . lang . String . format ( "On<sp>%s<sp>All<sp>Expectations<sp>PASSED\n" , ctx . toString ( ) ) ) ; } return sb . toString ( ) ; }
|
org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . mgmt . validation . validators . PUT ) , result . passedValidation ( ) )
|
isValidConfiguration3 ( ) { final de . ovgu . featureide . fm . core . configuration . Configuration c = new de . ovgu . featureide . fm . core . configuration . Configuration ( FM_test_1 , true ) ; c . setManual ( "C#" , Selection . SELECTED ) ; c . setManual ( "Python<sp>Ruby" , Selection . SELECTED ) ; c . setManual ( "Bash<sp>script<sp>" , Selection . SELECTED ) ; c . setManual ( "C++" , Selection . SELECTED ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return new de . ovgu . featureide . fm . core . configuration . ConfigurationPropagator . IsValidMethod ( true , true ) ; }
|
org . junit . Assert . assertTrue ( c . isValid ( ) )
|
testEncodeHDFSRare ( ) { System . out . println ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[NGSICharsets.encodeHDFS]" ) ) + "--------<sp>Rare<sp>characters<sp>are<sp>not<sp>encoded" ) ) ; java . lang . String in = "ÁÉÍÓÚáéíóúÑñÇç!\"#$%&\'()*+,.-_:;<>?@[\\]^`{|}~" ; java . lang . String expected = "ÁÉÍÓÚáéíóúÑñÇç!\"#$%&\'()*+,.-_:;<>?@[\\]^`{|}~" ; java . lang . String out = com . telefonica . iot . cygnus . utils . NGSICharsets . encodeHDFS ( in , false ) ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[NGSICharsets.encodeHDFS]" ) ) + "-<sp>OK<sp>-<sp>'" ) + in ) + "'<sp>has<sp>not<sp>been<sp>encoded" ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( ( ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[NGSICharsets.encodeHDFS]" ) ) + "-<sp>FAIL<sp>-<sp>'" ) + in ) + "'<sp>has<sp>been<sp>encoded<sp>as<sp>'" ) + out ) + "'" ) ) ; throw e ; } encodeHDFS ( java . lang . String , boolean ) { java . lang . String out = "" ; for ( int i = 0 ; i < ( in . length ( ) ) ; i ++ ) { char c = in . charAt ( i ) ; if ( c == '/' ) { if ( allowSlashes ) { out += '/' ; } else { out += "x002f" ; } } else if ( c == 'x' ) { java . lang . String next4 ; if ( ( i + 4 ) < ( in . length ( ) ) ) { next4 = in . substring ( ( i + 1 ) , ( i + 5 ) ) ; } else { next4 = "WXYZ" ; } if ( next4 . matches ( "^[0-9a-fA-F]{4}$" ) ) { out += "xx" ; } else { out += c ; } } else if ( c == '=' ) { out += "xffff" ; } else { out += c ; } } return out ; }
|
org . junit . Assert . assertEquals ( expected , out )
|
testSerialization ( ) { org . jfree . chart . axis . DateTick t1 = new org . jfree . chart . axis . DateTick ( new java . util . Date ( 0L ) , "Label" , org . jfree . chart . ui . TextAnchor . CENTER , org . jfree . chart . ui . TextAnchor . CENTER , 10.0 ) ; org . jfree . chart . axis . DateTick t2 = ( ( org . jfree . chart . axis . DateTick ) ( org . jfree . chart . TestUtils . serialised ( t1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( t1 , t2 )
|
execute_noMarketplace ( ) { given ( "user1" , UserRoleType . ORGANIZATION_ADMIN ) ; handler . payload . setMarketplaceId ( null ) ; handler . execute ( ) ; org . oscm . taskhandling . operations . Report report = handler . report ; "<AssertPlaceHolder>" ; } buildMailType ( ) { if ( ( failures ) == 0 ) { return org . oscm . types . enumtypes . EmailType . BULK_USER_IMPORT_SUCCESS ; } return org . oscm . types . enumtypes . EmailType . BULK_USER_IMPORT_SOME_ERRORS ; }
|
org . junit . Assert . assertEquals ( EmailType . BULK_USER_IMPORT_SUCCESS , report . buildMailType ( ) )
|
testAuditingOverTransaction ( ) { try { org . jboss . as . test . integration . jpa . transaction . envers . SFSB1 sfsb1 = lookup ( "SFSB1" , org . jboss . as . test . integration . jpa . transaction . envers . SFSB1 . class ) ; org . jboss . as . test . integration . jpa . transaction . envers . Employee emp = sfsb1 . createEmployeeTx ( "Madhumita" , "1<sp>home<sp>street" , 1 ) ; sfsb1 . updateEmployeeTx ( "40<sp>Patrice<sp>Lumumby" , emp ) ; sfsb1 . updateEmployeeTx ( "40<sp>Patrice<sp>Lumumby<sp>Ostrava<sp>CZ" , emp ) ; java . lang . String address = sfsb1 . retrieveOldEmployeeVersion ( emp . getId ( ) ) ; "<AssertPlaceHolder>" ; } catch ( javax . persistence . TransactionRequiredException e ) { System . out . println ( "TransactionRequiredException<sp>in<sp>catch:--" ) ; } catch ( java . lang . Exception failed ) { System . out . println ( "Exception<sp>in<sp>catch:--" ) ; } } getId ( ) { return id ; }
|
org . junit . Assert . assertEquals ( "1<sp>home<sp>street" , address )
|
mockGenericClassHavingTypeArgumentOfArrayTypeWith2DPrimitiveComponent ( mockit . GenericMockedTypesTest$GenericBase ) { int [ ] [ ] result = mock . doSomething ( ) ; "<AssertPlaceHolder>" ; } doSomething ( ) { return 1 ; }
|
org . junit . Assert . assertEquals ( 0 , result . length )
|
useGzipFalse_WhenCrc32IsValid ( ) { stubFor ( post ( urlEqualTo ( software . amazon . awssdk . protocol . tests . crc32 . RestJsonCrc32ChecksumTests . RESOURCE_PATH ) ) . willReturn ( aResponse ( ) . withStatus ( 200 ) . withHeader ( "x-amz-crc32" , software . amazon . awssdk . protocol . tests . crc32 . RestJsonCrc32ChecksumTests . JSON_BODY_Crc32_CHECKSUM ) . withBody ( software . amazon . awssdk . protocol . tests . crc32 . RestJsonCrc32ChecksumTests . JSON_BODY ) ) ) ; software . amazon . awssdk . services . protocolrestjson . ProtocolRestJsonClient client = software . amazon . awssdk . services . protocolrestjson . ProtocolRestJsonClient . builder ( ) . credentialsProvider ( software . amazon . awssdk . protocol . tests . crc32 . RestJsonCrc32ChecksumTests . FAKE_CREDENTIALS_PROVIDER ) . region ( Region . US_EAST_1 ) . endpointOverride ( java . net . URI . create ( ( "http://localhost:" + ( mockServer . port ( ) ) ) ) ) . build ( ) ; software . amazon . awssdk . services . protocolrestjson . model . AllTypesResponse result = client . allTypes ( software . amazon . awssdk . services . protocolrestjson . model . AllTypesRequest . builder ( ) . build ( ) ) ; "<AssertPlaceHolder>" ; } stringMember ( ) { return stringMember ; }
|
org . junit . Assert . assertEquals ( "foo" , result . stringMember ( ) )
|
testTrimNewlineInSubtemplates ( ) { org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroup ( ) ; group . defineTemplate ( "test" , "names" , ( "<names:{n<sp>|\n" + "<n>}>!" ) ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "test" ) ; st . add ( "names" , "Ter" ) ; st . add ( "names" , "Tom" ) ; st . add ( "names" , "Sumana" ) ; java . lang . String expected = "TerTomSumana!" ; java . lang . String result = st . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
G_modelExists_W_getModel_T_verifyModel ( ) { when ( mockConnection . getResponseCode ( ) ) . thenReturn ( 200 ) ; when ( mockConnection . getInputStream ( ) ) . thenReturn ( this . getClass ( ) . getResourceAsStream ( "/get_model.json" ) ) ; final com . codepine . api . testrail . RequestTest . Model actualModel = models . get ( ) . execute ( ) ; final com . codepine . api . testrail . RequestTest . Model expectedModel = new com . codepine . api . testrail . RequestTest . Model ( ) . setId ( 1 ) . setName ( "Test<sp>Model<sp>1" ) . setShowAnnouncement ( false ) . setIsCompleted ( true ) . setCompletedOn ( new java . util . Date ( 1424641170000L ) ) . setSuiteMode ( 2 ) ; "<AssertPlaceHolder>" ; } execute ( ) { try { java . lang . String url = getUrl ( ) ; java . net . HttpURLConnection con = ( ( java . net . HttpURLConnection ) ( urlConnectionFactory . getUrlConnection ( url ) ) ) ; con . setRequestMethod ( method . name ( ) ) ; if ( config . getApplicationName ( ) . isPresent ( ) ) { con . setRequestProperty ( "User-Agent" , config . getApplicationName ( ) . get ( ) ) ; } con . setRequestProperty ( "Content-Type" , "application/json" ) ; java . lang . String basicAuth = "Basic<sp>" + ( javax . xml . bind . DatatypeConverter . printBase64Binary ( ( ( ( config . getUsername ( ) ) + ":" ) + ( config . getPassword ( ) ) ) . getBytes ( java . nio . charset . Charset . forName ( "UTF-8" ) ) ) ) ; con . setRequestProperty ( "Authorization" , basicAuth ) ; if ( ( method ) == ( com . codepine . api . testrail . Request . Method . POST ) ) { con . setDoOutput ( true ) ; java . lang . Object content = getContent ( ) ; if ( content != null ) { try ( java . io . OutputStream outputStream = new java . io . BufferedOutputStream ( con . getOutputStream ( ) ) ) { com . codepine . api . testrail . Request . JSON . writerWithView ( this . getClass ( ) ) . writeValue ( outputStream , content ) ; } } else { con . setFixedLengthStreamingMode ( 0 ) ; } } log . debug ( ( ( ( "Sending<sp>" + ( method ) ) + "<sp>request<sp>to<sp>URL<sp>:<sp>" ) + url ) ) ; int responseCode = 0 ; try { responseCode = con . getResponseCode ( ) ; } catch ( java . io . IOException e ) { responseCode = con . getResponseCode ( ) ; } log . debug ( ( "Sending<sp>" 0 + responseCode ) ) ; if ( responseCode != ( java . net . HttpURLConnection . HTTP_OK ) ) { try ( java . io . InputStream errorStream = con . getErrorStream ( ) ) { com . codepine . api . testrail . TestRailException . Builder exceptionBuilder = new com . codepine . api . testrail . TestRailException . Builder ( ) . setResponseCode ( responseCode ) ; if ( errorStream == null ) { throw exceptionBuilder . setError ( "<server<sp>did<sp>not<sp>send<sp>any<sp>error<sp>message>" ) . build ( ) ; } throw com . codepine . api . testrail . Request . JSON . readerForUpdating ( exceptionBuilder ) . < com . codepine . api . testrail . TestRailException . Builder > readValue ( new java . io . BufferedInputStream ( errorStream ) ) . build ( ) ; } } try ( java . io . InputStream responseStream = new java . io . BufferedInputStream ( con . getInputStream ( ) ) ) { java . lang . Object supplementForDeserialization = getSupplementForDeserialization ( ) ; if ( ( responseClass ) != null ) { if ( ( responseClass ) == ( java . lang . Void . class ) ) { return null ; } if ( supplementForDeserialization != null ) { return com . codepine . api . testrail . Request . JSON . reader ( responseClass ) . with ( new com . fasterxml . jackson . databind . InjectableValues . Std ( ) . addValue ( responseClass . toString ( ) , supplementForDeserialization ) ) . readValue ( responseStream ) ; } return com . codepine . api . testrail . Request . JSON . readValue ( responseStream , responseClass ) ; } else { if ( supplementForDeserialization != null ) { java . lang . String supplementKey = responseType . getType ( ) . toString ( ) ; if ( ( responseType . getType ( ) ) instanceof java . lang . reflect . ParameterizedType ) { java . lang . reflect . Type [ ] actualTypes = ( ( java . lang . reflect . ParameterizedType ) ( responseType . getType ( ) ) ) . getActualTypeArguments ( ) ; if ( ( ( actualTypes . length ) == 1 ) && ( ( actualTypes [ 0 ] ) instanceof java . lang . Class < ? > ) ) { supplementKey = actualTypes [ 0 ] . toString ( ) ; } } return com . codepine . api . testrail . Request . JSON . reader ( responseType ) . with ( new com . fasterxml . jackson . databind . InjectableValues . Std ( ) . addValue ( supplementKey , supplementForDeserialization ) ) . readValue ( responseStream ) ; } return com . codepine . api . testrail . Request . JSON . readValue ( responseStream , responseType ) ; } } } catch ( java . net . MalformedURLException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } }
|
org . junit . Assert . assertEquals ( expectedModel , actualModel )
|
test_boolByURL ( ) { java . lang . String response = sendGetRequest ( "/call/test/test_bool?p=true" , 200 ) ; com . eclipsesource . json . JsonValue result = getValueFromResponse ( response ) ; boolean value = result . asBoolean ( ) ; "<AssertPlaceHolder>" ; } getValueFromResponse ( java . lang . String ) { com . eclipsesource . json . JsonValue value = com . eclipsesource . json . Json . parse ( response ) ; com . eclipsesource . json . JsonObject valueObject = value . asObject ( ) ; com . eclipsesource . json . JsonValue result = valueObject . get ( "result" ) ; return result ; }
|
org . junit . Assert . assertTrue ( value )
|
testFKWithNIS ( ) { java . lang . String ddl = "CREATE<sp>FOREIGN<sp>TABLE<sp>\"Table\"<sp>(" + ( ( ( ( "<sp>Column2<sp>char(1)," 0 + "\n\tColumn2<sp>char(1)," ) + "\n\tCONSTRAINT<sp>PrimaryKey<sp>PRIMARY<sp>KEY(Column1)<sp>OPTIONS(NAMEINSOURCE<sp>\'pkNameInSource\')," ) + "<sp>Column2<sp>char(1)," 1 ) + "\n)<sp>OPTIONS(NAMEINSOURCE<sp>\'TableSource\',<sp>UPDATABLE<sp>\'TRUE\',<sp>CARDINALITY<sp>\'120\');" ) ; java . lang . String expectedDdl = "CREATE<sp>FOREIGN<sp>TABLE<sp>\"Table\"<sp>(" + ( ( ( ( "Column1<sp>biginteger(1234)<sp>NOT<sp>NULL<sp>OPTIONS(NAMEINSOURCE<sp>'ColumnSource',<sp>NATIVE_TYPE<sp>'NativetypeColumn')," + "<sp>Column2<sp>char(1)," ) + "<sp>CONSTRAINT<sp>PrimaryKey<sp>PRIMARY<sp>KEY(Column1)<sp>OPTIONS(NAMEINSOURCE<sp>'pkNameInSource')," ) + "<sp>CONSTRAINT<sp>UniqueConstrain<sp>UNIQUE(Column2)<sp>OPTIONS(NAMEINSOURCE<sp>'ucNameInSource')" ) + ")<sp>OPTIONS(NAMEINSOURCE<sp>'TableSource',<sp>UPDATABLE<sp>'TRUE',<sp>CARDINALITY<sp>'120');" ) ; java . lang . String generatedDdl = roundTrip ( ddl , false ) ; "<AssertPlaceHolder>" ; } roundTrip ( java . lang . String , boolean ) { org . teiid . designer . core . workspace . ModelResource modelResource = createModelResource ( ddl , isVirtual ) ; java . lang . String generatedDdl = generator . generate ( modelResource ) ; generatedDdl = removeWhitespace ( generatedDdl ) ; return generatedDdl ; }
|
org . junit . Assert . assertEquals ( expectedDdl , generatedDdl )
|
byteArrayTest ( ) { byte [ ] array = new byte [ ] { 1 , 2 , 5 , 6 , 8 , 9 } ; com . jfireframework . licp . Licp lbse = new com . jfireframework . licp . Licp ( ) ; lbse . serialize ( array , buf . clear ( ) ) ; byte [ ] result = ( ( byte [ ] ) ( lbse . deserialize ( buf ) ) ) ; for ( int i = 0 ; i < ( array . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } deserialize ( java . nio . ByteBuffer ) { collect . clear ( ) ; register . clear ( ) ; if ( ( buffer . get ( ) ) != ( com . jfireframework . licp . Licp . version ) ) { throw new com . jfireframework . baseutil . exception . UnSupportException ( "licp" ) ; } return ( ( T ) ( _deserialize ( buffer ) ) ) ; }
|
org . junit . Assert . assertEquals ( array [ i ] , result [ i ] )
|
testLexSortedSet ( ) { org . redisson . api . RLexSortedSet set = redisson . getLexSortedSet ( "simple" ) ; set . add ( "a" ) ; set . add ( "b" ) ; set . add ( "c" ) ; set . add ( "d" ) ; set . add ( "e" ) ; java . util . Collection < java . lang . String > r = set . range ( "b" , true , "e" , false , 1 , 2 ) ; java . lang . String [ ] a = r . toArray ( new java . lang . String [ 0 ] ) ; "<AssertPlaceHolder>" ; } toArray ( T [ ] ) { throw new java . lang . UnsupportedOperationException ( ) ; }
|
org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "c" , "d" } , a )
|
buildError ( ) { final io . vertx . up . exception . WebException error = new io . vertx . up . exception . _500InternalServerException ( this . getClass ( ) , "Error<sp>Internal" ) ; System . out . println ( error ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( error )
|
testScalarAdd ( ) { org . apache . commons . math3 . complex . Complex x = new org . apache . commons . math3 . complex . Complex ( 3.0 , 4.0 ) ; double yDouble = 2.0 ; org . apache . commons . math3 . complex . Complex yComplex = new org . apache . commons . math3 . complex . Complex ( yDouble ) ; "<AssertPlaceHolder>" ; } add ( org . jfree . chart . axis . TickUnit ) { if ( unit == null ) { throw new java . lang . NullPointerException ( "Null<sp>'unit'<sp>argument." ) ; } this . tickUnits . add ( unit ) ; java . util . Collections . sort ( this . tickUnits ) ; }
|
org . junit . Assert . assertEquals ( x . add ( yComplex ) , x . add ( yDouble ) )
|
closeDialogViaConnection ( ) { org . geotools . swing . dialog . JTextReporter . Connection conn = showDialog ( org . geotools . swing . dialog . JTextReporterTest . TITLE ) . get ( ) ; conn . closeDialog ( ) ; windowFixture . robot ( ) . waitForIdle ( ) ; windowFixture . requireNotVisible ( ) ; "<AssertPlaceHolder>" ; } isOpen ( ) { updateLock . readLock ( ) . lock ( ) ; try { return active . get ( ) ; } finally { updateLock . readLock ( ) . unlock ( ) ; } }
|
org . junit . Assert . assertFalse ( conn . isOpen ( ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.