input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testBugRegistration ( ) { org . openqa . grid . internal . Registry registry = org . openqa . grid . internal . Registry . newInstance ( ) ; registry . add ( new org . openqa . grid . internal . listener . RegistrationListenerTest . MyBuggyRemoteProxy ( org . openqa . grid . internal . listener . RegistrationListenerTest . req , registry ) ) ; registry . add ( new org . openqa . grid . internal . listener . RegistrationListenerTest . MyBuggyRemoteProxy ( org . openqa . grid . internal . listener . RegistrationListenerTest . req , registry ) ) ; "<AssertPlaceHolder>" ; } getAllProxies ( ) { return proxies ; }
org . junit . Assert . assertEquals ( registry . getAllProxies ( ) . size ( ) , 1 )
testMaakKopieMetDefaultGroep80Fout2 ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3InschrijvingInhoud groep80Gevuld = new nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3InschrijvingInhoud ( null , null , null , null , null , null , null , null , new nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3Integer ( 1 ) , null , null ) ; "<AssertPlaceHolder>" ; } maakKopieMetDefaultGroep80 ( ) { if ( ! ( isGroep80Leeg ( ) ) ) { throw new java . lang . IllegalStateException ( "Groep<sp>80<sp>is<sp>niet<sp>leeg." ) ; } return new nl . moderniseringgba . migratie . conversie . model . lo3 . categorie . Lo3InschrijvingInhoud ( datumIngangBlokkering , datumOpschortingBijhouding , redenOpschortingBijhoudingCode , datumEersteInschrijving , gemeentePKCode , indicatieGeheimCode , nl . moderniseringgba . migratie . conversie . model . lo3 . categorie . Lo3InschrijvingInhoud . DEFAULT_VERSIENUMMER , nl . moderniseringgba . migratie . conversie . model . lo3 . categorie . Lo3InschrijvingInhoud . DEFAULT_DATUMTIJDSTEMPEL , indicatiePKVolledigGeconverteerdCode ) ; }
org . junit . Assert . assertNotNull ( groep80Gevuld . maakKopieMetDefaultGroep80 ( ) )
testINDArrayIndexingLessThanRankSimple ( ) { org . nd4j . linalg . api . ndarray . INDArray x = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 6 , 6 , DataType . DOUBLE ) . reshape ( 'c' , 3 , 2 ) . castTo ( DataType . DOUBLE ) ; org . nd4j . linalg . api . ndarray . INDArray indexes = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 0 } } ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 } ) ; org . nd4j . linalg . api . ndarray . INDArray getTest = x . get ( indexes ) ; "<AssertPlaceHolder>" ; } get ( int ) { return list . get ( i ) ; }
org . junit . Assert . assertEquals ( assertion , getTest )
testMetricsReporterAutoGeneratedClientId ( ) { java . util . Properties props = new java . util . Properties ( ) ; props . setProperty ( ProducerConfig . BOOTSTRAP_SERVERS_CONFIG , "localhost:9999" ) ; props . setProperty ( ProducerConfig . METRIC_REPORTER_CLASSES_CONFIG , org . apache . kafka . test . MockMetricsReporter . class . getName ( ) ) ; org . apache . kafka . clients . producer . KafkaProducer < java . lang . String , java . lang . String > producer = new org . apache . kafka . clients . producer . KafkaProducer ( props , new org . apache . kafka . common . serialization . StringSerializer ( ) , new org . apache . kafka . common . serialization . StringSerializer ( ) ) ; org . apache . kafka . test . MockMetricsReporter mockMetricsReporter = ( ( org . apache . kafka . test . MockMetricsReporter ) ( producer . metrics . reporters ( ) . get ( 0 ) ) ) ; "<AssertPlaceHolder>" ; producer . close ( ) ; } getClientId ( ) { return clientId ; }
org . junit . Assert . assertEquals ( producer . getClientId ( ) , mockMetricsReporter . clientId )
testProcess_file_not_found ( ) { System . out . println ( "file_not_found" ) ; kg . apc . jmeter . modifiers . RawRequestSourcePreProcessor instance = new kg . apc . jmeter . modifiers . RawRequestSourcePreProcessor ( ) ; instance . setFileName ( "/nofilefortest" ) ; instance . process ( ) ; java . lang . String result = org . apache . jmeter . threads . JMeterContextService . getContext ( ) . getVariables ( ) . get ( instance . getVarName ( ) ) ; "<AssertPlaceHolder>" ; } getVarName ( ) { return getPropertyAsString ( kg . apc . jmeter . modifiers . FifoPopPreProcessor . variableName ) ; }
org . junit . Assert . assertNull ( result )
testDefaultInstanceReference ( ) { final org . opendaylight . protocol . concepts . DefaultInstanceReference < org . opendaylight . yang . gen . v1 . urn . tbd . params . xml . ns . yang . network . topology . rev131021 . NetworkTopology > defaultIID = new org . opendaylight . protocol . concepts . DefaultInstanceReference ( org . opendaylight . protocol . concepts . DefaultInstanceReferenceTest . IID ) ; "<AssertPlaceHolder>" ; } getInstanceIdentifier ( ) { return this . instanceIdentifier ; }
org . junit . Assert . assertEquals ( org . opendaylight . protocol . concepts . DefaultInstanceReferenceTest . IID , defaultIID . getInstanceIdentifier ( ) )
shouldBuildBinaries ( ) { de . slackspace . openkeepass . domain . Binary binaryOne = createBinary ( 3 , true ) ; de . slackspace . openkeepass . domain . Binary binaryTwo = createBinary ( 4 , false ) ; de . slackspace . openkeepass . domain . Binaries binaries = new de . slackspace . openkeepass . domain . BinariesBuilder ( ) . addBinary ( binaryOne ) . addBinary ( binaryTwo ) . build ( ) ; "<AssertPlaceHolder>" ; } getBinaries ( ) { return binaries ; }
org . junit . Assert . assertThat ( binaries . getBinaries ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
testGetScenarioProtect ( ) { org . apache . poi . xssf . usermodel . XSSFWorkbook workbook = new org . apache . poi . xssf . usermodel . XSSFWorkbook ( ) ; org . apache . poi . xssf . usermodel . XSSFDialogsheet sheet = workbook . createDialogsheet ( "Dialogsheet<sp>1" , null ) ; "<AssertPlaceHolder>" ; workbook . close ( ) ; } getScenarioProtect ( ) { return ( worksheet . isSetSheetProtection ( ) ) && ( worksheet . getSheetProtection ( ) . getScenarios ( ) ) ; }
org . junit . Assert . assertFalse ( sheet . getScenarioProtect ( ) )
test_extraWeeksLeap_getMonthFromElapsedWeekspublic ( org . threeten . extra . chrono . AccountingYearDivision , int [ ] , int ) { int elapsedWeeks = 1 ; for ( int month = 1 ; month <= ( weeksInMonth . length ) ; month ++ ) { elapsedWeeks += weeksInMonth [ ( month - 1 ) ] ; } "<AssertPlaceHolder>" ; division . getMonthFromElapsedWeeks ( ( elapsedWeeks + 1 ) , leapWeekInMonth ) ; } getMonthFromElapsedWeeks ( int , int ) { if ( ( weeksElapsed < 0 ) || ( weeksElapsed >= ( leapWeekInMonth == 0 ? 52 : 53 ) ) ) { throw new java . time . DateTimeException ( ( ( ( ( ( "Count<sp>of<sp>'" + ( elapsedWeeks . length ) ) + "'<sp>elapsed<sp>weeks<sp>not<sp>valid," ) + "<sp>should<sp>be<sp>in<sp>the<sp>range<sp>[0,<sp>" ) + ( leapWeekInMonth == 0 ? 52 : 53 ) ) + ")" ) ) ; } leapWeekInMonth = ( leapWeekInMonth == 0 ) ? 0 : monthsInYearRange . checkValidIntValue ( leapWeekInMonth , ChronoField . MONTH_OF_YEAR ) ; int month = java . util . Arrays . binarySearch ( elapsedWeeks , weeksElapsed ) ; month = ( month >= 0 ) ? month + 1 : ( 0 - month ) - 1 ; return ( ( leapWeekInMonth == 0 ) || ( month <= leapWeekInMonth ) ) || ( weeksElapsed > ( elapsedWeeks [ ( month - 1 ) ] ) ) ? month : month - 1 ; }
org . junit . Assert . assertEquals ( weeksInMonth . length , division . getMonthFromElapsedWeeks ( elapsedWeeks , leapWeekInMonth ) )
testGetIncrementer_BadSequence ( ) { javax . sql . DataSource dataSource = org . kuali . rice . test . TestHarnessServiceLocator . getDataSource ( ) ; org . springframework . jdbc . support . incrementer . DataFieldMaxValueIncrementer incrementer = org . kuali . rice . krad . data . platform . MaxValueIncrementerFactory . getIncrementer ( dataSource , "OH_NO_YOU_DIDNT!" ) ; "<AssertPlaceHolder>" ; incrementer . nextLongValue ( ) ; } getIncrementer ( javax . sql . DataSource , java . lang . String ) { if ( dataSource == null ) { throw new java . lang . IllegalArgumentException ( "DataSource<sp>must<sp>not<sp>be<sp>null" ) ; } if ( org . apache . commons . lang . StringUtils . isBlank ( incrementerName ) ) { throw new java . lang . IllegalArgumentException ( "Incrementer<sp>name<sp>must<sp>not<sp>be<sp>null<sp>or<sp>blank" ) ; } java . util . concurrent . ConcurrentMap < java . lang . String , org . springframework . jdbc . support . incrementer . DataFieldMaxValueIncrementer > incrementerCache = org . kuali . rice . krad . data . platform . MaxValueIncrementerFactory . cache . get ( dataSource ) ; if ( incrementerCache == null ) { org . kuali . rice . krad . data . platform . MaxValueIncrementerFactory . cache . put ( dataSource , new java . util . concurrent . ConcurrentHashMap < java . lang . String , org . springframework . jdbc . support . incrementer . DataFieldMaxValueIncrementer > ( 8 , 0.9F , 1 ) ) ; if ( incrementerCache == null ) { incrementerCache = org . kuali . rice . krad . data . platform . MaxValueIncrementerFactory . cache . get ( dataSource ) ; } } org . springframework . jdbc . support . incrementer . DataFieldMaxValueIncrementer incrementer = incrementerCache . get ( incrementerName . toUpperCase ( ) ) ; if ( incrementer == null ) { incrementer = incrementerCache . putIfAbsent ( incrementerName . toUpperCase ( ) , org . kuali . rice . krad . data . platform . MaxValueIncrementerFactory . createIncrementer ( dataSource , incrementerName ) ) ; if ( incrementer == null ) { incrementer = incrementerCache . get ( incrementerName . toUpperCase ( ) ) ; } } return incrementer ; }
org . junit . Assert . assertNotNull ( incrementer )
testFileSystemMatch ( ) { org . pentaho . hadoop . shim . spi . HadoopConfigurationProvider provider = mock ( org . pentaho . hadoop . shim . spi . HadoopConfigurationProvider . class ) ; org . pentaho . hadoop . shim . HadoopConfiguration hadoopConfig = mock ( org . pentaho . hadoop . shim . HadoopConfiguration . class ) ; org . pentaho . hadoop . shim . spi . HadoopShim hadoopShim = mock ( org . pentaho . hadoop . shim . spi . HadoopShim . class ) ; org . pentaho . hadoop . shim . api . Configuration config = mock ( org . pentaho . hadoop . shim . api . Configuration . class ) ; when ( hadoopConfigurationBootstrap . getProvider ( ) ) . thenReturn ( provider ) ; when ( provider . getActiveConfiguration ( ) ) . thenReturn ( hadoopConfig ) ; when ( hadoopConfig . getHadoopShim ( ) ) . thenReturn ( hadoopShim ) ; when ( hadoopShim . createConfiguration ( ) ) . thenReturn ( config ) ; when ( config . get ( HadoopFileSystem . FS_DEFAULT_NAME ) ) . thenReturn ( "hdfs://success" ) ; when ( namedCluster . getHdfsHost ( ) ) . thenReturn ( "success" ) ; when ( namedCluster . getStorageScheme ( ) ) . thenReturn ( "hdfs" ) ; when ( namedCluster . getHdfsPort ( ) ) . thenReturn ( null ) ; org . pentaho . runtime . test . result . RuntimeTestResultSummary runtimeTestResultSummary = testShimConfig . runTest ( namedCluster ) ; verifyRuntimeTestResultEntry ( runtimeTestResultSummary . getOverallStatusEntry ( ) , RuntimeTestEntrySeverity . INFO , messageGetter . getMessage ( TestShimConfig . TEST_SHIM_CONFIG_FS_MATCH_DESC ) , messageGetter . getMessage ( TestShimConfig . TEST_SHIM_CONFIG_FS_MATCH_MESSAGE ) ) ; "<AssertPlaceHolder>" ; } getRuntimeTestResultEntries ( ) { return runtimeTestResultSummary . getRuntimeTestResultEntries ( ) ; }
org . junit . Assert . assertEquals ( 0 , runtimeTestResultSummary . getRuntimeTestResultEntries ( ) . size ( ) )
testAvoidProxyNeverProxySeleniumTrafficOnly ( ) { proxySeleniumTrafficOnly = false ; avoidProxy = true ; java . lang . String pac = makeProxyPAC ( ) ; java . lang . String expected = "function<sp>FindProxyForURL(url,<sp>host)<sp>" + "{<sp>return<sp>'PROXY<sp>localhost:4444;<sp>DIRECT';<sp>}" ; "<AssertPlaceHolder>" ; } makeProxyPAC ( ) { org . openqa . selenium . Capabilities options = org . openqa . selenium . server . browserlaunchers . BrowserOptions . newBrowserOptions ( ) ; options = org . openqa . selenium . browserlaunchers . Proxies . setOnlyProxySeleniumTraffic ( options , proxySeleniumTrafficOnly ) ; options = org . openqa . selenium . browserlaunchers . Proxies . setAvoidProxy ( options , avoidProxy ) ; org . openqa . selenium . browserlaunchers . Proxies . makeProxyPAC ( parentDir , 4444 , httpProxyHost , httpProxyPort , httpNonProxyHosts , options ) ; return readEntirePacFile ( ) ; }
org . junit . Assert . assertEquals ( expected , pac )
shouldReturnNull ( ) { io . sundr . it . Lazy item = new io . sundr . it . LazyBuilder ( ) . build ( ) ; "<AssertPlaceHolder>" ; } getMap ( ) { return this . map ; }
org . junit . Assert . assertNull ( item . getMap ( ) )
readExcelTest ( ) { try { java . util . List < tk . comm . model . SheetBean > sheetBeans = readExcel ( "./write.xls" ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } } readExcel ( java . lang . String ) { tk . comm . utils . ExcelUtil . logger . info ( ( "excel:" + fileName ) ) ; java . lang . String suffix = tk . comm . utils . ExcelUtil . getSuffix ( fileName ) ; tk . comm . utils . InputStream is = new tk . comm . utils . FileInputStream ( fileName ) ; return tk . comm . utils . ExcelUtil . readExcel ( is , suffix ) ; }
org . junit . Assert . assertTrue ( ( ( sheetBeans . size ( ) ) == 2 ) )
testFeatureStoreHints ( ) { java . io . File shpFile = copyShapefiles ( org . geotools . data . shapefile . ShapefileDataStoreTest . STATE_POP ) ; java . net . URL url = shpFile . toURI ( ) . toURL ( ) ; org . geotools . data . shapefile . ShapefileDataStore ds = new org . geotools . data . shapefile . ShapefileDataStore ( url ) ; org . geotools . data . shapefile . ShapefileFeatureStore store = ( ( org . geotools . data . shapefile . ShapefileFeatureStore ) ( ds . getFeatureSource ( "statepop" ) ) ) ; "<AssertPlaceHolder>" ; } getSupportedHints ( ) { java . util . HashSet hints = new java . util . HashSet ( wrapped . getSupportedHints ( ) ) ; hints . remove ( Hints . FEATURE_DETACHED ) ; return hints ; }
org . junit . Assert . assertEquals ( store . getSupportedHints ( ) , store . delegate . getSupportedHints ( ) )
testParseNegativeImaginary ( ) { java . lang . String source = ( ( ( "1" + ( getDecimalCharacter ( ) ) ) + "2323<sp>-<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "434343434343i" ; org . apache . commons . math3 . complex . Complex expected = new org . apache . commons . math3 . complex . Complex ( 1.2323 , ( - 1.434343434343 ) ) ; org . apache . commons . math3 . complex . Complex actual = complexFormat . parse ( source ) ; "<AssertPlaceHolder>" ; } parse ( com . google . javascript . jscomp . AbstractCompiler ) { try { com . google . javascript . jscomp . JsAst . logger_ . fine ( ( "Parsing:<sp>" + ( sourceFile . getName ( ) ) ) ) ; com . google . javascript . jscomp . parsing . ParserRunner . ParseResult result = com . google . javascript . jscomp . parsing . ParserRunner . parse ( sourceFile , sourceFile . getCode ( ) , compiler . getParserConfig ( ) , compiler . getDefaultErrorReporter ( ) , com . google . javascript . jscomp . JsAst . logger_ ) ; root = result . ast ; compiler . setOldParseTree ( sourceFile . getName ( ) , result . oldAst ) ; } catch ( java . io . IOException e ) { compiler . report ( com . google . javascript . jscomp . JSError . make ( AbstractCompiler . READ_ERROR , sourceFile . getName ( ) ) ) ; } if ( ( ( root ) == null ) || ( compiler . hasHaltingErrors ( ) ) ) { root = com . google . javascript . rhino . IR . script ( ) ; } else { compiler . prepareAst ( root ) ; } root . setStaticSourceFile ( sourceFile ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testFulltext ( ) { createFileWithBlob ( ) ; java . lang . String nxql = "SELECT<sp>*<sp>FROM<sp>Document<sp>WHERE<sp>ecm:fulltext='search'" ; org . nuxeo . ecm . core . api . DocumentModelList esRet = ess . query ( new org . nuxeo . elasticsearch . query . NxQueryBuilder ( session ) . nxql ( nxql ) ) ; "<AssertPlaceHolder>" ; exception . expect ( org . nuxeo . ecm . core . query . QueryParseException . class ) ; org . nuxeo . ecm . core . api . DocumentModelList coreRet = session . query ( nxql ) ; } totalSize ( ) { return response . getHits ( ) . getTotalHits ( ) ; }
org . junit . Assert . assertEquals ( 0 , esRet . totalSize ( ) )
testToJson_Point_null ( ) { org . eclipse . rap . json . JsonValue result = org . eclipse . rap . rwt . remote . JsonMapping . toJson ( ( ( org . eclipse . swt . graphics . Point ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } toJson ( org . eclipse . swt . widgets . Widget ) { if ( widget == null ) { return org . eclipse . rap . json . JsonValue . NULL ; } if ( widget . isDisposed ( ) ) { throw new java . lang . IllegalArgumentException ( "Widget<sp>is<sp>disposed" ) ; } return org . eclipse . rap . json . JsonValue . valueOf ( org . eclipse . rap . rwt . internal . lifecycle . WidgetUtil . getId ( widget ) ) ; }
org . junit . Assert . assertEquals ( JsonValue . NULL , result )
runQuery ( ) { final org . apache . rya . streams . api . entity . StreamsQuery sQuery = queryRepo . add ( "SELECT<sp>*<sp>WHERE<sp>{<sp>?person<sp><urn:worksAt><sp>?business<sp>.<sp>}" , true , false ) ; final java . lang . String [ ] args = new java . lang . String [ ] { "--ryaInstance" , "" + ( ryaInstance ) , "business" 3 , kafka . getKafkaHostname ( ) , "--kafkaPort" , kafka . getKafkaPort ( ) , "business" 0 , sQuery . getQueryId ( ) . toString ( ) , "--zookeepers" , kafka . getZookeeperServers ( ) } ; final java . lang . Thread commandThread = new java . lang . Thread ( ) { @ org . apache . rya . streams . client . command . Override public void run ( ) { final org . apache . rya . streams . client . command . RunQueryCommand command = new org . apache . rya . streams . client . command . RunQueryCommand ( ) ; try { command . execute ( args ) ; } catch ( org . apache . rya . streams . client . RyaStreamsCommand . ArgumentsException | org . apache . rya . streams . client . RyaStreamsCommand . ExecutionException e ) { } } } ; final org . eclipse . rdf4j . model . ValueFactory vf = org . eclipse . rdf4j . model . impl . SimpleValueFactory . getInstance ( ) ; final java . util . List < org . apache . rya . api . model . VisibilityStatement > statements = new java . util . ArrayList ( ) ; statements . add ( new org . apache . rya . api . model . VisibilityStatement ( vf . createStatement ( vf . createIRI ( "business" 1 ) , vf . createIRI ( "urn:worksAt" ) , vf . createIRI ( "business" 4 ) ) , "a" ) ) ; statements . add ( new org . apache . rya . api . model . VisibilityStatement ( vf . createStatement ( vf . createIRI ( "business" 2 ) , vf . createIRI ( "urn:worksAt" ) , vf . createIRI ( "urn:TacoShop" ) ) , "a" ) ) ; statements . add ( new org . apache . rya . api . model . VisibilityStatement ( vf . createStatement ( vf . createIRI ( "urn:Charlie" ) , vf . createIRI ( "urn:worksAt" ) , vf . createIRI ( "urn:TacoShop" ) ) , "a" ) ) ; final java . util . List < org . apache . rya . api . model . VisibilityBindingSet > expected = new java . util . ArrayList ( ) ; org . eclipse . rdf4j . query . impl . MapBindingSet bs = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; bs . addBinding ( "business" 5 , vf . createIRI ( "business" 1 ) ) ; bs . addBinding ( "business" , vf . createIRI ( "business" 4 ) ) ; expected . add ( new org . apache . rya . api . model . VisibilityBindingSet ( bs , "a" ) ) ; bs = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; bs . addBinding ( "business" 5 , vf . createIRI ( "business" 2 ) ) ; bs . addBinding ( "business" , vf . createIRI ( "urn:TacoShop" ) ) ; expected . add ( new org . apache . rya . api . model . VisibilityBindingSet ( bs , "a" ) ) ; bs = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; bs . addBinding ( "business" 5 , vf . createIRI ( "urn:Charlie" ) ) ; bs . addBinding ( "business" , vf . createIRI ( "urn:TacoShop" ) ) ; expected . add ( new org . apache . rya . api . model . VisibilityBindingSet ( bs , "a" ) ) ; final java . util . List < org . apache . rya . api . model . VisibilityBindingSet > results ; try { commandThread . start ( ) ; java . lang . Thread . sleep ( 5000 ) ; final java . lang . String statementsTopic = org . apache . rya . streams . kafka . KafkaTopics . statementsTopic ( ryaInstance ) ; final org . apache . rya . streams . api . interactor . LoadStatements loadStatements = new org . apache . rya . streams . kafka . interactor . KafkaLoadStatements ( statementsTopic , stmtProducer ) ; loadStatements . fromCollection ( statements ) ; final java . lang . String resultsTopic = org . apache . rya . streams . kafka . KafkaTopics . queryResultsTopic ( ryaInstance , sQuery . getQueryId ( ) ) ; resultConsumer . subscribe ( com . google . common . collect . Lists . newArrayList ( resultsTopic ) ) ; results = org . apache . rya . test . kafka . KafkaTestUtil . pollForResults ( 500 , 6 , 3 , resultConsumer ) ; } finally { commandThread . interrupt ( ) ; commandThread . join ( 3000 ) ; } "<AssertPlaceHolder>" ; } pollForResults ( int , int , int , org . apache . kafka . clients . consumer . Consumer ) { requireNonNull ( consumer ) ; final java . util . List < V > values = new java . util . ArrayList ( ) ; int i = 0 ; while ( ( ( values . size ( ) ) < targetSize ) && ( i < pollIterations ) ) { for ( final org . apache . kafka . clients . consumer . ConsumerRecord < K , V > record : consumer . poll ( pollMs ) ) { values . add ( record . value ( ) ) ; } i ++ ; } return values ; }
org . junit . Assert . assertEquals ( expected , results )
testGetMetaConfDefaultEmptyString ( ) { org . apache . hadoop . hive . metastore . conf . MetastoreConf . ConfVars metaConfVar = org . apache . hadoop . hive . metastore . conf . MetastoreConf . ConfVars . PARTITION_NAME_WHITELIST_PATTERN ; java . lang . String expected = "" ; java . lang . String actual = hmsc . getMetaConf ( metaConfVar . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( "HiveClientCacheKey:<sp>uri=" + ( this . metaStoreURIs ) ) + "<sp>ugi=" ) + ( this . ugi ) ) + "<sp>thread=" ) + ( this . threadId ) ; }
org . junit . Assert . assertEquals ( expected , actual )
MultiPropertyFilterIndexKeyGen ( ) { java . lang . String key = "(&(objectClass=org.acme.xyz.framework.internationalization.Translatable)(component-identifier=org.acme.xyz.framework.webui.engine.impl.CompoundProcessContextGroupingPanelFactory))" ; long serviceId = 4711 ; int ranking = 46 ; org . apache . felix . dm . impl . index . multiproperty . MultiPropertyFilterIndex biIndex = new org . apache . felix . dm . impl . index . multiproperty . MultiPropertyFilterIndex ( "objectClass,component-identifier" ) ; test . MultiPropertyFilterIndexReferencedTest . TestReference newReference = new test . MultiPropertyFilterIndexReferencedTest . TestReference ( ) ; newReference . addProperty ( "service.id" , serviceId ) ; newReference . addProperty ( "ranking" , ranking ) ; newReference . addProperty ( "component-identifier" , "org.acme.xyz.framework.webui.engine.impl.CompoundProcessContextGroupingPanelFactory" ) ; newReference . addProperty ( "objectclass" , "org.acme.xyz.framework.internationalization.Translatable" ) ; biIndex . addedService ( newReference , new java . lang . Object ( ) ) ; java . util . List < org . osgi . framework . ServiceReference > noClazz = biIndex . getAllServiceReferences ( null , key ) ; "<AssertPlaceHolder>" ; } size ( ) { return data . length ; }
org . junit . Assert . assertTrue ( ( ( noClazz . size ( ) ) == 1 ) )
testGetNextTupleCorpURL ( ) { java . lang . String query = "^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w<sp>\\.-]*)*\\/?$" ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > exactResults = edu . uci . ics . texera . dataflow . regexmatcher . RegexMatcherTestHelper . getQueryResults ( edu . uci . ics . texera . dataflow . regexmatcher . RegexMatcherTest . CORP_TABLE , query , java . util . Arrays . asList ( RegexTestConstantsCorp . URL ) ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > expectedResults = new java . util . ArrayList < edu . uci . ics . texera . api . tuple . Tuple > ( ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > data = edu . uci . ics . texera . dataflow . regexmatcher . RegexTestConstantsCorp . getSampleCorpTuples ( ) ; edu . uci . ics . texera . api . schema . Schema spanSchema = new edu . uci . ics . texera . api . schema . Schema . Builder ( ) . add ( RegexTestConstantsCorp . SCHEMA_CORP ) . add ( edu . uci . ics . texera . dataflow . regexmatcher . RegexMatcherTest . RESULTS , AttributeType . LIST ) . build ( ) ; java . util . List < edu . uci . ics . texera . api . span . Span > spans = new java . util . ArrayList < edu . uci . ics . texera . api . span . Span > ( ) ; spans . add ( new edu . uci . ics . texera . api . span . Span ( RegexTestConstantsCorp . URL , 0 , 16 , query , "http://weibo.com" ) ) ; edu . uci . ics . texera . api . field . IField spanField = new edu . uci . ics . texera . api . field . ListField < edu . uci . ics . texera . api . span . Span > ( new java . util . ArrayList < edu . uci . ics . texera . api . span . Span > ( spans ) ) ; java . util . List < edu . uci . ics . texera . api . field . IField > fields = new java . util . ArrayList < edu . uci . ics . texera . api . field . IField > ( data . get ( 1 ) . getFields ( ) ) ; fields . add ( spanField ) ; expectedResults . add ( new edu . uci . ics . texera . api . tuple . Tuple ( spanSchema , fields . toArray ( new edu . uci . ics . texera . api . field . IField [ fields . size ( ) ] ) ) ) ; spans . clear ( ) ; spans . add ( new edu . uci . ics . texera . api . span . Span ( RegexTestConstantsCorp . URL , 0 , 32 , query , "https://www.microsoft.com/en-us/" ) ) ; spanField = new edu . uci . ics . texera . api . field . ListField < edu . uci . ics . texera . api . span . Span > ( new java . util . ArrayList < edu . uci . ics . texera . api . span . Span > ( spans ) ) ; fields = new java . util . ArrayList < edu . uci . ics . texera . api . field . IField > ( data . get ( 2 ) . getFields ( ) ) ; fields . add ( spanField ) ; expectedResults . add ( new edu . uci . ics . texera . api . tuple . Tuple ( spanSchema , fields . toArray ( new edu . uci . ics . texera . api . field . IField [ fields . size ( ) ] ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . util . List , java . util . List ) { expectedResults = Tuple . Builder . removeIfExists ( expectedResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; exactResults = Tuple . Builder . removeIfExists ( exactResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; if ( ( expectedResults . size ( ) ) != ( exactResults . size ( ) ) ) return false ; return ( expectedResults . containsAll ( exactResults ) ) && ( exactResults . containsAll ( expectedResults ) ) ; }
org . junit . Assert . assertTrue ( edu . uci . ics . texera . api . utils . TestUtils . equals ( expectedResults , exactResults ) )
testNullObject ( ) { "<AssertPlaceHolder>" ; } isValid ( java . lang . Object , javax . validation . ConstraintValidatorContext ) { final boolean isValide ; if ( object == null ) { isValide = true ; } else if ( object instanceof nl . bzk . brp . model . basis . AbstractAttribuut ) { final java . lang . Object waarde = ( ( nl . bzk . brp . model . basis . AbstractAttribuut < ? > ) ( object ) ) . getWaarde ( ) ; if ( waarde == null ) { isValide = true ; } else if ( waarde instanceof java . lang . String ) { final int length = ( ( java . lang . String ) ( waarde ) ) . length ( ) ; isValide = ( length >= ( min ) ) && ( length <= ( max ) ) ; } else { throw new java . lang . IllegalArgumentException ( "De<sp>basis<sp>type<sp>moet<sp>van<sp>het<sp>type<sp>String<sp>zijn." ) ; } } else { throw new java . lang . IllegalArgumentException ( "De<sp>ge-annoteerde<sp>object<sp>een<sp>subtype<sp>zijn<sp>van<sp>AbstractAttribuut." ) ; } return isValide ; }
org . junit . Assert . assertEquals ( true , this . validator . isValid ( null , null ) )
testGetObject ( ) { java . sql . ResultSet rs = getRS ( ) ; "<AssertPlaceHolder>" ; java . sql . SQLXML xml = ( ( java . sql . SQLXML ) ( rs . getObject ( 1 ) ) ) ; } next ( ) { checkClosed ( ) ; if ( onInsertRow ) { throw new org . postgresql . util . PSQLException ( org . postgresql . util . GT . tr ( "Can''t<sp>use<sp>relative<sp>move<sp>methods<sp>while<sp>on<sp>the<sp>insert<sp>row." ) , org . postgresql . util . PSQLState . INVALID_CURSOR_STATE ) ; } if ( ( ( currentRow ) + 1 ) >= ( rows . size ( ) ) ) { if ( ( ( cursor ) == null ) || ( ( ( maxRows ) > 0 ) && ( ( ( rowOffset ) + ( rows . size ( ) ) ) >= ( maxRows ) ) ) ) { currentRow = rows . size ( ) ; thisRow = null ; rowBuffer = null ; return false ; } rowOffset += rows . size ( ) ; int fetchRows = fetchSize ; if ( ( maxRows ) != 0 ) { if ( ( fetchRows == 0 ) || ( ( ( rowOffset ) + fetchRows ) > ( maxRows ) ) ) { fetchRows = ( maxRows ) - ( rowOffset ) ; } } connection . getQueryExecutor ( ) . fetch ( cursor , new org . postgresql . jdbc . PgResultSet . CursorResultHandler ( ) , fetchRows ) ; currentRow = 0 ; if ( rows . isEmpty ( ) ) { thisRow = null ; rowBuffer = null ; return false ; } } else { ( currentRow ) ++ ; } initRowBuffer ( ) ; return true ; }
org . junit . Assert . assertTrue ( rs . next ( ) )
batchPut ( ) { try ( org . apache . hadoop . utils . db . Table < java . lang . String , java . lang . String > testTable = createTypedTable ( "Fourth" ) ; org . apache . hadoop . utils . db . BatchOperation batch = rdbStore . initBatchOperation ( ) ) { java . lang . String key = org . apache . commons . lang3 . RandomStringUtils . random ( 10 ) ; java . lang . String value = org . apache . commons . lang3 . RandomStringUtils . random ( 10 ) ; testTable . putWithBatch ( batch , key , value ) ; rdbStore . commitBatchOperation ( batch ) ; "<AssertPlaceHolder>" ; } } get ( java . lang . Class ) { verifyDriverReady ( ) ; long start = monotonicNow ( ) ; java . util . List < T > ret = new java . util . ArrayList ( ) ; java . lang . String znode = getZNodeForClass ( clazz ) ; try { java . util . List < java . lang . String > children = zkManager . getChildren ( znode ) ; for ( java . lang . String child : children ) { try { java . lang . String path = getNodePath ( znode , child ) ; org . apache . zookeeper . data . Stat stat = new org . apache . zookeeper . data . Stat ( ) ; java . lang . String data = zkManager . getStringData ( path , stat ) ; boolean corrupted = false ; if ( ( data == null ) || ( data . equals ( "" ) ) ) { corrupted = true ; } else { try { T record = createRecord ( data , stat , clazz ) ; ret . add ( record ) ; } catch ( java . io . IOException e ) { org . apache . hadoop . hdfs . server . federation . store . driver . impl . StateStoreZooKeeperImpl . LOG . error ( "Cannot<sp>create<sp>record<sp>type<sp>\"{}\"<sp>from<sp>\"{}\":<sp>{}" , clazz . getSimpleName ( ) , data , e . getMessage ( ) ) ; corrupted = true ; } } if ( corrupted ) { org . apache . hadoop . hdfs . server . federation . store . driver . impl . StateStoreZooKeeperImpl . LOG . error ( "Cannot<sp>get<sp>data<sp>for<sp>{}<sp>at<sp>{},<sp>cleaning<sp>corrupted<sp>data" , child , path ) ; zkManager . delete ( path ) ; } } catch ( java . lang . Exception e ) { org . apache . hadoop . hdfs . server . federation . store . driver . impl . StateStoreZooKeeperImpl . LOG . error ( "Cannot<sp>get<sp>data<sp>for<sp>{}:<sp>{}" , child , e . getMessage ( ) ) ; } } } catch ( java . lang . Exception e ) { getMetrics ( ) . addFailure ( ( ( monotonicNow ( ) ) - start ) ) ; java . lang . String msg = ( ( "Cannot<sp>get<sp>children<sp>for<sp>\"" + znode ) + "\":<sp>" ) + ( e . getMessage ( ) ) ; org . apache . hadoop . hdfs . server . federation . store . driver . impl . StateStoreZooKeeperImpl . LOG . error ( msg ) ; throw new java . io . IOException ( msg ) ; } long end = monotonicNow ( ) ; getMetrics ( ) . addRead ( ( end - start ) ) ; return new org . apache . hadoop . hdfs . server . federation . store . records . QueryResult < T > ( ret , getTime ( ) ) ; }
org . junit . Assert . assertNotNull ( testTable . get ( key ) )
testGetRequiredExpressionVariableAsString ( ) { org . activiti . engine . delegate . Expression expression = mock ( org . activiti . engine . delegate . Expression . class ) ; org . activiti . engine . delegate . DelegateExecution execution = mock ( org . activiti . engine . delegate . DelegateExecution . class ) ; when ( expression . getValue ( execution ) ) . thenReturn ( org . finra . herd . service . activiti . STRING_VALUE ) ; java . lang . String result = activitiHelper . getRequiredExpressionVariableAsString ( expression , execution , org . finra . herd . service . activiti . VARIABLE_NAME ) ; "<AssertPlaceHolder>" ; } getRequiredExpressionVariableAsString ( org . activiti . engine . delegate . Expression , org . activiti . engine . delegate . DelegateExecution , java . lang . String ) { java . lang . String variableString = getExpressionVariableAsString ( expression , execution ) ; if ( org . apache . commons . lang3 . StringUtils . isBlank ( variableString ) ) { throw new java . lang . IllegalArgumentException ( ( ( "\"" + variableName ) + "\"<sp>must<sp>be<sp>specified." ) ) ; } return variableString ; }
org . junit . Assert . assertEquals ( org . finra . herd . service . activiti . STRING_VALUE , result )
deal ( ) { bnymellon . codekatas . deckofcards . list . immutable . var jdk1Shuffle = this . jdk1Deck . shuffle ( new java . util . Random ( 1 ) ) ; bnymellon . codekatas . deckofcards . list . immutable . var jdk2Shuffle = this . jdk2Deck . shuffle ( new java . util . Random ( 1 ) ) ; bnymellon . codekatas . deckofcards . list . immutable . var jdk1Hand = this . jdk1Deck . deal ( jdk1Shuffle , 5 ) ; bnymellon . codekatas . deckofcards . list . immutable . var jdk2Hand = this . jdk2Deck . deal ( jdk2Shuffle , 5 ) ; "<AssertPlaceHolder>" ; } deal ( org . eclipse . collections . api . stack . MutableStack , int ) { return stack . pop ( count ) . toSet ( ) ; }
org . junit . Assert . assertEquals ( jdk1Hand , jdk2Hand )
trueFilter ( ) { org . graphstream . util . Filter < org . graphstream . graph . Element > f = org . graphstream . util . Filters . trueFilter ( ) ; "<AssertPlaceHolder>" ; } isAvailable ( T extends org . graphstream . graph . Element ) { return flag ; }
org . junit . Assert . assertTrue ( f . isAvailable ( null ) )
testInputsNoDefaultInStep ( ) { final java . net . URI flowUri = getClass ( ) . getResource ( "/shallow_validation/test_inputs_no_default_in_step.sl" ) . toURI ( ) ; final io . cloudslang . lang . compiler . modeller . model . Executable flowModel = compiler . preCompile ( io . cloudslang . lang . compiler . SlangSource . fromFile ( flowUri ) ) ; final java . net . URI operation1Uri = getClass ( ) . getResource ( "/shallow_validation/test_op.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . model . Executable operation1Model = compiler . preCompile ( io . cloudslang . lang . compiler . SlangSource . fromFile ( operation1Uri ) ) ; java . util . Set < io . cloudslang . lang . compiler . modeller . model . Executable > dependencies = new java . util . HashSet ( ) ; dependencies . add ( operation1Model ) ; exception . expect ( io . cloudslang . lang . compiler . IllegalArgumentException . class ) ; exception . expectMessage ( ( "Cannot<sp>compile<sp>flow<sp>'io.cloudslang.test_inputs_no_default_in_step'.<sp>" + ( ( "Step<sp>'explicit_alias'<sp>does<sp>not<sp>declare<sp>all<sp>the<sp>mandatory<sp>inputs<sp>of<sp>its<sp>reference." + "<sp>The<sp>following<sp>inputs<sp>of<sp>'user.ops.test_op'<sp>are<sp>not<sp>private,<sp>" ) + "required<sp>and<sp>with<sp>no<sp>default<sp>value:<sp>alla." ) ) ) ; java . util . List < java . lang . RuntimeException > errors = compiler . validateSlangModelWithDirectDependencies ( flowModel , dependencies ) ; "<AssertPlaceHolder>" ; throw errors . get ( 0 ) ; } size ( ) { return stack . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , errors . size ( ) )
testIsNewFactPatternWhenIsExisting ( ) { mockPatterns ( ) ; plugin . setEditingPattern ( new org . drools . workbench . screens . guided . dtable . client . wizard . column . plugins . commons . PatternWrapper ( "factType" , "boundName" ) ) ; "<AssertPlaceHolder>" ; } isNewFactPattern ( ) { final org . drools . workbench . models . guided . dtable . shared . model . BRLRuleModel brlRuleModel = new org . drools . workbench . models . guided . dtable . shared . model . BRLRuleModel ( presenter . getModel ( ) ) ; final java . util . List < java . lang . String > variables = brlRuleModel . getLHSPatternVariables ( ) ; return ! ( variables . stream ( ) . anyMatch ( ( b ) -> b . equals ( patternWrapper ( ) . getBoundName ( ) ) ) ) ; }
org . junit . Assert . assertFalse ( plugin . isNewFactPattern ( ) )
testGetBlacklistedMetacardTransformers ( ) { java . util . Set < java . lang . String > blacklist = com . google . common . collect . ImmutableSet . of ( "hello" , "world" ) ; descriptors . setBlackListedMetacardTransformerIds ( blacklist ) ; "<AssertPlaceHolder>" ; } getBlackListedMetacardTransformerIds ( ) { return blackListedMetacardTransformerIds ; }
org . junit . Assert . assertThat ( descriptors . getBlackListedMetacardTransformerIds ( ) , org . hamcrest . Matchers . contains ( "hello" , "world" ) )
testCanGetAccessToStudentSectionAssociationWithoutEndDate ( ) { org . slc . sli . api . security . context . validator . Map < java . lang . String , java . lang . Object > goodStudentSectionAssociation = buildStudentSectionAssociation ( "student123" , "section123" ) ; org . slc . sli . domain . Entity association = new org . slc . sli . domain . MongoEntity ( org . slc . sli . common . constants . EntityNames . STUDENT_SECTION_ASSOCIATION , goodStudentSectionAssociation ) ; org . mockito . Mockito . when ( mockRepo . findAll ( org . mockito . Mockito . eq ( EntityNames . STUDENT_SECTION_ASSOCIATION ) , org . mockito . Mockito . any ( org . slc . sli . domain . NeutralQuery . class ) ) ) . thenReturn ( org . slc . sli . api . security . context . validator . Arrays . asList ( association ) ) ; org . slc . sli . api . security . context . validator . Set < java . lang . String > associations = new org . slc . sli . api . security . context . validator . HashSet < java . lang . String > ( ) ; associations . add ( association . getEntityId ( ) ) ; studentIds . add ( "student123" ) ; org . mockito . Mockito . when ( staffToStudentValidator . validate ( EntityNames . STUDENT , studentIds ) ) . thenReturn ( studentIds ) ; "<AssertPlaceHolder>" ; } validate ( java . lang . String , org . slc . sli . api . security . context . validator . Set ) { if ( ! ( areParametersValid ( EntityNames . STAFF , entityName , staffIds ) ) ) { return Collections . EMPTY_SET ; } org . slc . sli . api . security . context . validator . Set < java . lang . String > validIds = new org . slc . sli . api . security . context . validator . HashSet < java . lang . String > ( ) ; org . slc . sli . domain . NeutralQuery basicQuery = new org . slc . sli . domain . NeutralQuery ( new org . slc . sli . domain . NeutralCriteria ( "staffReference" , org . slc . sli . domain . NeutralCriteria . CRITERIA_IN , staffIds ) ) ; basicQuery . setIncludeFields ( org . slc . sli . api . security . context . validator . Arrays . asList ( "educationOrganizationReference" , "staffReference" ) ) ; org . slc . sli . api . security . context . validator . TransitiveStaffToStaffValidator . LOG . info ( "Attempting<sp>to<sp>validate<sp>transitively<sp>from<sp>staff<sp>to<sp>staff<sp>with<sp>ids<sp>{}" , staffIds ) ; injectEndDateQuery ( basicQuery ) ; java . lang . Iterable < org . slc . sli . domain . Entity > edOrgAssoc = repo . findAll ( EntityNames . STAFF_ED_ORG_ASSOCIATION , basicQuery ) ; org . slc . sli . api . security . context . validator . Map < java . lang . String , org . slc . sli . api . security . context . validator . Set < java . lang . String > > staffEdorgMap = new org . slc . sli . api . security . context . validator . HashMap < java . lang . String , org . slc . sli . api . security . context . validator . Set < java . lang . String > > ( ) ; populateMapFromMongoResponse ( staffEdorgMap , edOrgAssoc ) ; org . slc . sli . api . security . context . validator . Set < java . lang . String > edOrgLineage = getStaffEdOrgLineage ( ) ; if ( ( edOrgLineage . isEmpty ( ) ) || ( staffEdorgMap . isEmpty ( ) ) ) { return Collections . EMPTY_SET ; } for ( java . util . Map . Entry < java . lang . String , org . slc . sli . api . security . context . validator . Set < java . lang . String > > entry : staffEdorgMap . entrySet ( ) ) { org . slc . sli . api . security . context . validator . Set < java . lang . String > tmpSet = new org . slc . sli . api . security . context . validator . HashSet < java . lang . String > ( entry . getValue ( ) ) ; tmpSet . retainAll ( edOrgLineage ) ; if ( ( tmpSet . size ( ) ) != 0 ) { validIds . add ( entry . getKey ( ) ) ; } } validIds . addAll ( validateThrough ( EntityNames . STAFF_PROGRAM_ASSOCIATION , "programId" ) ) ; validIds . addAll ( validateThrough ( EntityNames . STAFF_COHORT_ASSOCIATION , "cohortId" ) ) ; basicQuery = new org . slc . sli . domain . NeutralQuery ( new org . slc . sli . domain . NeutralCriteria ( "_id" , "in" , edOrgLineage ) ) ; java . lang . Iterable < org . slc . sli . domain . Entity > edorgs = repo . findAll ( EntityNames . EDUCATION_ORGANIZATION , basicQuery ) ; org . slc . sli . api . security . context . validator . List < java . lang . String > programs = new org . slc . sli . api . security . context . validator . ArrayList < java . lang . String > ( ) ; for ( org . slc . sli . domain . Entity e : edorgs ) { java . lang . Object value = e . getBody ( ) . get ( "programReference" ) ; if ( value != null ) { if ( org . slc . sli . api . security . context . validator . List . class . isAssignableFrom ( value . getClass ( ) ) ) { programs . addAll ( ( ( org . slc . sli . api .
org . junit . Assert . assertTrue ( validator . validate ( EntityNames . STUDENT_SECTION_ASSOCIATION , associations ) . equals ( associations ) )
fieldsClassOfTExpressionOfQArray ( ) { com . querydsl . core . types . dsl . PathBuilder < com . querydsl . core . types . QBeanPropertyTest . Entity > entity = new com . querydsl . core . types . dsl . PathBuilder < com . querydsl . core . types . QBeanPropertyTest . Entity > ( com . querydsl . core . types . QBeanPropertyTest . Entity . class , "entity" ) ; com . querydsl . core . types . QBean < com . querydsl . core . types . QBeanPropertyTest . Entity > beanProjection = com . querydsl . core . types . Projections . fields ( com . querydsl . core . types . QBeanPropertyTest . Entity . class , entity . getNumber ( "cId" , com . querydsl . core . types . Integer . class ) , entity . getNumber ( "eId" , com . querydsl . core . types . Integer . class ) ) ; "<AssertPlaceHolder>" ; } getNumber ( java . lang . String , java . lang . Class ) { java . lang . Class < ? extends A > vtype = validate ( property , type ) ; return super . createNumber ( property , ( ( java . lang . Class < ? super A > ) ( vtype ) ) ) ; }
org . junit . Assert . assertEquals ( com . querydsl . core . types . QBeanPropertyTest . Entity . class , beanProjection . newInstance ( 1 , 2 ) . getClass ( ) )
testBuilderListCopy ( ) { final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . augment . rev140709 . TreeComplexUsesAugment source = new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . augment . rev140709 . TreeComplexUsesAugmentBuilder ( ) . build ( ) ; final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . augment . rev140709 . put . top . input . choice . list . choice . in . choice . list . ComplexViaUses viaUses = new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . augment . rev140709 . put . top . input . choice . list . choice . in . choice . list . ComplexViaUsesBuilder ( ) . build ( ) ; final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . augment . rev140709 . TreeComplexUsesAugment copied = new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . augment . rev140709 . TreeComplexUsesAugmentBuilder ( viaUses ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { com . google . common . base . Preconditions . checkState ( ( ( arg ) != null ) , "No<sp>path<sp>arguments<sp>present" ) ; final java . lang . Iterable < org . opendaylight . yangtools . yang . binding . InstanceIdentifier . PathArgument > pathArguments ; if ( ( basePath ) == null ) { pathArguments = pathBuilder . build ( ) ; } else { pathArguments = com . google . common . collect . Iterables . concat ( basePath , pathBuilder . build ( ) ) ; } return org . opendaylight . yangtools . yang . binding . InstanceIdentifier . trustedCreate ( arg , pathArguments , hashBuilder . build ( ) , wildcard ) ; }
org . junit . Assert . assertEquals ( source , copied )
renameIfDuplicatedToConstructorArgNames_A$String$List$List_duplicated2 ( ) { org . junithelper . core . extractor . ClassMetaExtractor target = new org . junithelper . core . extractor . ClassMetaExtractor ( config ) ; java . lang . String argName = "name" ; java . util . List < java . lang . String > constructorArgs = new java . util . ArrayList < java . lang . String > ( ) ; constructorArgs . add ( "name" ) ; java . util . List < java . lang . String > methodArgs = new java . util . ArrayList < java . lang . String > ( ) ; methodArgs . add ( "name_" ) ; java . lang . String actual = target . renameIfDuplicatedToConstructorArgNames ( argName , constructorArgs , methodArgs ) ; java . lang . String expected = "name__" ; "<AssertPlaceHolder>" ; } renameIfDuplicatedToConstructorArgNames ( java . lang . String , java . util . List , java . util . List ) { if ( argName == null ) { return null ; } if ( isDuplicatedVariableName ( argName ) ) { return renameIfDuplicatedToConstructorArgNames ( ( argName + "_" ) , constructorArgs , methodArgs ) ; } for ( java . lang . String consArg : constructorArgs ) { if ( argName . equals ( consArg ) ) { return renameIfDuplicatedToConstructorArgNames ( ( argName + "_" ) , constructorArgs , methodArgs ) ; } } for ( java . lang . String methodArg : methodArgs ) { if ( argName . equals ( methodArg ) ) { return renameIfDuplicatedToConstructorArgNames ( ( argName + "_" ) , constructorArgs , methodArgs ) ; } } return argName ; }
org . junit . Assert . assertEquals ( expected , actual )
assocAsa1000v ( ) { boolean result = com . cloud . network . cisco . CiscoVnmcConnectionTest . connection . assignAsa1000v ( com . cloud . network . cisco . CiscoVnmcConnectionTest . tenantName , com . cloud . network . cisco . CiscoVnmcConnectionTest . fwDns . entrySet ( ) . iterator ( ) . next ( ) . getValue ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { if ( isEncrypted ( ) ) { return com . cloud . utils . crypt . DBEncryptionUtil . decrypt ( value ) ; } else { return value ; } }
org . junit . Assert . assertTrue ( result )
getCurrentUserDetailsShouldReturnUserDetailsWhenUserIsLoggedIn ( ) { com . epam . rft . atsy . service . security . UserDetailsAdapter userDetailsAdapter = new com . epam . rft . atsy . service . security . UserDetailsAdapter ( com . epam . rft . atsy . service . security . SpringSecurityAuthenticationServiceTest . USER_ID , com . epam . rft . atsy . service . security . SpringSecurityAuthenticationServiceTest . USER_PASSWORD , com . epam . rft . atsy . service . security . SpringSecurityAuthenticationServiceTest . USER_NAME ) ; org . springframework . security . core . context . SecurityContextHolder . getContext ( ) . setAuthentication ( new org . springframework . security . authentication . UsernamePasswordAuthenticationToken ( userDetailsAdapter , null ) ) ; com . epam . rft . atsy . service . security . UserDetailsAdapter result = springSecurityAuthenticationService . getCurrentUserDetails ( ) ; "<AssertPlaceHolder>" ; } getCurrentUserDetails ( ) { if ( ( org . springframework . security . core . context . SecurityContextHolder . getContext ( ) . getAuthentication ( ) ) != null ) { com . epam . rft . atsy . service . security . UserDetailsAdapter userDetailsAdapter = ( ( com . epam . rft . atsy . service . security . UserDetailsAdapter ) ( org . springframework . security . core . context . SecurityContextHolder . getContext ( ) . getAuthentication ( ) . getPrincipal ( ) ) ) ; if ( userDetailsAdapter != null ) { return userDetailsAdapter ; } } throw new com . epam . rft . atsy . service . exception . UserNotLoggedInException ( ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( userDetailsAdapter ) )
testPointless1 ( ) { "<AssertPlaceHolder>" ; } getNextSUID ( ) { return org . cytoscape . model . SUIDFactory . count . incrementAndGet ( ) ; }
org . junit . Assert . assertTrue ( ( ( org . cytoscape . model . SUIDFactory . getNextSUID ( ) ) != ( org . cytoscape . model . SUIDFactory . getNextSUID ( ) ) ) )
testSetHome ( ) { System . out . println ( "setHome" ) ; mudmap2 . backend . World instance = new mudmap2 . backend . World ( ) ; int x = 5 ; int y = 12 ; mudmap2 . backend . Layer l = instance . getNewLayer ( ) ; instance . setHome ( new mudmap2 . backend . WorldCoordinate ( l . getId ( ) , x , y ) ) ; mudmap2 . backend . WorldCoordinate expResult = new mudmap2 . backend . WorldCoordinate ( l . getId ( ) , x , y ) ; mudmap2 . backend . WorldCoordinate result = instance . getHome ( ) ; "<AssertPlaceHolder>" ; } compareTo ( mudmap2 . backend . PlaceGroup ) { return name . compareTo ( arg0 . getName ( ) ) ; }
org . junit . Assert . assertTrue ( ( ( expResult . compareTo ( result ) ) == 0 ) )
canPickleAnyOldObject ( ) { java . lang . String stringForm = pickle ( new java . lang . String ( "BB" ) ) ; "<AssertPlaceHolder>" ; } unpickle ( java . lang . String ) { return ( ( org . infinitest . eclipse . util . Serializable ) ( deserialize ( org . infinitest . eclipse . util . Base64 . decodeBase64 ( stringForm . getBytes ( ) ) ) ) ) ; }
org . junit . Assert . assertEquals ( new java . lang . String ( "BB" ) , unpickle ( stringForm ) )
getRelativePathTest ( ) { com . beijunyi . parallelgit . filesystem . GitPath path = gfs . getPath ( "a" ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( ( stringValue ) == null ) stringValue = decode ( com . beijunyi . parallelgit . filesystem . CHARSET , path ) ; return stringValue ; }
org . junit . Assert . assertEquals ( "a" , path . toString ( ) )
findInitConstructorInstruction ( ) { com . navercorp . pinpoint . profiler . instrument . MethodNode methodNode = com . navercorp . pinpoint . profiler . instrument . ASMClassNodeLoader . get ( "com.navercorp.pinpoint.profiler.instrument.mock.AbstractClass" , "<init>" ) ; com . navercorp . pinpoint . profiler . instrument . ASMMethodVariables variables = new com . navercorp . pinpoint . profiler . instrument . ASMMethodVariables ( "com/navercorp/pinpoint/profiler/instrument/mock/AbstractClass" , methodNode ) ; com . navercorp . pinpoint . profiler . instrument . AbstractInsnNode instruction = variables . findInitConstructorInstruction ( ) ; "<AssertPlaceHolder>" ; } findInitConstructorInstruction ( ) { int nested = 0 ; for ( org . objectweb . asm . tree . AbstractInsnNode insnNode = this . methodNode . instructions . getFirst ( ) ; insnNode != null ; insnNode = insnNode . getNext ( ) ) { if ( insnNode instanceof org . objectweb . asm . tree . TypeInsnNode ) { if ( ( insnNode . getOpcode ( ) ) == ( org . objectweb . asm . Opcodes . NEW ) ) { nested ++ ; } } else if ( insnNode instanceof org . objectweb . asm . tree . MethodInsnNode ) { final org . objectweb . asm . tree . MethodInsnNode methodInsnNode = ( ( org . objectweb . asm . tree . MethodInsnNode ) ( insnNode ) ) ; if ( ( ( methodInsnNode . getOpcode ( ) ) == ( org . objectweb . asm . Opcodes . INVOKESPECIAL ) ) && ( methodInsnNode . name . equals ( "<init>" ) ) ) { if ( ( -- nested ) < 0 ) { return insnNode . getNext ( ) ; } } } } return null ; }
org . junit . Assert . assertEquals ( 7 , methodNode . instructions . indexOf ( instruction ) )
executeJarExit1 ( ) { int [ ] exitCode = new int [ ] { - 1 } ; org . spincast . plugins . processutils . JarExecutionHandlerDefault handler = new org . spincast . plugins . processutils . JarExecutionHandlerDefault ( ) { @ org . spincast . plugins . processutils . tests . Override public void onExit ( int exitVal ) { exitCode [ 0 ] = exitVal ; } } ; getSpincastProcessUtils ( ) . executeJar ( getMavenProjectJarFile ( ) . getAbsolutePath ( ) , com . google . common . collect . Lists . newArrayList ( "1" ) , handler ) ; try { org . spincast . testing . core . utils . SpincastTestingUtils . waitForTrue ( new org . spincast . testing . core . utils . TrueChecker ( ) { @ org . spincast . plugins . processutils . tests . Override public boolean check ( ) { return ( exitCode [ 0 ] ) > ( - 1 ) ; } } , 5000 ) ; "<AssertPlaceHolder>" ; } finally { handler . killJarProcess ( ) ; } } check ( ) { return ( getServer ( ) . getWebsocketEndpointManager ( "endpoint1" ) . getPeersIds ( ) . size ( ) ) == 1 ; }
org . junit . Assert . assertEquals ( 1 , exitCode [ 0 ] )
resultIgnoredTest ( ) { java . util . concurrent . atomic . AtomicReference < java . lang . Throwable > failureProvided = new java . util . concurrent . atomic . AtomicReference ( null ) ; new org . threadly . concurrent . future . FutureCallbackFailureHandler ( ( t ) -> failureProvided . set ( t ) ) . handleResult ( new java . lang . Exception ( ) ) ; "<AssertPlaceHolder>" ; } get ( ) { executeIfNotStarted ( ) ; return super . get ( ) ; }
org . junit . Assert . assertNull ( failureProvided . get ( ) )
inputOutput ( ) { org . diirt . datasource . LatestValueCollector < java . lang . Integer > collector = new org . diirt . datasource . LatestValueCollector ( ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { collector . writeValue ( i ) ; "<AssertPlaceHolder>" ; } } readValue ( ) { java . util . List < java . lang . Class < ? > > types = new java . util . ArrayList < java . lang . Class < ? > > ( ) ; java . util . List < java . lang . Object > values = new java . util . ArrayList < java . lang . Object > ( ) ; for ( java . util . List < org . diirt . datasource . ReadFunction < ? > > columnFunctions : functions ) { java . util . List < java . lang . Object > columnValues = new java . util . ArrayList < java . lang . Object > ( ) ; java . lang . Class < ? > columnType = null ; for ( org . diirt . datasource . ReadFunction < ? > function : columnFunctions ) { java . lang . Object value = function . readValue ( ) ; columnType = validateType ( value , columnType , names . get ( types . size ( ) ) ) ; columnValues . add ( value ) ; } if ( columnType == null ) columnType = java . lang . String . class ; java . lang . Object data = java . lang . reflect . Array . newInstance ( columnType , columnValues . size ( ) ) ; for ( int i = 0 ; i < ( columnValues . size ( ) ) ; i ++ ) { org . diirt . datasource . vtype . VTableAggregationFunction . arrayAdders . get ( columnType ) . addValue ( data , i , columnValues . get ( i ) ) ; } types . add ( columnType ) ; values . add ( org . diirt . datasource . vtype . VTableAggregationFunction . arrayAdders . get ( columnType ) . finalizeData ( data ) ) ; } return org . diirt . vtype . ValueFactory . newVTable ( types , names , values ) ; }
org . junit . Assert . assertThat ( collector . readValue ( ) , equalTo ( i ) )
testCreate ( ) { prefsvc . saveRecipientDelivererConfig ( "user1" , "mock" , new java . lang . String [ ] { "channel2" } ) ; java . util . Collection < org . kuali . rice . kcb . bo . RecipientDelivererConfig > deliverers = prefsvc . getDeliverersForRecipient ( "user1" ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . delegate . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , deliverers . size ( ) )
testGetDefaultDisplayName ( ) { final java . lang . String name = "the<sp>item<sp>name" ; hudson . model . AbstractItemTest . StubAbstractItem i = new hudson . model . AbstractItemTest . StubAbstractItem ( ) ; i . doSetName ( name ) ; "<AssertPlaceHolder>" ; } getDisplayName ( ) { return "My<sp>Task<sp>Thread" ; }
org . junit . Assert . assertEquals ( name , i . getDisplayName ( ) )
test ( ) { "<AssertPlaceHolder>" ; } findDisciplines ( java . lang . Integer ) { java . lang . String sql = ( "SELECT<sp>DISTINCT<sp>i.discipline<sp>FROM<sp>" + ( modelClass . getName ( ) ) ) + "<sp>i<sp>WHERE<sp>i.discipline<sp><><sp>''<sp>AND<sp>i.labNumber<sp>=<sp>:labid" ; javax . persistence . Query query = entityManager . createQuery ( sql ) ; query . setParameter ( "labid" , labid ) ; return query . getResultList ( ) ; }
org . junit . Assert . assertNotNull ( dao . findDisciplines ( 100 ) )
testTake ( ) { java . util . concurrent . BlockingQueue q = populatedQueue ( net . openhft . chronicle . sandbox . queue . shared . SIZE ) ; for ( int i = 0 ; i < ( SIZE ) ; ++ i ) { "<AssertPlaceHolder>" ; } } take ( ) { final int readLocation = this . consumerReadLocation ; final int nextReadLocation = net . openhft . chronicle . sandbox . queue . ConcurrentBlockingObjectQueue . blockForReadSpace ( readLocation ) ; final E value = dataLocator . getData ( readLocation ) ; net . openhft . chronicle . sandbox . queue . ConcurrentBlockingObjectQueue . setReadLocation ( nextReadLocation ) ; return value ; }
org . junit . Assert . assertEquals ( i , q . take ( ) )
testFullBuildBigProjectWithRefeernceToJar ( ) { org . eclipse . jdt . core . IJavaProject project = workspace . createJavaProject ( "foo" ) ; workspace . addNature ( project . getProject ( ) , XtextProjectHelper . NATURE_ID ) ; org . eclipse . core . resources . IFolder folder = project . getProject ( ) . getFolder ( "src" ) ; org . eclipse . core . resources . IFile jarFile = project . getProject ( ) . getFile ( "my.jar" ) ; jarFile . create ( jarInputStream ( new org . eclipse . xtext . ui . testing . util . JavaProjectSetupUtil . TextFile ( ( "my/element" + ( org . eclipse . xtext . builder . impl . ProfilerAbstractBuilderTest . F_EXT ) ) , "object<sp>ReferenceMe" ) ) , true , workspace . monitor ( ) ) ; workspace . addJarToClasspath ( project , jarFile ) ; int NUM_FILES = 2000 ; org . eclipse . core . resources . IFile [ ] files = new org . eclipse . core . resources . IFile [ NUM_FILES ] ; org . eclipse . xtext . util . StopWatch timer = new org . eclipse . xtext . util . StopWatch ( ) ; for ( int i = 0 ; i < NUM_FILES ; i ++ ) { org . eclipse . core . resources . IFile file = folder . getFile ( ( ( ( "<sp>references<sp>ReferenceMe" 0 + i ) + "_" ) + ( org . eclipse . xtext . builder . impl . ProfilerAbstractBuilderTest . F_EXT ) ) ) ; files [ i ] = file ; java . lang . String contents = ( "object<sp>Foo" + i ) + "<sp>references<sp>ReferenceMe" ; file . create ( new org . eclipse . xtext . util . StringInputStream ( contents ) , true , workspace . monitor ( ) ) ; } logAndReset ( "Creating<sp>files" , timer ) ; workspace . build ( ) ; logAndReset ( "Auto<sp>build" , timer ) ; org . eclipse . core . resources . IMarker [ ] iMarkers = folder . findMarkers ( EValidator . MARKER , true , org . eclipse . core . resources . IResource . DEPTH_INFINITE ) ; for ( org . eclipse . core . resources . IMarker iMarker : iMarkers ) { System . out . println ( iMarker . getAttribute ( org . eclipse . core . resources . IMarker . MESSAGE ) ) ; } "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return attributes . get ( attributeName ) ; }
org . junit . Assert . assertEquals ( 0 , iMarkers . length )
testGetDefaultsForColumn ( ) { net . sourceforge . squirrel_sql . plugins . mssql . sql . constraint . DefaultConstraint constraint = new net . sourceforge . squirrel_sql . plugins . mssql . sql . constraint . DefaultConstraint ( ) ; constraint . addConstraintColumn ( net . sourceforge . squirrel_sql . plugins . mssql . TableConstraintsTest . TEST_COLUMN ) ; constraintsUnderTest . addConstraint ( constraint ) ; java . util . List < net . sourceforge . squirrel_sql . plugins . mssql . sql . constraint . DefaultConstraint > list = constraintsUnderTest . getDefaultsForColumn ( net . sourceforge . squirrel_sql . plugins . mssql . TableConstraintsTest . TEST_COLUMN ) ; "<AssertPlaceHolder>" ; } size ( ) { return _objectsList . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , list . size ( ) )
testStringTreeSet ( ) { java . util . TreeSet < java . lang . String > mySet = new java . util . TreeSet ( java . util . Arrays . asList ( "C" , "B" , "A" ) ) ; "<AssertPlaceHolder>" ; } toCollection ( java . lang . Class , java . lang . Class , java . lang . String ) { if ( ( collectionClass == null ) || ( classOfT == null ) ) { return null ; } try { java . lang . reflect . Constructor < ? > constructor = collectionClass . getConstructor ( ) ; X collection = ( ( X ) ( constructor . newInstance ( ) ) ) ; ro . pippo . core . ParameterValue parameterValue = newParameterValuePlaceHolder ( ) ; java . util . List < java . lang . String > list = toList ( ) ; for ( java . lang . String value : list ) { parameterValue . values [ 0 ] = value ; T t = ( ( T ) ( parameterValue . toObject ( classOfT , pattern ) ) ) ; collection . add ( t ) ; } return collection ; } catch ( java . lang . NoSuchMethodException | java . lang . InstantiationException | java . lang . IllegalAccessException | java . lang . reflect . InvocationTargetException e ) { throw new ro . pippo . core . PippoRuntimeException ( e , "Failed<sp>to<sp>create<sp>collection" ) ; } }
org . junit . Assert . assertEquals ( mySet , new ro . pippo . core . ParameterValue ( "C" , "A" , "B" , "A" ) . toCollection ( java . util . TreeSet . class , java . lang . String . class , null ) )
hierarchyTagTest ( ) { com . itextpdf . styledxmlparser . jsoup . nodes . Element parentEl = new com . itextpdf . styledxmlparser . jsoup . nodes . Element ( com . itextpdf . styledxmlparser . jsoup . parser . Tag . valueOf ( "dummy" ) , "" ) ; com . itextpdf . styledxmlparser . node . IElementNode parentTag = new com . itextpdf . styledxmlparser . node . impl . jsoup . node . JsoupElementNode ( parentEl ) ; com . itextpdf . styledxmlparser . jsoup . nodes . Element childEl = new com . itextpdf . styledxmlparser . jsoup . nodes . Element ( com . itextpdf . styledxmlparser . jsoup . parser . Tag . valueOf ( "dummy" ) , "" ) ; com . itextpdf . styledxmlparser . node . IElementNode childTag = new com . itextpdf . styledxmlparser . node . impl . jsoup . node . JsoupElementNode ( childEl ) ; com . itextpdf . svg . renderers . ISvgNodeRenderer parentRenderer = fact . createSvgNodeRendererForTag ( parentTag , null ) ; com . itextpdf . svg . renderers . ISvgNodeRenderer childRenderer = fact . createSvgNodeRendererForTag ( childTag , parentRenderer ) ; "<AssertPlaceHolder>" ; } getParent ( ) { return parent ; }
org . junit . Assert . assertEquals ( parentRenderer , childRenderer . getParent ( ) )
testGetFilenameOnNonExistingBlob ( ) { java . lang . String location = "gs://test-spring/test" ; com . google . cloud . storage . Storage storage = mock ( com . google . cloud . storage . Storage . class ) ; when ( storage . get ( com . google . cloud . storage . BlobId . of ( "test-spring" , "test" ) ) ) . thenReturn ( null ) ; org . springframework . cloud . gcp . storage . GoogleStorageResource resource = new org . springframework . cloud . gcp . storage . GoogleStorageResource ( storage , location , false ) ; "<AssertPlaceHolder>" ; } getFilename ( ) { return isBucket ( ) ? getBucketName ( ) : getBlobName ( ) ; }
org . junit . Assert . assertEquals ( "test" , resource . getFilename ( ) )
postProcessTextCut ( ) { jetbrains . jetpad . base . Value < java . util . List < jetbrains . jetpad . hybrid . parser . Token > > lastSeenTokens = installTrackingPostProcessor ( true ) ; jetbrains . jetpad . hybrid . BaseHybridEditorEditingTest . type ( "1" ) ; jetbrains . jetpad . hybrid . TextTokenCell tokenCell = ( ( jetbrains . jetpad . hybrid . TextTokenCell ) ( sync . tokenCells ( ) . get ( 0 ) ) ) ; tokenCell . selectionStart ( ) . set ( 0 ) ; tokenCell . caretPosition ( ) . set ( 1 ) ; tokenCell . selectionVisible ( ) . set ( true ) ; jetbrains . jetpad . hybrid . BaseHybridEditorEditingTest . cut ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return myValue . get ( ) ; }
org . junit . Assert . assertTrue ( lastSeenTokens . get ( ) . isEmpty ( ) )
testJoins ( ) { java . lang . String inputPath = com . couchbase . jdbc . TestUtil . getRQGJOINSDir ( ) ; com . couchbase . jdbc . TestResultAnalysis analysis = com . couchbase . jdbc . JDBCTestUtils . runTestsWithFieldProjectionQueries ( TestUtil . clusterInfo , inputPath ) ; "<AssertPlaceHolder>" ; } isTestPassing ( ) { if ( ( this . totalQueries ) == ( this . totalPassResults ) ) { return true ; } return false ; }
org . junit . Assert . assertTrue ( analysis . isTestPassing ( ) )
testDataIntegrityWithBufferedReader ( ) { final java . io . File testFileIso = new java . io . File ( this . getClass ( ) . getResource ( ( "/" + ( fileName ) ) ) . toURI ( ) ) ; reversedLinesFileReader = new org . apache . commons . io . input . ReversedLinesFileReader ( testFileIso , buffSize , encoding ) ; final java . util . Stack < java . lang . String > lineStack = new java . util . Stack ( ) ; bufferedReader = new java . io . BufferedReader ( new java . io . InputStreamReader ( new java . io . FileInputStream ( testFileIso ) , encoding ) ) ; java . lang . String line = null ; while ( ( line = bufferedReader . readLine ( ) ) != null ) { lineStack . push ( line ) ; } while ( ( line = reversedLinesFileReader . readLine ( ) ) != null ) { final java . lang . String lineFromBufferedReader = lineStack . pop ( ) ; "<AssertPlaceHolder>" ; } } readLine ( ) { throw new java . lang . UnsupportedOperationException ( "Operation<sp>not<sp>supported:<sp>readLine()" ) ; }
org . junit . Assert . assertEquals ( lineFromBufferedReader , line )
testAllowEmptyEx ( ) { javax . mail . internet . MimeMessage m = javax . mail . internet . MimeMultipartPropertyTest . createEmptyMessage ( ) ; javax . mail . internet . MimeMultipart mp = ( ( javax . mail . internet . MimeMultipart ) ( m . getContent ( ) ) ) ; mp . getCount ( ) ; "<AssertPlaceHolder>" ; } getCount ( ) { return parts . size ( ) ; }
org . junit . Assert . assertTrue ( false )
testDecideDefault ( ) { final com . puppycrawl . tools . checkstyle . api . AuditEvent ev = new com . puppycrawl . tools . checkstyle . api . AuditEvent ( this , "Test.java" ) ; "<AssertPlaceHolder>" ; } getFileName ( ) { return fileName ; }
org . junit . Assert . assertTrue ( ev . getFileName ( ) , filter . accept ( ev ) )
testChooseMinAlternative ( ) { org . apache . cxf . message . Message m = new org . apache . cxf . message . MessageImpl ( ) ; org . apache . cxf . ws . policy . AlternativeSelector selector = new org . apache . cxf . ws . policy . selector . MinimalAlternativeSelector ( ) ; org . apache . cxf . ws . policy . PolicyEngine engine = control . createMock ( org . apache . cxf . ws . policy . PolicyEngine . class ) ; org . apache . cxf . ws . policy . Assertor assertor = control . createMock ( org . apache . cxf . ws . policy . Assertor . class ) ; org . apache . neethi . Policy policy = new org . apache . neethi . Policy ( ) ; org . apache . neethi . ExactlyOne ea = new org . apache . neethi . ExactlyOne ( ) ; org . apache . neethi . All all = new org . apache . neethi . All ( ) ; org . apache . cxf . ws . policy . PolicyAssertion a1 = new org . apache . cxf . ws . policy . TestAssertion ( ) ; all . addAssertion ( a1 ) ; ea . addPolicyComponent ( all ) ; java . util . Collection < org . apache . cxf . ws . policy . PolicyAssertion > maxAlternative = org . apache . cxf . helpers . CastUtils . cast ( all . getPolicyComponents ( ) , org . apache . cxf . ws . policy . PolicyAssertion . class ) ; all = new org . apache . neethi . All ( ) ; ea . addPolicyComponent ( all ) ; java . util . Collection < org . apache . cxf . ws . policy . PolicyAssertion > minAlternative = org . apache . cxf . helpers . CastUtils . cast ( all . getPolicyComponents ( ) , org . apache . cxf . ws . policy . PolicyAssertion . class ) ; policy . addPolicyComponent ( ea ) ; org . easymock . EasyMock . expect ( engine . supportsAlternative ( maxAlternative , assertor , m ) ) . andReturn ( true ) ; org . easymock . EasyMock . expect ( engine . supportsAlternative ( minAlternative , assertor , m ) ) . andReturn ( true ) ; control . replay ( ) ; java . util . Collection < org . apache . neethi . Assertion > choice = selector . selectAlternative ( policy , engine , assertor , null , m ) ; "<AssertPlaceHolder>" ; control . verify ( ) ; } size ( ) { return cache . getSize ( ) ; }
org . junit . Assert . assertEquals ( 0 , choice . size ( ) )
testPosCase ( ) { char [ ] [ ] samples = new char [ ] [ ] { "1+2-3*4" . toCharArray ( ) , "1+(2+3)/4" . toCharArray ( ) , "1*((2/1)+3*4-5)" . toCharArray ( ) } ; java . lang . String [ ] res = new java . lang . String [ ] { "1234*-+" , "123+4/+" , "121/34*5-+*" } ; for ( int i = 0 ; i < ( samples . length ) ; ++ i ) { "<AssertPlaceHolder>" ; } } genRPNotation ( char [ ] ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; java . util . Stack < java . lang . Character > stack = new java . util . Stack < java . lang . Character > ( ) ; for ( int i = 0 ; i < ( input . length ) ; ++ i ) { if ( java . lang . Character . isLetterOrDigit ( input [ i ] ) ) { sb . append ( input [ i ] ) ; } else if ( ( input [ i ] ) == ')' ) { while ( ! ( stack . isEmpty ( ) ) ) { char cur = stack . pop ( ) ; if ( cur == '(' ) { break ; } sb . append ( cur ) ; } } else if ( ( ( input [ i ] ) == '+' ) || ( ( input [ i ] ) == '-' ) ) { while ( ( ! ( stack . isEmpty ( ) ) ) && ( ( ( stack . peek ( ) ) == '*' ) || ( ( stack . peek ( ) ) == '/' ) ) ) { sb . append ( stack . pop ( ) ) ; } stack . push ( input [ i ] ) ; } else if ( ( ( ( input [ i ] ) == '*' ) || ( ( input [ i ] ) == '/' ) ) || ( ( input [ i ] ) == '(' ) ) { stack . push ( input [ i ] ) ; } } while ( ! ( stack . isEmpty ( ) ) ) { sb . append ( stack . pop ( ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( res [ i ] , generator . genRPNotation ( samples [ i ] ) )
testMultipleHostsWithEmptyStreams ( ) { for ( int i = 1 ; i <= 3 ; i ++ ) { java . util . Map < java . net . SocketAddress , java . util . Set < java . lang . String > > streamDistribution = new java . util . HashMap < java . net . SocketAddress , java . util . Set < java . lang . String > > ( ) ; int port = 1000 ; for ( int j = 0 ; j < i ; j ++ ) { java . net . SocketAddress address = new java . net . InetSocketAddress ( "127.0.0.1" , ( port + j ) ) ; streamDistribution . put ( address , new java . util . HashSet < java . lang . String > ( ) ) ; } org . apache . distributedlog . service . balancer . CountBasedStreamChooser chooser = new org . apache . distributedlog . service . balancer . CountBasedStreamChooser ( streamDistribution ) ; for ( int k = 0 ; k < ( i + 1 ) ; k ++ ) { "<AssertPlaceHolder>" ; } } } choose ( ) { if ( ( limit ) <= 0 ) { return null ; } java . lang . String s = underlying . choose ( ) ; if ( s == null ) { limit = 0 ; return null ; } -- ( limit ) ; return s ; }
org . junit . Assert . assertNull ( chooser . choose ( ) )
shouldFindActiveQuestions ( ) { org . mifos . platform . questionnaire . service . SectionQuestionDetail sectionQuestionDetail1 = new org . mifos . platform . questionnaire . service . SectionQuestionDetail ( getQuestionDetail ( false ) , true ) ; org . mifos . platform . questionnaire . service . SectionQuestionDetail sectionQuestionDetail2 = new org . mifos . platform . questionnaire . service . SectionQuestionDetail ( getQuestionDetail ( true ) , true ) ; org . mifos . platform . questionnaire . service . SectionDetail sectionDetail = new org . mifos . platform . questionnaire . service . SectionDetail ( ) ; sectionDetail . addQuestion ( sectionQuestionDetail1 ) ; sectionDetail . addQuestion ( sectionQuestionDetail2 ) ; "<AssertPlaceHolder>" ; } hasNoActiveQuestions ( ) { boolean result = true ; for ( org . mifos . platform . questionnaire . service . SectionQuestionDetail sectionQuestionDetail : questionDetails ) { if ( sectionQuestionDetail . isActive ( ) ) { result = false ; break ; } } return result ; }
org . junit . Assert . assertThat ( sectionDetail . hasNoActiveQuestions ( ) , org . hamcrest . CoreMatchers . is ( false ) )
promiseTest ( ) { long start = java . lang . System . currentTimeMillis ( ) ; java . lang . String s = "Hello" ; org . javaz . Promise < java . lang . Integer > p = org . javaz . Promise . promise ( ( ) -> slowLength ( s ) ) . flatMap ( ( i ) -> promise ( ( ) -> slowDouble ( i ) ) ) ; System . out . println ( ( ( "Promised<sp>in<sp>" + ( ( java . lang . System . currentTimeMillis ( ) ) - start ) ) + "<sp>msecs" ) ) ; int result = p . get ( ) ; System . out . println ( ( ( ( ( "Result=<sp>" + result ) + ";<sp>found<sp>in<sp>" ) + ( ( java . lang . System . currentTimeMillis ( ) ) - start ) ) + "<sp>msecs" ) ) ; "<AssertPlaceHolder>" ; } get ( ) { return f . apply ( future . get ( ) ) ; }
org . junit . Assert . assertEquals ( 10 , result )
destructionCallbacks ( ) { initRequestContext ( "all" ) ; final java . lang . String [ ] data = new java . lang . String [ 1 ] ; com . alibaba . citrus . service . requestcontext . util . RequestContextUtil . registerRequestDestructionCallback ( "testCallback" , new java . lang . Runnable ( ) { public void run ( ) { data [ 0 ] = "destructed!" ; } } ) ; requestContexts . commitRequestContext ( requestContext ) ; "<AssertPlaceHolder>" ; } commitRequestContext ( com . alibaba . citrus . service . requestcontext . RequestContext ) { assertInitialized ( ) ; == true - request . startAsync ( ) asyncContext . dispatch ( ) complete ( ) javax . servlet . http . HttpServletRequest request = requestContext . getRequest ( ) ; boolean asyncDispatcher = request_isDispatcherType ( request , com . alibaba . citrus . service . requestcontext . impl . DISPATCHER_TYPE_ASYNC ) ; boolean asyncStarted = request_isAsyncStarted ( request ) ; if ( ! asyncDispatcher ) { if ( asyncStarted ) { if ( getLogger ( ) . isDebugEnabled ( ) ) { getLogger ( ) . debug ( "Keep<sp>request<sp>context<sp>open<sp>for<sp>asynchronous<sp>process" ) ; } request_registerAsyncListener ( request , new com . alibaba . citrus . service . requestcontext . impl . MyAsyncListener ( ) { private java . lang . Object thisListener ; public void setThisProxy ( java . lang . Object listener ) { this . thisListener = listener ; } public void onComplete ( java . lang . Object asyncContext = asyncEvent_getAsyncContext ( event ) ; asyncContext_addAsyncListener ( asyncContext , thisListener ) ; } } ) ; } else { doCommit ( requestContext ) ; } } unbind ( request ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "destructed!" } , data )
testGetReferenceForUpdateMaybeModified ( ) { com . sun . sgs . test . impl . service . data . TestDataServiceImpl . txnScheduler . runTask ( new com . sun . sgs . test . impl . service . data . TestDataServiceImpl . InitialTestRunnable ( ) , com . sun . sgs . test . impl . service . data . TestDataServiceImpl . taskOwner ) ; com . sun . sgs . test . impl . service . data . TestDataServiceImpl . txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) { dummy = ( ( com . sun . sgs . test . util . DummyManagedObject ) ( com . sun . sgs . test . impl . service . data . TestDataServiceImpl . service . getBinding ( "dummy" ) ) ) ; com . sun . sgs . test . impl . service . data . TestDataServiceImpl . service . createReference ( dummy ) . getForUpdate ( ) ; dummy . value = "B" ; } } , com . sun . sgs . test . impl . service . data . TestDataServiceImpl . taskOwner ) ; com . sun . sgs . test . impl . service . data . TestDataServiceImpl . txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) { dummy = ( ( com . sun . sgs . test . util . DummyManagedObject ) ( com . sun . sgs . test . impl . service . data . TestDataServiceImpl . service . getBinding ( "dummy" ) ) ) ; "<AssertPlaceHolder>" ; } } , com . sun . sgs . test . impl . service . data . TestDataServiceImpl . taskOwner ) ; } getBinding ( java . lang . String ) { serviceStats . getBindingOp . report ( ) ; return getBindingInternal ( name , false , false , "getBinding" ) ; }
org . junit . Assert . assertEquals ( "B" , dummy . value )
readUserConversation_CacheHit ( ) { final java . lang . String conversationId = "67890" ; final java . lang . String cacheKey = ai . labs . resources . impl . botmanagement . rest . RestUserConversationStore . calculateCacheKey ( intent , userId ) ; ai . labs . models . UserConversation expected = new ai . labs . models . UserConversation ( intent , userId , Deployment . Environment . unrestricted , botId , conversationId ) ; when ( userConversationCache . get ( eq ( cacheKey ) ) ) . then ( ( invocation ) -> expected ) ; ai . labs . models . UserConversation actual = restUserConversationStore . readUserConversation ( intent , userId ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( userConversationCache , times ( 1 ) ) . get ( eq ( cacheKey ) ) ; org . mockito . Mockito . verify ( userConversationStore , never ( ) ) . readUserConversation ( eq ( intent ) , eq ( userId ) ) ; org . mockito . Mockito . verify ( userConversationCache , never ( ) ) . put ( eq ( cacheKey ) , any ( ai . labs . models . UserConversation . class ) ) ; } readUserConversation ( java . lang . String , java . lang . String ) { try { java . lang . String cacheKey = ai . labs . resources . impl . botmanagement . rest . RestUserConversationStore . calculateCacheKey ( intent , userId ) ; ai . labs . models . UserConversation userConversation = userConversationCache . get ( cacheKey ) ; if ( userConversation == null ) { userConversation = userConversationStore . readUserConversation ( intent , userId ) ; if ( userConversation != null ) { userConversationCache . put ( cacheKey , userConversation ) ; } } if ( userConversation == null ) { java . lang . String message = "UserConversation<sp>with<sp>intent=%s<sp>and<sp>userId=%s<sp>does<sp>not<sp>exist." ; message = java . lang . String . format ( message , intent , userId ) ; throw new javax . ws . rs . NotFoundException ( message ) ; } return userConversation ; } catch ( ai . labs . persistence . IResourceStore e ) { log . error ( e . getLocalizedMessage ( ) , e ) ; throw new javax . ws . rs . InternalServerErrorException ( e . getLocalizedMessage ( ) ) ; } }
org . junit . Assert . assertEquals ( expected , actual )
testGetBypassSpecCache_1 ( ) { final org . apache . shindig . gadgets . oauth2 . OAuth2Arguments fixture = new org . apache . shindig . gadgets . oauth2 . OAuth2Arguments ( requestMock ) ; final boolean result = fixture . getBypassSpecCache ( ) ; "<AssertPlaceHolder>" ; } getBypassSpecCache ( ) { return this . bypassSpecCache ; }
org . junit . Assert . assertTrue ( result )
testFindByRequestIdDocNoDocType ( ) { int requestId1 = 111 ; int requestId2 = 222 ; int documentNo1 = 101 ; int documentNo2 = 202 ; java . lang . String docType1 = "a" ; java . lang . String docType2 = "b" ; org . oscarehr . common . model . ConsultDocs consultDocs1 = new org . oscarehr . common . model . ConsultDocs ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( consultDocs1 ) ; consultDocs1 . setRequestId ( requestId1 ) ; consultDocs1 . setDocumentNo ( documentNo1 ) ; consultDocs1 . setDocType ( docType1 ) ; consultDocs1 . setDeleted ( null ) ; dao . persist ( consultDocs1 ) ; org . oscarehr . common . model . ConsultDocs consultDocs2 = new org . oscarehr . common . model . ConsultDocs ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( consultDocs2 ) ; consultDocs2 . setRequestId ( requestId2 ) ; consultDocs2 . setDocumentNo ( documentNo1 ) ; consultDocs2 . setDocType ( docType1 ) ; consultDocs2 . setDeleted ( null ) ; dao . persist ( consultDocs2 ) ; org . oscarehr . common . model . ConsultDocs consultDocs3 = new org . oscarehr . common . model . ConsultDocs ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( consultDocs3 ) ; consultDocs3 . setRequestId ( requestId1 ) ; consultDocs3 . setDocumentNo ( documentNo2 ) ; consultDocs3 . setDocType ( docType1 ) ; consultDocs3 . setDeleted ( null ) ; dao . persist ( consultDocs3 ) ; org . oscarehr . common . model . ConsultDocs consultDocs4 = new org . oscarehr . common . model . ConsultDocs ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( consultDocs4 ) ; consultDocs4 . setRequestId ( requestId1 ) ; consultDocs4 . setDocumentNo ( documentNo1 ) ; consultDocs4 . setDocType ( docType2 ) ; dao . persist ( consultDocs4 ) ; org . oscarehr . common . model . ConsultDocs consultDocs5 = new org . oscarehr . common . model . ConsultDocs ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( consultDocs5 ) ; consultDocs5 . setRequestId ( requestId1 ) ; consultDocs5 . setDocumentNo ( documentNo1 ) ; consultDocs5 . setDocType ( docType1 ) ; consultDocs5 . setDeleted ( null ) ; dao . persist ( consultDocs5 ) ; org . oscarehr . common . model . ConsultDocs consultDocs6 = new org . oscarehr . common . model . ConsultDocs ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( consultDocs6 ) ; consultDocs6 . setRequestId ( requestId1 ) ; consultDocs6 . setDocumentNo ( documentNo1 ) ; consultDocs6 . setDocType ( docType1 ) ; consultDocs6 . setDeleted ( "Y" ) ; dao . persist ( consultDocs6 ) ; java . util . List < org . oscarehr . common . model . ConsultDocs > expectedResult = new java . util . ArrayList < org . oscarehr . common . model . ConsultDocs > ( java . util . Arrays . asList ( consultDocs1 , consultDocs5 ) ) ; java . util . List < org . oscarehr . common . model . ConsultDocs > result = dao . findByRequestIdDocNoDocType ( requestId1 , documentNo1 , docType1 ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( ( "Array<sp>sizes<sp>do<sp>not<sp>match.<sp>Result:<sp>" + ( result . size ( ) ) ) ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
org . junit . Assert . assertTrue ( true )
objectsWithFetchSpecificationReturnsAllObjectsIfFetchingLimitGreaterThanNumberOfObjects ( ) { com . wounit . rules . MockEditingContext editingContext = new com . wounit . rules . MockEditingContext ( TEST_MODEL_NAME ) ; com . wounit . model . FooEntity . createFooEntity ( editingContext ) ; when ( mockFetchSpecification . fetchLimit ( ) ) . thenReturn ( 2 ) ; @ com . wounit . rules . SuppressWarnings ( "unchecked" ) com . webobjects . foundation . NSArray < com . wounit . model . FooEntity > result = editingContext . objectsWithFetchSpecification ( mockFetchSpecification ) ; "<AssertPlaceHolder>" ; } createFooEntity ( com . wounit . model . EOEditingContext ) { com . wounit . model . FooEntity eo = ( ( com . wounit . model . FooEntity ) ( com . wounit . model . EOUtilities . createAndInsertInstance ( editingContext , com . wounit . model . _FooEntity . ENTITY_NAME ) ) ) ; return eo ; }
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) )
testEvents ( ) { org . cytoscape . view . model . CyNetworkView networkView = mock ( org . cytoscape . view . model . CyNetworkView . class ) ; org . cytoscape . view . model . events . FitContentEvent ev3 = new org . cytoscape . view . model . events . FitContentEvent ( networkView ) ; "<AssertPlaceHolder>" ; } getSource ( ) { return this . v1 ; }
org . junit . Assert . assertEquals ( networkView , ev3 . getSource ( ) )
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . portal . kernel . model . MembershipRequest missingMembershipRequest = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
org . junit . Assert . assertNull ( missingMembershipRequest )
int_to_string ( ) { int number = 2 ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "2" , java . lang . String . valueOf ( number ) )
fileNoSamples ( ) { java . io . File sampleFile = com . amazonaws . codesamples . SampleExtractorTestUtils . getSampleFile ( "EmptySamples.java" ) ; java . util . List < com . amazonaws . codesamples . CodeSample > samples = com . amazonaws . codesamples . SamplesParser . getSamples ( sampleFile ) ; "<AssertPlaceHolder>" ; } getSamples ( java . io . File ) { if ( ( file == null ) || ( ! ( file . exists ( ) ) ) ) { throw new com . amazonaws . codesamples . exception . SampleParsingException ( "Must<sp>provide<sp>a<sp>valid<sp>existing<sp>file<sp>to<sp>parse" ) ; } java . util . List < com . amazonaws . codesamples . CodeSample > samples = new java . util . ArrayList < com . amazonaws . codesamples . CodeSample > ( ) ; com . amazonaws . codesamples . SamplesParser . parseFile ( file , samples ) ; return samples ; }
org . junit . Assert . assertEquals ( samples . size ( ) , 0 )
testSerializeHandshakeMessageContent ( ) { de . rub . nds . tlsattacker . core . protocol . message . UnknownHandshakeMessage msg = new de . rub . nds . tlsattacker . core . protocol . message . UnknownHandshakeMessage ( ) ; msg . setCompleteResultingMessage ( expectedPart ) ; msg . setType ( type . getValue ( ) ) ; msg . setLength ( length ) ; msg . setData ( data ) ; de . rub . nds . tlsattacker . core . protocol . serializer . UnknownHandshakeSerializer serializer = new de . rub . nds . tlsattacker . core . protocol . serializer . UnknownHandshakeSerializer ( msg , de . rub . nds . tlsattacker . core . constants . ProtocolVersion . TLS12 ) ; "<AssertPlaceHolder>" ; } serialize ( ) { de . rub . nds . tlsattacker . core . protocol . serializer . ServerHelloSerializer serializer = new de . rub . nds . tlsattacker . core . protocol . serializer . ServerHelloSerializer ( helloMessage , de . rub . nds . tlsattacker . core . constants . ProtocolVersion . TLS12 ) ; byte [ ] serialised = serializer . serialize ( ) ; org . junit . Assert . assertArrayEquals ( serialised , message ) ; }
org . junit . Assert . assertArrayEquals ( expectedPart , serializer . serialize ( ) )
testAlphaBlend_colorParams_withValidColors ( ) { final java . awt . Color source = new java . awt . Color ( 0 , 255 , 0 , 100 ) ; final java . awt . Color destination = new java . awt . Color ( 255 , 0 , 0 , 255 ) ; final java . awt . Color result = com . valkryst . VTerminal . misc . ColorFunctions . alphaBlend ( source , destination ) ; final java . awt . Color expected = new java . awt . Color ( 101 , 156 , 0 , 255 ) ; "<AssertPlaceHolder>" ; } alphaBlend ( java . awt . Color , java . awt . Color ) { return new java . awt . Color ( com . valkryst . VTerminal . misc . ColorFunctions . alphaBlend ( source . getRGB ( ) , destination . getRGB ( ) ) ) ; }
org . junit . Assert . assertEquals ( expected , result )
testDefaultMethodSorter ( ) { java . util . List < java . lang . String > expected = java . util . Arrays . asList ( org . junit . internal . MethodSorterTest . EPSILON , org . junit . internal . MethodSorterTest . BETA , org . junit . internal . MethodSorterTest . ALPHA , org . junit . internal . MethodSorterTest . DELTA , org . junit . internal . MethodSorterTest . GAMMA_VOID , org . junit . internal . MethodSorterTest . GAMMA_BOOLEAN ) ; java . util . List < java . lang . String > actual = getDeclaredMethodNames ( org . junit . internal . MethodSorterTest . DummySortWithDefault . class ) ; "<AssertPlaceHolder>" ; } getDeclaredMethodNames ( java . lang . Class ) { java . lang . reflect . Method [ ] actualMethods = org . junit . internal . MethodSorter . getDeclaredMethods ( clazz ) ; java . util . List < java . lang . String > names = new java . util . ArrayList < java . lang . String > ( ) ; for ( java . lang . reflect . Method m : actualMethods ) { if ( ! ( m . isSynthetic ( ) ) ) { names . add ( m . toString ( ) . replace ( ( ( clazz . getName ( ) ) + '.' ) , "" ) ) ; } } return names ; }
org . junit . Assert . assertEquals ( expected , actual )
getServerTimeGetsContextTime ( ) { long expected = 1234L ; doReturn ( expected ) . when ( context ) . getCurrentTimeMillis ( ) ; long actual = service . getServerTime ( ) ; "<AssertPlaceHolder>" ; verify ( context ) . getCurrentTimeMillis ( ) ; verifyNoMoreInteractions ( context ) ; verifyZeroInteractions ( shardStateManager ) ; verifyZeroInteractions ( locatorFetchExecutors ) ; verifyZeroInteractions ( rollupReadExecutors ) ; verifyZeroInteractions ( rollupWriteExecutors ) ; } getServerTime ( ) { return context . getCurrentTimeMillis ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
collectInt ( ) { org . eclipse . collections . api . list . primitive . IntList expected = org . eclipse . collections . impl . collector . Collectors2AdditionalTest . SMALL_INTERVAL . collectInt ( Integer :: intValue , IntLists . mutable . empty ( ) ) ; org . eclipse . collections . api . list . primitive . IntList actual = this . smallData . stream ( ) . collect ( org . eclipse . collections . impl . collector . Collectors2 . collectInt ( ( each ) -> each , org . eclipse . collections . impl . factory . primitive . IntLists . mutable :: empty ) ) ; "<AssertPlaceHolder>" ; } collectInt ( org . eclipse . collections . api . block . function . primitive . IntFunction , java . util . function . Supplier ) { return java . util . stream . Collector . of ( supplier , ( collection , each ) -> collection . add ( function . intValueOf ( each ) ) , ( collection1 , collection2 ) -> { collection1 . addAll ( collection2 ) ; return collection1 ; } , org . eclipse . collections . impl . collector . Collectors2 . EMPTY_CHARACTERISTICS ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testSetParameterList_List ( ) { org . openscience . cdk . reaction . ReactionEngine engine = new org . openscience . cdk . reaction . type . AdductionProtonLPReaction ( ) ; engine . setParameterList ( engine . getParameterList ( ) ) ; "<AssertPlaceHolder>" ; } getParameterList ( ) { return paramsMap2 ; }
org . junit . Assert . assertNotNull ( engine . getParameterList ( ) )
testGetGroup ( ) { org . freedesktop . IniStyleFile file = new org . freedesktop . IniStyleFile ( "default-group" ) ; file . add ( "key" , "value" ) ; java . util . Map < java . lang . String , java . lang . String > group = file . getGroup ( "default-group" ) ; "<AssertPlaceHolder>" ; } getGroup ( java . lang . String ) { if ( ! ( data . containsKey ( group ) ) ) { return null ; } return new java . util . HashMap ( data . get ( group ) ) ; }
org . junit . Assert . assertEquals ( 1 , group . entrySet ( ) . size ( ) )
testNonExistentField ( ) { msg . addField ( "someother" , "hello<sp>foo" ) ; org . graylog2 . streams . matchers . StreamRuleMatcher matcher = getMatcher ( rule ) ; "<AssertPlaceHolder>" ; } match ( org . graylog2 . plugin . Message , org . graylog2 . plugin . streams . StreamRule ) { java . lang . Double msgVal = getDouble ( msg . getField ( rule . getField ( ) ) ) ; if ( msgVal == null ) { return false ; } java . lang . Double ruleVal = getDouble ( rule . getValue ( ) ) ; if ( ruleVal == null ) { return false ; } return ( rule . getInverted ( ) ) ^ ( msgVal > ruleVal ) ; }
org . junit . Assert . assertFalse ( matcher . match ( msg , rule ) )
getCustomerNames ( ) { org . eclipse . collections . api . block . function . Function < org . eclipse . collections . companykata . Customer , java . lang . String > nameFunction = Customer :: getName ; org . eclipse . collections . api . list . MutableList < java . lang . String > customerNames = null ; org . eclipse . collections . api . list . MutableList < java . lang . String > expectedNames = Lists . mutable . with ( "Fred" , "Mary" , "Bill" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expectedNames , customerNames )
testContentTypeNeutral ( ) { com . woonoz . proxy . servlet . UrlRewriter rewriter = org . easymock . EasyMock . createMock ( com . woonoz . proxy . servlet . UrlRewriter . class ) ; org . easymock . EasyMock . replay ( rewriter ) ; com . woonoz . proxy . servlet . AbstractHeadersHandler handler = new com . woonoz . proxy . servlet . HttpEntityEnclosingHeadersHandler ( rewriter ) ; java . lang . String headerValue = "binary" ; java . lang . String actualValue = handler . handleHeader ( "Content-type" , headerValue ) ; "<AssertPlaceHolder>" ; org . easymock . EasyMock . verify ( rewriter ) ; } handleHeader ( java . lang . String , java . lang . String ) { com . woonoz . proxy . servlet . HeadersToSubstitute handler = headersToHandle . get ( toLower ( headerName ) ) ; if ( handler != null ) { return handler . handleValue ( headerValue , urlRewriter ) ; } else { return headerValue ; } }
org . junit . Assert . assertEquals ( headerValue , actualValue )
test02 ( ) { org . onebusaway . container . cache . MockServiceImpl service = new org . onebusaway . container . cache . MockServiceImpl ( ) ; java . lang . reflect . Method method = org . onebusaway . container . cache . MockService . class . getMethod ( "evalauteMultiArg" , java . lang . String . class , java . lang . String . class ) ; org . aspectj . lang . ProceedingJoinPoint pjp = org . onebusaway . container . cache . ProceedingJoinPointFactory . create ( service , service , org . onebusaway . container . cache . MockService . class , method , "valueA" , "valueB" ) ; org . onebusaway . container . cache . CacheableObjectKeyFactory [ ] keyFactories = new org . onebusaway . container . cache . CacheableObjectKeyFactory [ ] { new org . onebusaway . container . cache . DefaultCacheableObjectKeyFactory ( ) , new org . onebusaway . container . cache . DefaultCacheableObjectKeyFactory ( ) } ; org . onebusaway . container . cache . DefaultCacheableKeyFactory factory = new org . onebusaway . container . cache . DefaultCacheableKeyFactory ( keyFactories ) ; org . onebusaway . container . cache . DefaultCacheableKeyFactory . KeyImpl expected = new org . onebusaway . container . cache . DefaultCacheableKeyFactory . KeyImpl ( new java . io . Serializable [ ] { "valueA" , "valueB" } ) ; org . onebusaway . container . cache . CacheKeyInfo keyInfo = factory . createKey ( pjp ) ; "<AssertPlaceHolder>" ; } getKey ( ) { return key ; }
org . junit . Assert . assertEquals ( expected , keyInfo . getKey ( ) )
testWriteKeyStoreFailure ( ) { org . apache . nifi . toolkit . tls . util . TlsHelperTest . setUnlimitedCrypto ( false ) ; java . lang . String testPassword = "testPassword" ; java . io . IOException ioException = new java . io . IOException ( "Fail" ) ; doThrow ( ioException ) . when ( keyStoreSpi ) . engineStore ( eq ( tmpFileOutputStream ) , org . mockito . AdditionalMatchers . aryEq ( testPassword . toCharArray ( ) ) ) ; try { org . apache . nifi . toolkit . tls . util . TlsHelper . writeKeyStore ( keyStore , outputStreamFactory , file , testPassword , true ) ; org . junit . Assert . fail ( ( "Expected<sp>" + ioException ) ) ; } catch ( java . io . IOException e ) { "<AssertPlaceHolder>" ; } } writeKeyStore ( java . security . KeyStore , org . apache . nifi . toolkit . tls . util . OutputStreamFactory , java . io . File , java . lang . String , boolean ) { try ( java . io . OutputStream fileOutputStream = outputStreamFactory . create ( file ) ) { keyStore . store ( fileOutputStream , password . toCharArray ( ) ) ; } catch ( java . io . IOException e ) { if ( ( e . getMessage ( ) . toLowerCase ( ) . contains ( org . apache . nifi . toolkit . tls . util . TlsHelper . ILLEGAL_KEY_SIZE ) ) && ( ! ( org . apache . nifi . toolkit . tls . util . TlsHelper . isUnlimitedStrengthCryptographyEnabled ( ) ) ) ) { if ( generatedPassword ) { file . delete ( ) ; java . lang . String truncatedPassword = password . substring ( 0 , 7 ) ; try ( java . io . OutputStream fileOutputStream = outputStreamFactory . create ( file ) ) { keyStore . store ( fileOutputStream , truncatedPassword . toCharArray ( ) ) ; } org . apache . nifi . toolkit . tls . util . TlsHelper . logTruncationWarning ( file ) ; return truncatedPassword ; } else { throw new java . security . GeneralSecurityException ( ( ( ( ( ( "Specified<sp>password<sp>for<sp>" + file ) + "<sp>too<sp>long<sp>to<sp>work<sp>without<sp>unlimited<sp>JCE<sp>policy<sp>installed." ) + ( java . lang . System . lineSeparator ( ) ) ) + "Please<sp>see<sp>" ) + ( org . apache . nifi . toolkit . tls . util . TlsHelper . JCE_URL ) ) ) ; } } else { throw e ; } } return password ; }
org . junit . Assert . assertEquals ( ioException , e )
getRootDirectories_shouldContainTheOnlyRootPath ( ) { java . util . Collection < java . nio . file . Path > roots = new java . util . ArrayList ( ) ; for ( java . nio . file . Path root : gfs . getRootDirectories ( ) ) roots . add ( root ) ; "<AssertPlaceHolder>" ; } getRootPath ( ) { return getPath ( "/" ) ; }
org . junit . Assert . assertTrue ( roots . contains ( gfs . getRootPath ( ) ) )
WtpDesciptorTester ( ) { java . lang . StackTraceElement bTop = java . lang . Thread . currentThread ( ) . getStackTrace ( ) [ 1 ] ; ODLCapwapMessage msg = null ; ODLCapwapMessage n = null ; DiscoveryType discoveryType = null ; ACDescriptor acDescriptor = null ; msg = new ODLCapwapMessage ( ) ; discoveryType = new DiscoveryType ( ) ; discoveryType . setDhcp ( ) ; msg . ctrlMsg . addMessageElement ( discoveryType ) ; WtpDescriptor wtpDescriptor = new WtpDescriptor ( ) ; wtpDescriptor . setMaxRadios ( ( ( short ) ( 12 ) ) ) . setRadioInUse ( ( ( short ) ( 4 ) ) ) ; EncryptionSubElement e = new EncryptionSubElement ( ( ( byte ) ( 1 ) ) , 12 ) ; EncryptionSubElement e1 = new EncryptionSubElement ( ( ( byte ) ( 2 ) ) , 10 ) ; wtpDescriptor . addEncryptSubElement ( e ) ; wtpDescriptor . addEncryptSubElement ( e1 ) ; DescriptorSubElement d = new DescriptorSubElement ( 128 ) ; d . setVendorId ( 120 ) . setDescType ( 13 ) ; DescriptorSubElement d1 = new DescriptorSubElement ( 64 ) ; d1 . setVendorId ( 110 ) . setDescType ( 10 ) ; wtpDescriptor . addDescriptorSubElm ( d ) ; wtpDescriptor . addDescriptorSubElm ( d1 ) ; msg . ctrlMsg . addMessageElement ( wtpDescriptor ) ; msg . ctrlMsg . setMsgType ( ODLCapwapConsts . ODL_CAPWAP_DISCOVERY_REQUEST ) ; msg . ctrlMsg . setSeqNo ( ( ( short ) ( 1 ) ) ) ; io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( ) ; msg . header . encodeHeader ( buf ) ; msg . ctrlMsg . encode ( buf ) ; n = ODLCapwapMessageFactory . decodeFromByteArray ( buf ) ; sender ( buf ) ; "<AssertPlaceHolder>" ; } sender ( io . netty . buffer . ByteBuf ) { java . net . DatagramSocket socket = null ; try { socket = new java . net . DatagramSocket ( ) ; } catch ( java . net . SocketException e ) { e . printStackTrace ( ) ; } java . net . InetAddress address = null ; try { address = java . net . InetAddress . getLoopbackAddress ( ) ; System . out . println ( address ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } { System . out . printf ( "Capacity<sp>of<sp>ByteBuf<sp>%d" , buf . writableBytes ( ) ) ; System . out . printf ( "Writer<sp>Index<sp>%d" , buf . writerIndex ( ) ) ; int packet_size = buf . writerIndex ( ) ; System . out . printf ( "packetsize<sp>%d" , packet_size ) ; byte [ ] array = buf . array ( ) ; java . net . DatagramPacket packet = new java . net . DatagramPacket ( array , packet_size , address , 5246 ) ; try { socket . send ( packet ) ; System . out . printf ( "\nSending<sp>Capwap<sp>Message<sp>" ) ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } } }
org . junit . Assert . assertEquals ( msg , n )
globalConfigurationSaysDoNotRun ( ) { liquibase . configuration . LiquibaseConfiguration . getInstance ( ) . getConfiguration ( liquibase . configuration . GlobalConfiguration . class ) . setValue ( "shouldRun" , false ) ; int errorLevel = liquibase . integration . commandline . Main . run ( new java . lang . String [ 0 ] ) ; liquibase . configuration . LiquibaseConfiguration . getInstance ( ) . getConfiguration ( liquibase . configuration . GlobalConfiguration . class ) . setValue ( "shouldRun" , true ) ; "<AssertPlaceHolder>" ; } setValue ( liquibase . change . Change , java . lang . Object ) { if ( ( value instanceof java . lang . String ) && ( ! ( "string" . equals ( dataType ) ) ) ) { try { switch ( dataType ) { case "bigInteger" : value = new java . math . BigInteger ( ( ( java . lang . String ) ( value ) ) ) ; break ; case "databaseFunction" : value = new liquibase . statement . DatabaseFunction ( ( ( java . lang . String ) ( value ) ) ) ; break ; default : throw new liquibase . exception . UnexpectedLiquibaseException ( ( "Unknown<sp>data<sp>type:<sp>" + ( dataType ) ) ) ; } } catch ( java . lang . Exception e ) { throw new liquibase . exception . UnexpectedLiquibaseException ( ( ( ( ( ( "Cannot<sp>convert<sp>string<sp>value<sp>'" + value ) + "'<sp>to<sp>" ) + ( dataType ) ) + ":<sp>" ) + ( e . getMessage ( ) ) ) ) ; } } try { for ( java . beans . PropertyDescriptor descriptor : liquibase . util . beans . PropertyUtils . getInstance ( ) . getDescriptors ( change . getClass ( ) ) ) { if ( descriptor . getDisplayName ( ) . equals ( this . parameterName ) ) { java . lang . reflect . Method writeMethod = descriptor . getWriteMethod ( ) ; if ( writeMethod == null ) { throw new liquibase . exception . UnexpectedLiquibaseException ( ( "Could<sp>not<sp>find<sp>writeMethod<sp>for<sp>" + ( this . parameterName ) ) ) ; } java . lang . Class < ? > expectedWriteType = writeMethod . getParameterTypes ( ) [ 0 ] ; if ( ( value != null ) && ( ! ( expectedWriteType . isAssignableFrom ( value . getClass ( ) ) ) ) ) { if ( expectedWriteType . equals ( java . lang . String . class ) ) { value = value . toString ( ) ; } else { throw new liquibase . exception . UnexpectedLiquibaseException ( ( ( ( "bigInteger" 0 + ( value . getClass ( ) . getName ( ) ) ) + "<sp>to<sp>" ) + ( expectedWriteType . getName ( ) ) ) ) ; } } writeMethod . invoke ( change , value ) ; } } } catch ( java . lang . Exception e ) { throw new liquibase . exception . UnexpectedLiquibaseException ( ( ( ( "Error<sp>setting<sp>" + ( this . parameterName ) ) + "<sp>to<sp>" ) + value ) , e ) ; } }
org . junit . Assert . assertEquals ( errorLevel , 0 )
testInitWithIncorrectConfDir ( ) { config . mapReduceConfDir = "/universe/andromeda-galaxy/another-earth/hodaap/conf/" ; java . util . List < com . streamsets . pipeline . api . Stage . ConfigIssue > issues = config . init ( context , "prefix" ) ; "<AssertPlaceHolder>" ; verify ( context ) . createConfigIssue ( anyString ( ) , anyString ( ) , eq ( MapReduceErrors . MAPREDUCE_0003 ) , anyString ( ) ) ; } size ( ) { return delegate . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , issues . size ( ) )
testMapAccessWithVariable2 ( ) { final java . lang . String str = "package<sp>org.drools.compiler;\n" + ( ( ( ( ( ( ( "import<sp>java.util.Map;\n" + "rule<sp>\"map<sp>access<sp>with<sp>variable\"\n" ) + "<sp>when\n" ) + "<sp>$key<sp>:<sp>String(<sp>)\n" ) + "<sp>$p1<sp>:<sp>Person(<sp>name<sp>==<sp>\'Bob\',<sp>namedAddresses[$key]<sp>!=<sp>null,<sp>$na<sp>:<sp>namedAddresses[$key]<sp>)\n" ) + "<sp>$p2<sp>:<sp>Person(<sp>name<sp>==<sp>\'Mark\',<sp>namedAddresses[$key]<sp>==<sp>$na<sp>)\n" ) + "<sp>then\n" ) + "end\n" ) ; final org . kie . internal . builder . KnowledgeBuilder kbuilder = org . kie . internal . builder . KnowledgeBuilderFactory . newKnowledgeBuilder ( ) ; kbuilder . add ( org . kie . internal . io . ResourceFactory . newByteArrayResource ( str . getBytes ( ) ) , ResourceType . DRL ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return messages . stream ( ) . anyMatch ( ( m ) -> DMNMessage . Severity . ERROR . equals ( m . getSeverity ( ) ) ) ; }
org . junit . Assert . assertTrue ( kbuilder . hasErrors ( ) )
testGetRecentItemCount ( ) { java . util . Date since = new java . util . Date ( ) ; dbTester . loadData ( "node_1" ) ; store . addRemoteNode ( org . buddycloud . channelserver . db . jdbc . TEST_SERVER1_NODE2_ID ) ; store . addUserSubscription ( new org . buddycloud . channelserver . pubsub . model . impl . NodeSubscriptionImpl ( TEST_SERVER1_NODE2_ID , TEST_SERVER1_USER1_JID , org . buddycloud . channelserver . pubsub . subscription . Subscriptions . subscribed , null ) ) ; java . lang . Thread . sleep ( 1 ) ; store . addNodeItem ( new org . buddycloud . channelserver . pubsub . model . impl . NodeItemImpl ( TEST_SERVER1_NODE1_ID , "123" , new java . util . Date ( ) , "payload" ) ) ; store . addNodeItem ( new org . buddycloud . channelserver . pubsub . model . impl . NodeItemImpl ( TEST_SERVER1_NODE2_ID , "123" , new java . util . Date ( ) , "payload2" ) ) ; int count = store . getCountRecentItems ( org . buddycloud . channelserver . db . jdbc . TEST_SERVER1_USER1_JID , since , ( - 1 ) , null , false ) ; "<AssertPlaceHolder>" ; } getCountRecentItems ( org . xmpp . packet . JID , java . util . Date , int , java . lang . String , boolean ) { if ( null == node ) { node = "/posts" ; } if ( ( - 1 ) == maxPerNode ) { maxPerNode = Integer . MAX_VALUE ; } java . lang . String queryPart ; java . lang . String parentOnlyReplacement ; java . sql . PreparedStatement stmt = null ; try { org . xmpp . resultsetmanagement . ResultSet < org . buddycloud . channelserver . pubsub . model . NodeMembership > subscriptions = this . getUserMemberships ( user ) ; java . util . ArrayList < java . lang . String > queryParts = new java . util . ArrayList < java . lang . String > ( ) ; java . util . ArrayList < java . lang . Object > parameters = new java . util . ArrayList < java . lang . Object > ( ) ; for ( org . buddycloud . channelserver . pubsub . model . NodeMembership subscription : subscriptions ) { if ( false == ( subscription . getSubscription ( ) . equals ( Subscriptions . subscribed ) ) ) { continue ; } if ( false == ( subscription . getNodeId ( ) . substring ( ( ( subscription . getNodeId ( ) . length ( ) ) - ( node . length ( ) ) ) ) . equals ( node ) ) ) { continue ; } queryPart = dialect . selectCountRecentItemParts ( ) ; parentOnlyReplacement = "" ; if ( true == parentOnly ) { parentOnlyReplacement = "AND<sp>\"in_reply_to\"<sp>IS<sp>NULL" ; } queryPart = queryPart . replace ( "%parentOnly%" , parentOnlyReplacement ) ; queryParts . add ( queryPart ) ; parameters . add ( subscription . getNodeId ( ) ) ; parameters . add ( new java . sql . Timestamp ( since . getTime ( ) ) ) ; parameters . add ( maxPerNode ) ; } stmt = conn . prepareStatement ( org . apache . commons . lang . StringUtils . join ( queryParts , "<sp>UNION<sp>ALL<sp>" ) ) ; int index = 1 ; for ( java . lang . Object parameter : parameters ) { stmt . setObject ( index , parameter ) ; ++ index ; } java . sql . ResultSet rs = stmt . executeQuery ( ) ; int count = 0 ; while ( rs . next ( ) ) { count += rs . getInt ( 1 ) ; } stmt = null ; return count ; } catch ( java . sql . SQLException e ) { org . buddycloud . channelserver . db . jdbc . JDBCNodeStore . LOGGER . error ( e ) ; throw new org . buddycloud . channelserver . db . exception . NodeStoreException ( e ) ; } finally { close ( stmt ) ; } }
org . junit . Assert . assertEquals ( 2 , count )
testGetExitDirections ( ) { System . out . println ( "getExitDirections" ) ; java . lang . String dir1 = "n" ; java . lang . String dir2 = "s" ; mudmap2 . backend . Path instance = new mudmap2 . backend . Path ( places [ 0 ] , dir1 , places [ 1 ] , dir2 ) ; java . lang . String [ ] expResult = new java . lang . String [ ] { dir1 , dir2 } ; java . lang . String [ ] result = instance . getExitDirections ( ) ; "<AssertPlaceHolder>" ; } getExitDirections ( ) { return exitdirections ; }
org . junit . Assert . assertArrayEquals ( expResult , result )
testSplitQuery ( ) { io . vertx . ext . web . RoutingContext rc = mock ( io . vertx . ext . web . RoutingContext . class ) ; io . vertx . core . http . HttpServerRequest request = mock ( io . vertx . core . http . HttpServerRequest . class ) ; when ( request . query ( ) ) . thenReturn ( "bla=123&blub=123" ) ; when ( rc . request ( ) ) . thenReturn ( request ) ; when ( rc . data ( ) ) . thenReturn ( new java . util . HashMap ( ) ) ; com . gentics . mesh . context . InternalActionContext ac = new com . gentics . mesh . context . impl . InternalRoutingActionContextImpl ( rc ) ; "<AssertPlaceHolder>" ; } splitQuery ( ) { data ( ) . computeIfAbsent ( com . gentics . mesh . context . AbstractActionContext . QUERY_MAP_DATA_KEY , ( map ) -> { return com . gentics . mesh . util . HttpQueryUtils . splitQuery ( query ( ) ) ; } ) ; return ( ( java . util . Map < java . lang . String , java . lang . String > ) ( data ( ) . get ( com . gentics . mesh . context . AbstractActionContext . QUERY_MAP_DATA_KEY ) ) ) ; }
org . junit . Assert . assertNotNull ( ac . splitQuery ( ) )
startProcess ( ) { org . activiti . engine . RepositoryService repositoryService = activitiRule . getRepositoryService ( ) ; repositoryService . createDeployment ( ) . addInputStream ( "JavaServiceTask.bpmn20.xml" , new java . io . FileInputStream ( filename ) ) . deploy ( ) ; org . activiti . engine . RuntimeService runtimeService = activitiRule . getRuntimeService ( ) ; java . util . Map < java . lang . String , java . lang . Object > variableMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; variableMap . put ( "name" , "Activiti" ) ; org . activiti . engine . runtime . ProcessInstance processInstance = runtimeService . startProcessInstanceByKey ( "JavaServiceTask" , variableMap ) ; "<AssertPlaceHolder>" ; System . out . println ( ( ( ( "id<sp>" + ( processInstance . getId ( ) ) ) + "<sp>" ) + ( processInstance . getProcessDefinitionId ( ) ) ) ) ; }
org . junit . Assert . assertNotNull ( processInstance . getId ( ) )
testHash ( ) { com . zsmartsystems . zigbee . IeeeAddress address1 = new com . zsmartsystems . zigbee . IeeeAddress ( "17880100dc880b" ) ; com . zsmartsystems . zigbee . IeeeAddress address2 = new com . zsmartsystems . zigbee . IeeeAddress ( "17880100dc880b" ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( java . util . Arrays . hashCode ( panId ) ) ; return result ; }
org . junit . Assert . assertEquals ( address1 . hashCode ( ) , address2 . hashCode ( ) )
testRemoveNonExistingRuntime ( ) { org . guvnor . ala . ui . model . RuntimeKey keyToRemove = mock ( org . guvnor . ala . ui . model . RuntimeKey . class ) ; java . util . List < org . guvnor . ala . ui . model . RuntimeListItem > items = mockItems ( org . guvnor . ala . ui . client . provider . status . ProviderStatusPresenterTest . ITEMS_COUNT ) ; presenter . setupItems ( items ) ; for ( int i = 0 ; i < ( org . guvnor . ala . ui . client . provider . status . ProviderStatusPresenterTest . ITEMS_COUNT ) ; i ++ ) { when ( runtimePresenters . get ( i ) . getItem ( ) ) . thenReturn ( items . get ( i ) ) ; } "<AssertPlaceHolder>" ; verify ( runtimePresenterInstance , never ( ) ) . destroy ( anyObject ( ) ) ; verify ( view , never ( ) ) . removeListItem ( anyObject ( ) ) ; } removeItem ( java . lang . String ) { getItems ( ) . removeIf ( ( listItem ) -> java . util . Objects . equals ( uuid , listItem . getDataType ( ) . getUUID ( ) ) ) ; }
org . junit . Assert . assertFalse ( presenter . removeItem ( keyToRemove ) )
getData ( ) { org . mixer2 . jaxb . xhtml . Html html = org . mixer2 . xhtml . DataAttrTest . m2e . loadHtmlTemplate ( new java . io . File ( templateFilePath ) ) ; java . lang . String DataRole = html . getById ( "span1" , org . mixer2 . jaxb . xhtml . Span . class ) . getData ( "role" ) ; "<AssertPlaceHolder>" ; } getData ( java . lang . String ) { javax . xml . namespace . QName qn = new javax . xml . namespace . QName ( ( "data-" + key ) ) ; return this . getOtherAttributes ( ) . get ( qn ) ; }
org . junit . Assert . assertEquals ( "foo" , DataRole )
testToBigInteger ( ) { java . util . Random rng = new java . util . Random ( ) ; byte [ ] a = new byte [ 1 + ( rng . nextInt ( 100 ) ) ] ; rng . nextBytes ( a ) ; int [ ] b = net . sf . ntru . arith . SchnhageStrassen . toIntArray ( new java . math . BigInteger ( 1 , a ) ) ; java . math . BigInteger c = net . sf . ntru . arith . SchnhageStrassen . toBigInteger ( b ) ; "<AssertPlaceHolder>" ; } toBigInteger ( int [ ] ) { byte [ ] b = new byte [ ( a . length ) * 4 ] ; for ( int i = 0 ; i < ( a . length ) ; i ++ ) { int iRev = ( ( a . length ) - 1 ) - i ; b [ ( i * 4 ) ] = ( ( byte ) ( ( a [ iRev ] ) > > > 24 ) ) ; b [ ( ( i * 4 ) + 1 ) ] = ( ( byte ) ( ( ( a [ iRev ] ) > > > 16 ) & 255 ) ) ; b [ ( ( i * 4 ) + 2 ) ] = ( ( byte ) ( ( ( a [ iRev ] ) > > > 8 ) & 255 ) ) ; b [ ( ( i * 4 ) + 3 ) ] = ( ( byte ) ( ( a [ iRev ] ) & 255 ) ) ; } return new java . math . BigInteger ( 1 , b ) ; }
org . junit . Assert . assertEquals ( new java . math . BigInteger ( 1 , a ) , c )
parseTestAbbreviation_PrimitiveArray ( ) { int [ ] arr = new int [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 } ; com . mongodb . BasicDBObject query = new com . mongodb . BasicDBObject ( ) ; query . put ( "intArray" , arr ) ; java . lang . Object [ ] objArray = new java . lang . Object [ ] { query } ; logger . debug ( "objArray:{}" , objArray ) ; com . navercorp . pinpoint . plugin . mongo . NormalizedBson stringStringValue = com . navercorp . pinpoint . plugin . mongo . MongoUtil . parseBson ( objArray , true ) ; logger . debug ( "parsedStringStringValue:{}" , stringStringValue ) ; java . util . List list = objectMapper . readValue ( ( ( "[" + ( stringStringValue . getNormalizedBson ( ) ) ) + "]" ) , java . util . List . class ) ; "<AssertPlaceHolder>" ; java . util . Map < java . lang . String , ? > query1Map = ( ( java . util . Map < java . lang . String , ? > ) ( list . get ( 0 ) ) ) ; java . util . ArrayList objectArray = ( ( java . util . ArrayList ) ( query1Map . get ( "intArray" ) ) ) ; checkValue ( objectArray ) ; } size ( ) { return this . queue . size ( ) ; }
org . junit . Assert . assertEquals ( list . size ( ) , objArray . length )