input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testOutputStreamAppenderToBufferedOutputStream ( ) { final java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; final java . io . OutputStream os = new java . io . BufferedOutputStream ( out ) ; final java . lang . String name = getName ( out ) ; final org . apache . logging . log4j . Logger logger = org . apache . logging . log4j . LogManager . getLogger ( name ) ; addAppender ( os , name ) ; logger . error ( org . apache . logging . log4j . core . appender . OutputStreamAppenderTest . TEST_MSG ) ; final java . lang . String actual = out . toString ( ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { return list . contains ( o ) ; }
org . junit . Assert . assertTrue ( actual , actual . contains ( org . apache . logging . log4j . core . appender . OutputStreamAppenderTest . TEST_MSG ) )
testPriceListGets ( ) { int id = 0 ; try { id = _setupTestPriceList ( false ) ; _checkPriceListIntoDb ( id ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkPriceListIntoDb ( int ) { org . isf . priceslist . model . PriceList foundPriceList ; foundPriceList = ( ( org . isf . priceslist . model . PriceList ) ( org . isf . priceslist . test . Tests . jpa . find ( org . isf . priceslist . model . PriceList . class , id ) ) ) ; org . isf . priceslist . test . Tests . testPriceList . check ( foundPriceList ) ; return ; }
org . junit . Assert . assertEquals ( true , false )
testStopAndWriteTo ( ) { System . out . println ( "stopAndWriteTo" ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; java . io . DataOutputStream dos = new java . io . DataOutputStream ( out ) ; org . netbeans . modules . sampler . Sampler instance = org . netbeans . modules . sampler . Sampler . createSampler ( "cancel" ) ; instance . start ( ) ; instance . stopAndWriteTo ( dos ) ; dos . close ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return paragraph2entry . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( out . size ( ) ) == 0 ) )
SYSOUTSetAltersSysout ( ) { java . io . PrintStream expected = new java . io . PrintStream ( new java . io . ByteArrayOutputStream ( ) ) ; SystemOutput . OUT . set ( expected ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expected , System . out )
testInline ( ) { com . liferay . portal . search . script . Script script = com . liferay . portal . search . script . test . ScriptsInstantiationTest . _scripts . inline ( "painless" , "Math.min(1,<sp>1)" ) ; "<AssertPlaceHolder>" ; } inline ( java . lang . String , java . lang . String ) { return builder ( ) . language ( language ) . idOrCode ( code ) . scriptType ( ScriptType . INLINE ) . build ( ) ; }
org . junit . Assert . assertNotNull ( script )
testAppendInterceptors ( ) { final java . util . List < java . lang . String > called = new java . util . ArrayList ( ) ; jp . vmi . selenium . selenese . inject . Binder . replaceBindModule ( new jp . vmi . selenium . selenese . inject . BindModule ( ) { @ jp . vmi . selenium . selenese . inject . Override protected jp . vmi . selenium . selenese . inject . AbstractExecuteTestSuiteInterceptor [ ] getExecuteTestSuiteInterceptors ( ) { return appendInterceptors ( super . getExecuteTestSuiteInterceptors ( ) , new jp . vmi . selenium . selenese . inject . AbstractExecuteTestSuiteInterceptor ( ) { @ jp . vmi . selenium . selenese . inject . Override protected jp . vmi . selenium . selenese . result . Result invoke ( org . aopalliance . intercept . MethodInvocation invocation , jp . vmi . selenium . selenese . TestSuite testSuite , jp . vmi . selenium . selenese . Selenese parent , jp . vmi . selenium . selenese . Context context ) throws java . lang . Throwable { called . add ( "ExecuteTestSuite1" ) ; jp . vmi . selenium . selenese . result . Result result = ( ( jp . vmi . selenium . selenese . result . Result ) ( invocation . proceed ( ) ) ) ; called . add ( "ExecuteTestSuite2" ) ; return result ; } } ) ; } @ jp . vmi . selenium . selenese . inject . Override protected jp . vmi . selenium . selenese . inject . AbstractExecuteTestCaseInterceptor [ ] getExecuteTestCaseInterceptors ( ) { return appendInterceptors ( super . getExecuteTestCaseInterceptors ( ) , new jp . vmi . selenium . selenese . inject . AbstractExecuteTestCaseInterceptor ( ) { @ jp . vmi . selenium . selenese . inject . Override protected jp . vmi . selenium . selenese . result . Result invoke ( org . aopalliance . intercept . MethodInvocation invocation , jp . vmi . junit . result . ITestCase testCase , jp . vmi . selenium . selenese . Selenese parent , jp . vmi . selenium . selenese . Context context ) throws java . lang . Throwable { called . add ( "ExecuteTestCase1" ) ; jp . vmi . selenium . selenese . result . Result result = ( ( jp . vmi . selenium . selenese . result . Result ) ( invocation . proceed ( ) ) ) ; called . add ( "ExecuteTestCase2" ) ; return result ; } } ) ; } @ jp . vmi . selenium . selenese . inject . Override protected jp . vmi . selenium . selenese . inject . AbstractDoCommandInterceptor [ ] getDoCommandInterceptors ( ) { return appendInterceptors ( super . getDoCommandInterceptors ( ) , new jp . vmi . selenium . selenese . inject . AbstractDoCommandInterceptor ( ) { @ jp . vmi . selenium . selenese . inject . Override protected jp . vmi . selenium . selenese . result . Result invoke ( org . aopalliance . intercept . MethodInvocation invocation , jp . vmi . selenium . selenese . Context context , jp . vmi . selenium . selenese . command . ICommand command , java . lang . String [ ] curArgs ) throws java . lang . Throwable { called . add ( "DoCommand1" ) ; jp . vmi . selenium . selenese . result . Result result = ( ( jp . vmi . selenium . selenese . result . Result ) ( invocation . proceed ( ) ) ) ; called . add ( "DoCommand2" ) ; return result ; } } ) ; } } ) ; execute ( ) ; "<AssertPlaceHolder>" ; } execute ( ) { setWebDriverFactory ( WebDriverManager . HTMLUNIT , new jp . vmi . selenium . webdriver . DriverOptions ( ) ) ; jp . vmi . selenium . selenese . Runner runner = new jp . vmi . selenium . selenese . Runner ( ) ; runner . setDriver ( manager . get ( ) ) ; jp . vmi . selenium . selenese . command . CommandFactory cf = runner . getCommandFactory ( ) ; java . io . File testCaseFile = java . io . File . createTempFile ( "testCase" , ".html" ) ; jp . vmi . selenium . selenese . TestCase testCase = jp . vmi . selenium . selenese . inject . Binder . newTestCase ( SourceType . SELENESE , testCaseFile . getPath ( ) , "testCase" , "http://example.com" ) ; testCase . addCommand ( cf , "echo" , "test<sp>intercepters" ) ; java . io . File testSuiteFile = java . io . File . createTempFile ( "testSuite" , ".html" ) ; jp . vmi . selenium . selenese . TestSuite testSuite = jp . vmi . selenium . selenese . inject . Binder . newTestSuite ( testSuiteFile . getPath ( ) , "testSuite" ) ; testSuite . addSelenese ( testCase ) ; runner . execute ( testSuite ) ; }
org . junit . Assert . assertThat ( called , org . hamcrest . CoreMatchers . is ( org . hamcrest . Matchers . equalTo ( java . util . Arrays . asList ( "ExecuteTestSuite1" , "ExecuteTestCase1" , "DoCommand1" , "DoCommand2" , "ExecuteTestCase2" , "ExecuteTestSuite2" ) ) ) )
testTestSettings_ErrorsFound ( ) { org . pentaho . big . data . kettle . plugins . oozie . OozieJobExecutorControllerTest . TestOozieJobExecutorController ctr = new org . pentaho . big . data . kettle . plugins . oozie . OozieJobExecutorControllerTest . TestOozieJobExecutorController ( ) ; ctr . setConfig ( new org . pentaho . big . data . kettle . plugins . oozie . OozieJobExecutorConfig ( ) ) ; ctr . testSettings ( ) ; "<AssertPlaceHolder>" ; } getShownErrors ( ) { return shownErrors ; }
org . junit . Assert . assertTrue ( ( ( ctr . getShownErrors ( ) . size ( ) ) > 0 ) )
iterator ( ) { int sum = 0 ; org . eclipse . collections . impl . list . mutable . FastList < java . lang . Integer > integers = this . newWith ( 1 , 2 , 3 , 4 ) ; for ( java . lang . Integer each : integers ) { sum += each . intValue ( ) ; } "<AssertPlaceHolder>" ; } intValue ( ) { return ( ( int ) ( this . value ) ) ; }
org . junit . Assert . assertEquals ( 10 , sum )
testNotSample ( ) { com . handu . skye . Sampler sampler = new com . handu . skye . sampler . DefaultSampler ( ) ; boolean isSample = true ; for ( int i = 0 ; i < 101 ; i ++ ) { isSample = sampler . isSample ( ) ; } "<AssertPlaceHolder>" ; } isSample ( ) { java . lang . String traceId = com . handu . skye . Tracer . getTraceId ( ) ; int hash = traceId . hashCode ( ) ; return ( hash % ( overflow ) ) == 0 ; }
org . junit . Assert . assertFalse ( isSample )
equals_differentProperties_shouldBeFalse ( ) { com . vaadin . v7 . data . util . filter . Like like1 = new com . vaadin . v7 . data . util . filter . Like ( "foo" , "test" ) ; com . vaadin . v7 . data . util . filter . Like like2 = new com . vaadin . v7 . data . util . filter . Like ( "bar" , "test" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } else if ( obj instanceof com . vaadin . client . metadata . Property ) { com . vaadin . client . metadata . Property other = ( ( com . vaadin . client . metadata . Property ) ( obj ) ) ; return getSignature ( ) . equals ( other . getSignature ( ) ) ; } else { return false ; } }
org . junit . Assert . assertFalse ( like1 . equals ( like2 ) )
testArrayType_3 ( ) { org . nd4j . linalg . api . shape . options . ArrayOptionsHelper . setOptionBit ( org . nd4j . linalg . options . ArrayOptionsTests . shapeInfo , ArrayType . COMPRESSED ) ; "<AssertPlaceHolder>" ; } arrayType ( long [ ] ) { lombok . val opt = org . nd4j . linalg . api . shape . Shape . options ( shapeInfo ) ; if ( org . nd4j . linalg . api . shape . options . ArrayOptionsHelper . hasBitSet ( opt , org . nd4j . linalg . api . shape . options . ArrayOptionsHelper . ATYPE_SPARSE_BIT ) ) return ArrayType . SPARSE ; else if ( org . nd4j . linalg . api . shape . options . ArrayOptionsHelper . hasBitSet ( opt , org . nd4j . linalg . api . shape . options . ArrayOptionsHelper . ATYPE_COMPRESSED_BIT ) ) return ArrayType . COMPRESSED ; else if ( org . nd4j . linalg . api . shape . options . ArrayOptionsHelper . hasBitSet ( opt , org . nd4j . linalg . api . shape . options . ArrayOptionsHelper . ATYPE_EMPTY_BIT ) ) return ArrayType . EMPTY ; else return ArrayType . DENSE ; }
org . junit . Assert . assertEquals ( ArrayType . COMPRESSED , org . nd4j . linalg . api . shape . options . ArrayOptionsHelper . arrayType ( org . nd4j . linalg . options . ArrayOptionsTests . shapeInfo ) )
test_bounce_short ( ) { short result = server . bounce_short ( ( ( short ) ( 14 ) ) ) ; "<AssertPlaceHolder>" ; } bounce_short ( short ) { return x ; }
org . junit . Assert . assertEquals ( ( ( short ) ( 14 ) ) , result )
convertsEmptyStringToZero ( ) { com . sjl . dsl4xml . support . convert . PrimitiveIntStringConverter _c = new com . sjl . dsl4xml . support . convert . PrimitiveIntStringConverter ( ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { return ( aValue == null ) || ( "" . equals ( aValue ) ) ? 0 : new java . lang . Long ( aValue ) ; }
org . junit . Assert . assertTrue ( ( 0 == ( _c . convert ( "" ) ) ) )
testOneItemsButWillNotSend_ScopeIsHourly ( ) { codeine . jsons . project . ProjectJson projectJson = createProject ( "myproject" ) ; createNotification ( projectJson ) ; createPolicy ( projectJson , "oshai" , AlertsCollectionType . Daily ) ; java . util . List < codeine . mail . NotificationContent > result = tested . prepareMailsToUsers ( AlertsCollectionType . Hourly , projectNameToItems , projects ) ; "<AssertPlaceHolder>" ; } size ( ) { return original . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
shouldBeModifiedWhenDescriptionChanges ( ) { vdb . setDescription ( "new<sp>description" ) ; "<AssertPlaceHolder>" ; } isModified ( ) { return false ; }
org . junit . Assert . assertThat ( vdb . isModified ( ) , org . hamcrest . core . Is . is ( true ) )
test_multi ( ) { final java . util . concurrent . ConcurrentMap < com . zlikun . jee . Singleton2 , java . lang . Boolean > map = new java . util . concurrent . ConcurrentHashMap ( ) ; java . util . concurrent . ExecutorService exec = java . util . concurrent . Executors . newFixedThreadPool ( 200 ) ; final long moment = ( java . lang . System . currentTimeMillis ( ) ) + 1000 ; for ( int i = 0 ; i < 1000 ; i ++ ) { exec . execute ( new java . lang . Runnable ( ) { @ com . zlikun . jee . Override public void run ( ) { while ( true ) { if ( moment < ( java . lang . System . currentTimeMillis ( ) ) ) { map . put ( com . zlikun . jee . Singleton2 . getInstance ( ) , Boolean . TRUE ) ; break ; } } } } ) ; } exec . shutdown ( ) ; while ( ! ( exec . isTerminated ( ) ) ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { if ( ( com . zlikun . jee . Singleton2 . INSTANCE ) == null ) { com . zlikun . jee . Singleton2 . INSTANCE = new com . zlikun . jee . Singleton2 ( ) ; } return com . zlikun . jee . Singleton2 . INSTANCE ; }
org . junit . Assert . assertTrue ( ( ( map . size ( ) ) > 1 ) )
testEqualsSelf ( ) { org . jfree . data . time . TimePeriodValue tpv = new org . jfree . data . time . TimePeriodValue ( new org . jfree . data . time . Day ( ) , 55.75 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( o instanceof com . mysql . fabric . Server ) ) { return false ; } com . mysql . fabric . Server s = ( ( com . mysql . fabric . Server ) ( o ) ) ; return s . getUuid ( ) . equals ( getUuid ( ) ) ; }
org . junit . Assert . assertTrue ( tpv . equals ( tpv ) )
interfaceAddTest ( ) { org . opennms . xmlclient . ClientPropertiesLoader clientProps = new org . opennms . xmlclient . ClientPropertiesLoader ( ) ; clientProps . setPropertiesFilename ( "onmsxmlclient.properties" ) ; org . opennms . xmlclient . OpenNmsXmlClient onmsClient = new org . opennms . xmlclient . OpenNmsXmlClient ( ) ; onmsClient . setOpennmsUrl ( clientProps . getOpennmsUrl ( ) ) ; onmsClient . setPassword ( clientProps . getPassword ( ) ) ; onmsClient . setUsername ( clientProps . getUsername ( ) ) ; java . lang . String foreign_source = clientProps . getForeign_source ( ) ; java . lang . String foreign_id = "node1" ; java . lang . String ip_address = "192.168.0.250" ; "<AssertPlaceHolder>" ; } interfaceAdd ( java . lang . String , java . lang . String , java . lang . String ) { try { org . opennms . client . schema . Interface vInterface = new org . opennms . client . schema . Interface ( ) ; vInterface . setIpAddr ( ip_address ) ; java . io . Writer marshalledStr = new java . io . StringWriter ( ) ; vInterface . marshal ( marshalledStr ) ; log . debug ( ( "interfaceAdd()<sp>XML<sp>message<sp>sent:<sp>" + ( marshalledStr . toString ( ) . replace ( "<" , "\n<" ) ) ) ) ; java . io . Reader data = new java . io . StringReader ( marshalledStr . toString ( ) ) ; java . io . Writer output = new java . io . StringWriter ( ) ; java . net . URL url = new java . net . URL ( ( ( ( ( ( ( ( opennmsUrl ) + ( org . opennms . xmlclient . OpenNmsXmlClient . requisitionCmd ) ) + "/" ) + foreign_source ) + "/nodes/" ) + foreign_id ) + "/interfaces" ) ) ; org . opennms . xmlclient . BasicHttpMethods basicHttpMethods = new org . opennms . xmlclient . BasicHttpMethods ( ) ; basicHttpMethods . setLog ( log ) ; basicHttpMethods . postData ( data , url , output , username , password ) ; log . debug ( ( "interfaceAdd()<sp>Reply:<sp>" + ( output . toString ( ) ) ) ) ; } catch ( java . lang . Throwable ex ) { log . debug ( "interfaceAdd()<sp>Failure<sp>sending<sp>message<sp>Error:<sp>" , ex ) ; return false ; } return true ; }
org . junit . Assert . assertTrue ( onmsClient . interfaceAdd ( foreign_source , foreign_id , ip_address ) )
testCurrent ( ) { org . openscience . cdk . io . cml . CMLModuleStack stack = new org . openscience . cdk . io . cml . CMLModuleStack ( ) ; org . openscience . cdk . io . cml . ICMLModule first = new org . openscience . cdk . io . cml . CMLCoreModule ( ( ( org . openscience . cdk . interfaces . IChemFile ) ( null ) ) ) ; stack . push ( first ) ; "<AssertPlaceHolder>" ; } current ( ) { if ( ( sp ) > 0 ) { return stack [ ( ( sp ) - 1 ) ] ; } else { return null ; } }
org . junit . Assert . assertEquals ( first , stack . current ( ) )
setNullPropertiesReturnsEmptyArgumentList ( ) { org . talend . esb . job . controller . internal . Configuration configuration = new org . talend . esb . job . controller . internal . Configuration ( ) ; configuration . setProperties ( null ) ; java . lang . String [ ] args = configuration . awaitArguments ( ) ; "<AssertPlaceHolder>" ; } awaitArguments ( ) { if ( configAvailable . await ( timeout , TimeUnit . MILLISECONDS ) ) { return argumentList . toArray ( new java . lang . String [ argumentList . size ( ) ] ) ; } else { org . talend . esb . job . controller . internal . Configuration . LOG . warning ( "ConfigAdmin<sp>did<sp>not<sp>pass<sp>any<sp>properties<sp>yet,<sp>returning<sp>an<sp>empty<sp>argument<sp>list." ) ; return org . talend . esb . job . controller . internal . Configuration . EMPTY_ARGUMENTS ; } }
org . junit . Assert . assertArrayEquals ( new java . lang . String [ 0 ] , args )
testNotExistFunction ( ) { org . eclipse . vorto . mapping . engine . model . spec . IMappingSpecification spec = new org . eclipse . vorto . service . mapping . spec . SpecWithConfiguration ( ) ; org . eclipse . vorto . mapping . engine . IDataMapper mapper = org . eclipse . vorto . mapping . engine . IDataMapper . newBuilder ( ) . withSpecification ( spec ) . build ( ) ; org . eclipse . vorto . model . runtime . PropertyValue newValue = org . eclipse . vorto . model . runtime . ModelValueFactory . createFBPropertyValue ( spec . getFunctionBlock ( "button" ) , "enable" , true ) ; org . eclipse . vorto . model . runtime . PropertyValue oldValue = org . eclipse . vorto . model . runtime . ModelValueFactory . createFBPropertyValue ( spec . getFunctionBlock ( "button" ) , "enable" , false ) ; java . lang . Object mapped = mapper . mapTarget ( newValue , java . util . Optional . of ( oldValue ) , "button" ) ; "<AssertPlaceHolder>" ; } of ( java . lang . String ) { if ( value . equalsIgnoreCase ( "admin" ) ) { return org . eclipse . vorto . repository . account . Role . ADMIN ; } else if ( value . startsWith ( org . eclipse . vorto . repository . account . Role . rolePrefix ) ) { return org . eclipse . vorto . repository . account . Role . valueOf ( value . substring ( ( ( value . indexOf ( org . eclipse . vorto . repository . account . Role . rolePrefix ) ) + ( org . eclipse . vorto . repository . account . Role . rolePrefix . length ( ) ) ) ) ) ; } else { return org . eclipse . vorto . repository . account . Role . valueOf ( value ) ; } }
org . junit . Assert . assertEquals ( "1" , mapped )
testConfigurationConstructor ( ) { try ( org . apache . avro . mapred . FsInput in = new org . apache . avro . mapred . FsInput ( new org . apache . hadoop . fs . Path ( org . apache . avro . mapreduce . TestFsInput . file . getPath ( ) ) , conf ) ) { int expectedByteCount = 1 ; byte [ ] readBytes = new byte [ expectedByteCount ] ; int actualByteCount = fsInput . read ( readBytes , 0 , expectedByteCount ) ; "<AssertPlaceHolder>" ; } } read ( java . lang . Object , org . apache . avro . Schema , org . apache . avro . io . ResolvingDecoder ) { java . lang . Object datum = readWithoutConversion ( old , expected , in ) ; org . apache . avro . LogicalType logicalType = expected . getLogicalType ( ) ; if ( logicalType != null ) { org . apache . avro . Conversion < ? > conversion = getData ( ) . getConversionFor ( logicalType ) ; if ( conversion != null ) { return convert ( datum , expected , logicalType , conversion ) ; } } return datum ; }
org . junit . Assert . assertThat ( actualByteCount , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expectedByteCount ) ) )
testBasicStr ( ) { java . lang . String result = org . apache . sqoop . lib . FieldFormatter . escapeAndEnclose ( "foo" , DelimiterSet . DEFAULT_DELIMITERS ) ; "<AssertPlaceHolder>" ; } escapeAndEnclose ( java . lang . String , org . apache . sqoop . lib . DelimiterSet ) { char escape = delimiters . getEscapedBy ( ) ; char enclose = delimiters . getEnclosedBy ( ) ; boolean encloseRequired = delimiters . isEncloseRequired ( ) ; boolean escapingLegal = ( DelimiterSet . NULL_CHAR ) != escape ; java . lang . String withEscapes ; if ( null == str ) { return null ; } if ( escapingLegal ) { withEscapes = str . replace ( ( "" + escape ) , ( ( "" + escape ) + escape ) ) ; } else { withEscapes = str ; } if ( ( DelimiterSet . NULL_CHAR ) == enclose ) { if ( escapingLegal ) { java . lang . String fields = "" + ( delimiters . getFieldsTerminatedBy ( ) ) ; java . lang . String lines = "" + ( delimiters . getLinesTerminatedBy ( ) ) ; withEscapes = withEscapes . replace ( fields , ( ( "" + escape ) + fields ) ) ; withEscapes = withEscapes . replace ( lines , ( ( "" + escape ) + lines ) ) ; } return withEscapes ; } if ( escapingLegal ) { withEscapes = withEscapes . replace ( ( "" + enclose ) , ( ( "" + escape ) + enclose ) ) ; } boolean actuallyDoEnclose = encloseRequired ; if ( ! actuallyDoEnclose ) { char [ ] mustEncloseFor = new char [ 2 ] ; mustEncloseFor [ 0 ] = delimiters . getFieldsTerminatedBy ( ) ; mustEncloseFor [ 1 ] = delimiters . getLinesTerminatedBy ( ) ; for ( char reason : mustEncloseFor ) { if ( ( str . indexOf ( reason ) ) != ( - 1 ) ) { actuallyDoEnclose = true ; break ; } } } if ( actuallyDoEnclose ) { return ( ( "" + enclose ) + withEscapes ) + enclose ; } else { return withEscapes ; } }
org . junit . Assert . assertEquals ( "foo" , result )
testSplit512Length ( ) { java . lang . String packageName = getClass ( ) . getPackage ( ) . getName ( ) . replace ( '.' , '/' ) ; java . io . InputStream resourceAsStream = getClass ( ) . getResourceAsStream ( ( ( "/" + packageName ) + "/Test_Manifest.MF" ) ) ; org . eclipse . xtext . util . MergeableManifest2 manifest = new org . eclipse . xtext . util . MergeableManifest2 ( resourceAsStream ) ; char [ ] buff = new char [ 712 ] ; java . util . Arrays . fill ( buff , 'c' ) ; manifest . addExportedPackages ( java . util . Collections . singleton ( new java . lang . String ( buff ) ) ) ; "<AssertPlaceHolder>" ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; manifest . write ( out ) ; java . lang . String result = out . toString ( ) ; try { new java . util . jar . Manifest ( new org . eclipse . xtext . util . StringInputStream ( result ) ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( "long<sp>line<sp>has<sp>not<sp>been<sp>splitted<sp>into<sp>chunks" ) ; } } isModified ( ) { return modified ; }
org . junit . Assert . assertTrue ( manifest . isModified ( ) )
testLeeg ( ) { final nl . bzk . migratiebrp . conversie . model . brp . BrpStapel < nl . bzk . migratiebrp . conversie . model . brp . groep . BrpBijhoudingInhoud > brpBijhoudingsaard = doMapping ( mapper , nl . bzk . brp . levering . lo3 . support . MetaObjectUtil . maakIngeschrevene ( ) ) ; "<AssertPlaceHolder>" ; } maakIngeschrevene ( ) { return nl . bzk . brp . domain . leveringmodel . MetaObject . maakBuilder ( ) . metObjectElement ( nl . bzk . brp . domain . element . ElementHelper . getObjectElement ( Element . PERSOON . getId ( ) ) ) . metId ( nl . bzk . brp . levering . lo3 . support . MetaObjectUtil . idTeller . getAndIncrement ( ) ) . metGroep ( ) . metGroepElement ( nl . bzk . brp . domain . element . ElementHelper . getGroepElement ( Element . PERSOON_IDENTITEIT . getId ( ) ) ) . metRecord ( ) . metId ( nl . bzk . brp . levering . lo3 . support . MetaObjectUtil . idTeller . getAndIncrement ( ) ) . metAttribuut ( nl . bzk . brp . domain . element . ElementHelper . getAttribuutElement ( Element . PERSOON_SOORTCODE . getId ( ) ) , "I" ) . eindeRecord ( ) . eindeGroep ( ) . eindeObject ( ) ; }
org . junit . Assert . assertNull ( brpBijhoudingsaard )
testIsHotspotInListEmptyList ( ) { org . eclipse . kura . net . admin . NetworkAdminServiceImpl svc = new org . eclipse . kura . net . admin . NetworkAdminServiceImpl ( ) ; java . util . List < org . eclipse . kura . net . wifi . WifiHotspotInfo > list = new java . util . ArrayList ( ) ; boolean result = ( ( boolean ) ( org . eclipse . kura . core . testutil . TestUtil . invokePrivate ( svc , "isHotspotInList" , 1 , "testSSID" , list ) ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertFalse ( result )
testgetEntity ( ) { java . lang . Long id = 1L ; java . lang . String abbrName = "abbr<sp>name" ; java . lang . String name = "name" ; org . lnu . is . domain . department . Department expected = new org . lnu . is . domain . department . Department ( ) ; expected . setId ( id ) ; expected . setAbbrName ( abbrName ) ; expected . setName ( name ) ; when ( defaultDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( expected ) ; org . lnu . is . domain . department . Department actual = unit . getEntity ( id ) ; verify ( defaultDao ) . getEntityById ( id ) ; "<AssertPlaceHolder>" ; } getEntityById ( KEY ) { org . lnu . is . dao . dao . DefaultDao . LOG . info ( "Getting<sp>{}.entity<sp>wit<sp>id" , getEntityClass ( ) . getSimpleName ( ) , id ) ; return persistenceManager . findById ( getEntityClass ( ) , id ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testCountsToCapacity ( ) { for ( int i = 1 ; i <= ( org . fishwife . jrugged . TestWindowedEventCounter . CAPACITY ) ; i ++ ) { impl . mark ( ) ; clock . currentTimeMillis = ( clock . currentTimeMillis ) + 1 ; "<AssertPlaceHolder>" ; } } tally ( ) { long currentTimeMillis = clock . currentTimeMillis ( ) ; final long removeTimesBeforeMillis = currentTimeMillis - ( windowMillis ) ; synchronized ( queue ) { while ( ( ! ( queue . isEmpty ( ) ) ) && ( ( queue . peek ( ) ) < removeTimesBeforeMillis ) ) { queue . removeFirst ( ) ; } return queue . size ( ) ; } }
org . junit . Assert . assertEquals ( i , impl . tally ( ) )
shouldCreateOneInputSet ( ) { org . eclipse . bpmn2 . Task task = org . kie . workbench . common . stunner . bpmn . backend . converters . fromstunner . Factories . bpmn2 . createTask ( ) ; org . kie . workbench . common . stunner . bpmn . backend . converters . fromstunner . properties . ActivityPropertyWriter activityPropertyWriter = new org . kie . workbench . common . stunner . bpmn . backend . converters . fromstunner . properties . ActivityPropertyWriter ( task , new org . kie . workbench . common . stunner . bpmn . backend . converters . fromstunner . properties . FlatVariableScope ( ) ) ; activityPropertyWriter . setAssignmentsInfo ( new org . kie . workbench . common . stunner . bpmn . definition . property . dataio . AssignmentsInfo ( "|A:String|||" ) ) ; java . util . List < org . eclipse . bpmn2 . InputSet > inputSets = task . getIoSpecification ( ) . getInputSets ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return index . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , inputSets . size ( ) )
shouldCreateSplitsOfCountProvidedInOptions ( ) { sourceOptions . forceNumInitialBundles = 20 ; source = new org . apache . beam . sdk . io . synthetic . SyntheticUnboundedSource ( sourceOptions ) ; java . lang . Integer splitCount = source . split ( 100000 , pipeline . getOptions ( ) ) . size ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return tupleTags . size ( ) ; }
org . junit . Assert . assertEquals ( sourceOptions . forceNumInitialBundles , splitCount )
various ( ) { com . querydsl . core . types . dsl . ListPath < com . querydsl . mongodb . Address , com . querydsl . mongodb . QAddress > list = user . addresses ; com . querydsl . core . types . dsl . StringPath str = user . lastName ; com . querydsl . mongodb . List < com . querydsl . core . types . Predicate > predicates = new com . querydsl . mongodb . ArrayList < com . querydsl . core . types . Predicate > ( ) ; predicates . add ( str . between ( "a" , "b" ) ) ; predicates . add ( str . contains ( "a" ) ) ; predicates . add ( str . containsIgnoreCase ( "a" ) ) ; predicates . add ( str . endsWith ( "a" ) ) ; predicates . add ( str . endsWithIgnoreCase ( "a" ) ) ; predicates . add ( str . eq ( "a" ) ) ; predicates . add ( str . equalsIgnoreCase ( "a" ) ) ; predicates . add ( str . goe ( "a" ) ) ; predicates . add ( str . gt ( "a" ) ) ; predicates . add ( str . in ( "a" , "b" , "c" ) ) ; predicates . add ( str . isEmpty ( ) ) ; predicates . add ( str . isNotNull ( ) ) ; predicates . add ( str . isNull ( ) ) ; predicates . add ( str . like ( "a" ) ) ; predicates . add ( str . loe ( "a" ) ) ; predicates . add ( str . lt ( "a" ) ) ; predicates . add ( str . matches ( "a" ) ) ; predicates . add ( str . ne ( "a" ) ) ; predicates . add ( str . notBetween ( "a" , "b" ) ) ; predicates . add ( str . notIn ( "a" , "b" , "c" ) ) ; predicates . add ( str . startsWith ( "a" ) ) ; predicates . add ( str . startsWithIgnoreCase ( "a" ) ) ; predicates . add ( list . isEmpty ( ) ) ; predicates . add ( list . isNotEmpty ( ) ) ; for ( com . querydsl . core . types . Predicate predicate : predicates ) { long count1 = where ( predicate ) . fetchCount ( ) ; long count2 = where ( predicate . not ( ) ) . fetchCount ( ) ; "<AssertPlaceHolder>" ; } } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) . append ( "<sp>sql:" ) . append ( nicerSql ( getSQL ( ) ) ) . append ( "<sp>connection:" ) . append ( ( ( connection ) == null ? "not<sp>connected" : "connected" ) ) . append ( "<sp>entity:" ) . append ( entity ) . append ( "<sp>exception:" ) . append ( exception ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : contextMap . entrySet ( ) ) { sb . append ( "<sp>[" ) . append ( entry . getKey ( ) ) . append ( ":" ) . append ( entry . getValue ( ) ) . append ( "]" ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( predicate . toString ( ) , 4 , ( count1 + count2 ) )
testRemoveValidatorLongitudeNonExist ( ) { "<AssertPlaceHolder>" ; } removeValidator ( com . tech . configurations . tools . ValidationScopes , int ) { if ( i == 0 ) { return false ; } switch ( scope ) { case LONGITUDE : if ( ( com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . LONGITUDE_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . LONGITUDE_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . LONGITUDE_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . LONGITUDE_VALIDATORS . remove ( i ) ; return true ; } return false ; case LATITUDE : if ( ( com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . LATITUDE_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . LATITUDE_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . LATITUDE_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . LATITUDE_VALIDATORS . remove ( i ) ; return true ; } return false ; case ROOM_NAME : if ( ( com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . ROOM_NAME_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . ROOM_NAME_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . ROOM_NAME_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . ROOM_NAME_VALIDATORS . remove ( i ) ; return true ; } return false ; case USER_NAME : if ( ( com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . USER_NAME_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . USER_NAME_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . USER_NAME_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . USER_NAME_VALIDATORS . remove ( i ) ; return true ; } return false ; default : throw new com . tech . exceptions . customexceptions . ValidatorNotListedException ( ) ; } }
org . junit . Assert . assertFalse ( com . tech . models . dtos . chatroom . ChatroomCheckInsideDTO . removeValidator ( ValidationScopes . LONGITUDE , 20 ) )
getCopyOfContextMapIsCopy ( ) { testMDCAdapter . put ( key , value ) ; java . util . Map < java . lang . String , java . lang . String > expected = new java . util . HashMap ( ) ; expected . put ( key , value ) ; java . util . Map actual = testMDCAdapter . getCopyOfContextMap ( ) ; testMDCAdapter . clear ( ) ; "<AssertPlaceHolder>" ; } clear ( ) { value . get ( ) . clear ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testIsSamplesInReverseOrderOk ( ) { "<AssertPlaceHolder>" ; } isSamplesInReverseOrder ( ) { final java . lang . String rawValue = this . properties . get ( org . sump . device . logicsniffer . profile . DeviceProfile . DEVICE_SAMPLE_REVERSE_ORDER ) ; return java . lang . Boolean . parseBoolean ( rawValue ) ; }
org . junit . Assert . assertFalse ( this . profile . isSamplesInReverseOrder ( ) )
testGet_Empty ( ) { byte [ ] row = org . apache . hadoop . hbase . util . Bytes . toBytes ( "row" ) ; byte [ ] fam = org . apache . hadoop . hbase . util . Bytes . toBytes ( "fam" ) ; this . region = initHRegion ( tableName , method , org . apache . hadoop . hbase . regionserver . TestHRegion . CONF , fam ) ; org . apache . hadoop . hbase . client . Get get = new org . apache . hadoop . hbase . client . Get ( row ) ; get . addFamily ( fam ) ; org . apache . hadoop . hbase . client . Result r = region . get ( get ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return pools . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( r . isEmpty ( ) )
filterRemovalLinks_WithoutFilter_DoesNotReturnLink ( ) { com . epimorphics . lda . renderers . common . Resource res = createPageResource ( "_properties=value" ) ; com . epimorphics . lda . renderers . common . Page p = new com . epimorphics . lda . renderers . common . Page ( rm , res ) ; p . initialiseShortNameRenderer ( com . epimorphics . lda . renderers . common . Fixtures . shortNameServiceFixture ( ) ) ; com . epimorphics . lda . renderers . common . List < com . epimorphics . lda . renderers . common . Link > results = p . filterRemovalLinks ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , results . size ( ) )
listOfFrames ( ) { "<AssertPlaceHolder>" ; } listFrames ( ) { return debugger . listFramePaths ( ) ; }
org . junit . Assert . assertEquals ( 4 , driver . listFrames ( ) . size ( ) )
shouldReturnLastIndexBeforeComma ( ) { int position = edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . indexOfWordEnd ( "aa,a" , 0 ) ; "<AssertPlaceHolder>" ; } indexOfWordEnd ( java . lang . String , int ) { checkNotNull ( entityName ) ; checkElementIndex ( startIndex , entityName . length ( ) ) ; final int firstWordChar = edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . indexOfWordChar ( entityName , startIndex ) ; if ( firstWordChar == ( - 1 ) ) { return - 1 ; } int lastIndex = firstWordChar + 1 ; for ( int i = lastIndex ; i < ( entityName . length ( ) ) ; i ++ ) { if ( ( edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . isWordStart ( entityName , i ) ) || ( ! ( edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . getType ( entityName , i ) . isWordLetter ( ) ) ) ) { break ; } lastIndex ++ ; } return lastIndex ; }
org . junit . Assert . assertEquals ( 2 , position )
reindexAndIndexDefnChildRemoval_OAK_2117 ( ) { builder . child ( "testRoot" ) . setProperty ( "foo" , "abc" ) ; org . apache . jackrabbit . oak . spi . state . NodeState before = builder . getNodeState ( ) ; org . apache . jackrabbit . oak . spi . state . NodeBuilder nb = org . apache . jackrabbit . oak . plugins . index . IndexUtils . createIndexDefinition ( builder . child ( org . apache . jackrabbit . oak . plugins . index . IndexConstants . INDEX_DEFINITIONS_NAME ) , "rootIndex" , false , false , com . google . common . collect . ImmutableSet . of ( "foo" ) , null ) ; nb . child ( "prop1" ) . setProperty ( "foo" , "bar" ) ; org . apache . jackrabbit . oak . spi . state . NodeState after = builder . getNodeState ( ) ; org . apache . jackrabbit . oak . spi . state . NodeState indexed = org . apache . jackrabbit . oak . plugins . index . IndexUpdateTest . HOOK . processCommit ( before , after , CommitInfo . EMPTY ) ; org . apache . jackrabbit . oak . spi . state . NodeState ns = org . apache . jackrabbit . oak . plugins . index . IndexUpdateTest . checkPathExists ( indexed , org . apache . jackrabbit . oak . plugins . index . IndexConstants . INDEX_DEFINITIONS_NAME , "rootIndex" ) ; org . apache . jackrabbit . oak . plugins . index . IndexUpdateTest . checkPathExists ( ns , "prop1" ) ; org . apache . jackrabbit . oak . plugins . index . IndexUpdateTest . checkPathExists ( ns , org . apache . jackrabbit . oak . plugins . index . IndexConstants . INDEX_CONTENT_NODE_NAME ) ; org . apache . jackrabbit . oak . plugins . index . property . PropertyIndexLookup lookup = new org . apache . jackrabbit . oak . plugins . index . property . PropertyIndexLookup ( indexed ) ; "<AssertPlaceHolder>" ; } of ( org . apache . jackrabbit . oak . spi . security . ConfigurationParameters ) { org . apache . jackrabbit . oak . spi . security . authentication . external . basic . DefaultSyncConfig cfg = new org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl ( ) . setName ( params . getConfigValue ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_NAME , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_NAME_DEFAULT ) ) ; cfg . user ( ) . setDisableMissing ( params . getConfigValue ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_DISABLE_MISSING_USERS , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_DISABLE_MISSING_USERS_DEFAULT ) ) . setMembershipExpirationTime ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . getMilliSeconds ( params , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_MEMBERSHIP_EXPIRATION_TIME , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_MEMBERSHIP_EXPIRATION_TIME_DEFAULT , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . ONE_HOUR ) ) . setMembershipNestingDepth ( params . getConfigValue ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_MEMBERSHIP_NESTING_DEPTH , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_MEMBERSHIP_NESTING_DEPTH_DEFAULT ) ) . setDynamicMembership ( params . getConfigValue ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_DYNAMIC_MEMBERSHIP , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_DYNAMIC_MEMBERSHIP_DEFAULT ) ) . setExpirationTime ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . getMilliSeconds ( params , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_EXPIRATION_TIME , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_EXPIRATION_TIME_DEFAULT , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . ONE_HOUR ) ) . setApplyRFC7613UsernameCaseMapped ( params . getConfigValue ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_ENABLE_RFC7613_USERCASE_MAPPED_PROFILE , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_ENABLE_RFC7613_USERCASE_MAPPED_PROFILE_DEFAULT ) ) . setPathPrefix ( params . getConfigValue ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_PATH_PREFIX , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_PATH_PREFIX_DEFAULT ) ) . setAutoMembership ( params . getConfigValue ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_AUTO_MEMBERSHIP , org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . PARAM_USER_AUTO_MEMBERSHIP_DEFAULT ) ) . setPropertyMapping ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . DefaultSyncConfigImpl . createMapping ( params . getConfigValue ( org . apache . jackrabbit . oak . spi . security . authentication
org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableSet . of ( "testRoot" ) , find ( lookup , "foo" , "abc" ) )
testGetElement_Nonelement ( ) { org . openscience . cdk . config . XMLIsotopeFactory elfac = org . openscience . cdk . config . XMLIsotopeFactory . getInstance ( new org . openscience . cdk . ChemObject ( ) . getBuilder ( ) ) ; org . openscience . cdk . interfaces . IElement element = elfac . getElement ( "E" ) ; "<AssertPlaceHolder>" ; } getElement ( int ) { return getMajorIsotope ( atomicNumber ) ; }
org . junit . Assert . assertNull ( element )
failoverIsExecutedAfterNonSuccessfulRequest ( ) { org . appenders . log4j2 . elasticsearch . jest . JestHttpObjectFactory . Builder builder = org . appenders . log4j2 . elasticsearch . jest . JestHttpObjectFactoryTest . createTestObjectFactoryBuilder ( ) ; org . appenders . log4j2 . elasticsearch . jest . JestHttpObjectFactory config = spy ( builder . build ( ) ) ; java . lang . String payload1 = "test1" ; java . lang . String payload2 = "test2" ; io . searchbox . core . Bulk bulk = createTestBatch ( payload1 , payload2 ) ; java . util . function . Function < io . searchbox . core . Bulk , java . lang . Boolean > failoverHandler = mock ( java . util . function . Function . class ) ; io . searchbox . client . JestResultHandler < io . searchbox . client . JestResult > resultHandler = config . createResultHandler ( bulk , failoverHandler ) ; io . searchbox . client . JestResult result = mock ( io . searchbox . client . JestResult . class ) ; when ( result . isSucceeded ( ) ) . thenReturn ( false ) ; resultHandler . completed ( result ) ; org . mockito . ArgumentCaptor < io . searchbox . core . Bulk > captor = org . mockito . ArgumentCaptor . forClass ( io . searchbox . core . Bulk . class ) ; verify ( failoverHandler , times ( 1 ) ) . apply ( captor . capture ( ) ) ; "<AssertPlaceHolder>" ; } apply ( org . appenders . log4j2 . elasticsearch . BulkEmitterTest$TestBatch ) { org . appenders . log4j2 . elasticsearch . TestResultHandler < java . lang . Object > jestResultHandler = createResultHandler ( bulk , failureHandler ) ; client . executeAsync ( bulk , jestResultHandler ) ; return true ; }
org . junit . Assert . assertEquals ( bulk , captor . getValue ( ) )
testReload ( ) { java . security . KeyPair kp = org . apache . hadoop . security . ssl . KeyStoreTestUtil . generateKeyPair ( "RSA" ) ; cert1 = org . apache . hadoop . security . ssl . KeyStoreTestUtil . generateCertificate ( "CN=Cert1" , kp , 30 , "SHA1withRSA" ) ; cert2 = org . apache . hadoop . security . ssl . KeyStoreTestUtil . generateCertificate ( "CN=Cert2" , kp , 30 , "SHA1withRSA" ) ; java . lang . String truststoreLocation = ( org . apache . hadoop . security . ssl . TestReloadingX509TrustManager . BASEDIR ) + "/testreload.jks" ; org . apache . hadoop . security . ssl . KeyStoreTestUtil . createTrustStore ( truststoreLocation , "password" , "cert1" , cert1 ) ; final org . apache . hadoop . security . ssl . ReloadingX509TrustManager tm = new org . apache . hadoop . security . ssl . ReloadingX509TrustManager ( "jks" , truststoreLocation , "password" , 10 ) ; try { tm . init ( ) ; "<AssertPlaceHolder>" ; java . lang . Thread . sleep ( ( ( tm . getReloadInterval ( ) ) + 1000 ) ) ; java . util . Map < java . lang . String , java . security . cert . X509Certificate > certs = new java . util . HashMap < java . lang . String , java . security . cert . X509Certificate > ( ) ; certs . put ( "cert1" , cert1 ) ; certs . put ( "cert2" , cert2 ) ; org . apache . hadoop . security . ssl . KeyStoreTestUtil . createTrustStore ( truststoreLocation , "password" , certs ) ; org . apache . hadoop . test . GenericTestUtils . waitFor ( new com . google . common . base . Supplier < java . lang . Boolean > ( ) { @ org . apache . hadoop . security . ssl . Override public org . apache . hadoop . security . ssl . Boolean get ( ) { return ( tm . getAcceptedIssuers ( ) . length ) == 2 ; } } , ( ( int ) ( tm . getReloadInterval ( ) ) ) , 10000 ) ; } finally { tm . destroy ( ) ; } } getAcceptedIssuers ( ) { return null ; }
org . junit . Assert . assertEquals ( 1 , tm . getAcceptedIssuers ( ) . length )
testSeedWithMinMaxQuantifier ( ) { long seed = - 5106534569952410475L ; java . lang . String pattern = "[A-Z]{1,10}" ; com . mifmif . common . regex . Generex firstGenerex = new com . mifmif . common . regex . Generex ( pattern ) ; firstGenerex . setSeed ( seed ) ; java . lang . String firstValue = firstGenerex . random ( ) ; com . mifmif . common . regex . Generex secondGenerex = new com . mifmif . common . regex . Generex ( pattern ) ; secondGenerex . setSeed ( seed ) ; java . lang . String secondValue = secondGenerex . random ( ) ; "<AssertPlaceHolder>" ; } random ( ) { return prepareRandom ( "" , automaton . getInitialState ( ) , 1 , Integer . MAX_VALUE ) ; }
org . junit . Assert . assertEquals ( firstValue , secondValue )
testPartialRadixSortEmpty ( ) { int [ ] data = new int [ ] { } ; int [ ] test = java . util . Arrays . copyOf ( data , data . length ) ; org . roaringbitmap . Util . partialRadixSort ( test ) ; "<AssertPlaceHolder>" ; } partialRadixSort ( int [ ] ) { final int radix = 8 ; int shift = 16 ; int mask = 16711680 ; int [ ] copy = new int [ data . length ] ; int [ ] histogram = new int [ ( 1 << radix ) + 1 ] ; while ( shift < 32 ) { for ( int i = 0 ; i < ( data . length ) ; ++ i ) { ++ ( histogram [ ( ( ( ( data [ i ] ) & mask ) > > > shift ) + 1 ) ] ) ; } for ( int i = 0 ; i < ( 1 << radix ) ; ++ i ) { histogram [ ( i + 1 ) ] += histogram [ i ] ; } for ( int i = 0 ; i < ( data . length ) ; ++ i ) { copy [ ( ( histogram [ ( ( ( data [ i ] ) & mask ) > > > shift ) ] ) ++ ) ] = data [ i ] ; } java . lang . System . arraycopy ( copy , 0 , data , 0 , data . length ) ; shift += radix ; mask <<= radix ; java . util . Arrays . fill ( histogram , 0 ) ; } }
org . junit . Assert . assertArrayEquals ( data , test )
supportsPdIsFalseIfProductIsCoreAndProfileIsSet ( ) { settings . setProduct ( com . opera . core . systems . OperaProduct . CORE ) ; settings . setProfile ( new com . opera . core . systems . OperaProfile ( ) ) ; "<AssertPlaceHolder>" ; } supportsPd ( ) { return ( ! ( getProduct ( ) . is ( com . opera . core . systems . OperaProduct . CORE ) ) ) && ( supportsPd ) ; }
org . junit . Assert . assertFalse ( settings . supportsPd ( ) )
givenWebAppServer_whenHttpRequest_thenStatus200 ( ) { org . eclipse . jetty . server . Server server = com . baeldung . jetty . JettyServerFactory . createWebAppServer ( ) ; server . start ( ) ; int statusCode = sendGetRequest ( ) ; "<AssertPlaceHolder>" ; server . stop ( ) ; } sendGetRequest ( ) { org . apache . http . HttpHost target = new org . apache . http . HttpHost ( "localhost" , JettyServerFactory . SERVER_PORT ) ; org . apache . http . HttpRequest request = new org . apache . http . client . methods . HttpGet ( JettyServerFactory . APP_PATH ) ; org . apache . http . client . HttpClient client = org . apache . http . impl . client . HttpClientBuilder . create ( ) . build ( ) ; org . apache . http . HttpResponse response = client . execute ( target , request ) ; return response . getStatusLine ( ) . getStatusCode ( ) ; }
org . junit . Assert . assertEquals ( 200 , statusCode )
testGetActiveTicklerTextSuggests ( ) { boolean isActive = true ; java . lang . String suggestedTextActive1 = "This<sp>tickler<sp>is<sp>active" ; java . lang . String suggestedTextActive2 = "This<sp>tickler<sp>is<sp>also<sp>active" ; java . lang . String suggestedTextNotActive1 = "This<sp>tickler<sp>is<sp>not<sp>active" ; org . oscarehr . common . model . TicklerTextSuggest tickler1 = new org . oscarehr . common . model . TicklerTextSuggest ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( tickler1 ) ; tickler1 . setActive ( isActive ) ; tickler1 . setSuggestedText ( suggestedTextActive1 ) ; dao . persist ( tickler1 ) ; org . oscarehr . common . model . TicklerTextSuggest tickler2 = new org . oscarehr . common . model . TicklerTextSuggest ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( tickler2 ) ; tickler2 . setActive ( isActive ) ; tickler2 . setSuggestedText ( suggestedTextActive2 ) ; dao . persist ( tickler2 ) ; org . oscarehr . common . model . TicklerTextSuggest tickler3 = new org . oscarehr . common . model . TicklerTextSuggest ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( tickler3 ) ; tickler3 . setActive ( ( ! isActive ) ) ; tickler3 . setSuggestedText ( suggestedTextNotActive1 ) ; dao . persist ( tickler3 ) ; java . util . List < org . oscarehr . common . model . TicklerTextSuggest > expectedResult = new java . util . ArrayList < org . oscarehr . common . model . TicklerTextSuggest > ( java . util . Arrays . asList ( tickler1 , tickler2 ) ) ; java . util . List < org . oscarehr . common . model . TicklerTextSuggest > result = dao . getActiveTicklerTextSuggests ( ) ; 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." + ( result . size ( ) ) ) + "<sp>" ) + ( expectedResult . 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 )
testMetricBadName ( ) { java . util . Set < java . lang . String > errors = validate ( "monitoring/service_badMetricName.mdl" ) ; "<AssertPlaceHolder>" ; } validate ( T ) { return com . google . common . collect . Sets . newHashSet ( ) ; }
org . junit . Assert . assertEquals ( 4 , errors . size ( ) )
testSerialization ( ) { org . jfree . data . function . PolynomialFunction2D f1 = new org . jfree . data . function . PolynomialFunction2D ( new double [ ] { 1.0 , 2.0 } ) ; org . jfree . data . function . PolynomialFunction2D f2 = ( ( org . jfree . data . function . PolynomialFunction2D ) ( org . jfree . chart . TestUtilities . serialised ( f1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( f1 , f2 )
equal_otherClass ( ) { final net . ripe . db . whois . update . domain . NicHandle nicHandle = net . ripe . db . whois . update . domain . NicHandle . parse ( "DW" , source , countryCodes ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; final net . ripe . db . whois . query . QueryParser that = ( ( net . ripe . db . whois . query . QueryParser ) ( o ) ) ; return java . util . Objects . equals ( originalStringQuery , that . originalStringQuery ) ; }
org . junit . Assert . assertFalse ( nicHandle . equals ( "" ) )
testValidatieOK_KindNaarOuder ( ) { final int datumAanvang = 20150101 ; final nl . bzk . brp . bijhouding . bericht . model . RegistratieGeboorteGerelateerdeActieElementTest . RelatieHelper relatieHelper = nl . bzk . brp . bijhouding . bericht . model . RegistratieGeboorteGerelateerdeActieElementTest . RelatieHelper . maakKindNaarOuder ( getBericht ( ) ) ; when ( getBericht ( ) . getEntiteitVoorObjectSleutel ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingBetrokkenheid . class , nl . bzk . brp . bijhouding . bericht . model . RegistratieGeboorteGerelateerdeActieElementTest . IK_BETROKKENHEID_SLEUTEL ) ) . thenReturn ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingBetrokkenheid . decorate ( relatieHelper . ikBetrokkenheid ) ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . Betrokkenheid ouderBetrokkenheid = relatieHelper . gerelateerdeBetrokkenheid ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . BetrokkenheidOuderHistorie ouderHistorie = new nl . bzk . algemeenbrp . dal . domein . brp . entity . BetrokkenheidOuderHistorie ( ouderBetrokkenheid ) ; ouderHistorie . setDatumAanvangGeldigheid ( datumAanvang ) ; ouderBetrokkenheid . addBetrokkenheidOuderHistorie ( ouderHistorie ) ; when ( getBericht ( ) . getEntiteitVoorObjectSleutel ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingBetrokkenheid . class , nl . bzk . brp . bijhouding . bericht . model . RegistratieGeboorteGerelateerdeActieElementTest . GERELATEERDE_BETROKKENHEID_SLEUTEL ) ) . thenReturn ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingBetrokkenheid . decorate ( ouderBetrokkenheid ) ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . Relatie relatie = relatieHelper . relatie ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . RelatieHistorie relatieHistorie = new nl . bzk . algemeenbrp . dal . domein . brp . entity . RelatieHistorie ( relatie ) ; relatieHistorie . setDatumAanvang ( datumAanvang ) ; relatie . addRelatieHistorie ( relatieHistorie ) ; when ( getBericht ( ) . getEntiteitVoorObjectSleutel ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingRelatie . class , nl . bzk . brp . bijhouding . bericht . model . RegistratieGeboorteGerelateerdeActieElementTest . RELATIE_SLEUTEL ) ) . thenReturn ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingRelatie . decorate ( relatie ) ) ; final java . util . List < nl . bzk . brp . bijhouding . bericht . model . MeldingElement > meldingen = maakActieElementOuderNaarKind ( datumAanvang ) . valideerSpecifiekeInhoud ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
testConvertAll ( ) { java . lang . Long parentId = 2L ; org . lnu . is . domain . timeperiod . TimePeriod parent = new org . lnu . is . domain . timeperiod . TimePeriod ( ) ; parent . setId ( parentId ) ; java . lang . Long timePeriodTypeId = 3L ; org . lnu . is . domain . timeperiod . TimePeriodType timePeriodType = new org . lnu . is . domain . timeperiod . TimePeriodType ( ) ; timePeriodType . setId ( timePeriodTypeId ) ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; java . lang . Long id = 1L ; java . lang . String name = "name" ; java . lang . Integer numValue = 1 ; org . lnu . is . domain . timeperiod . TimePeriod source = new org . lnu . is . domain . timeperiod . TimePeriod ( ) ; source . setBegDate ( begDate ) ; source . setEndDate ( endDate ) ; source . setId ( id ) ; source . setName ( name ) ; source . setNumValue ( numValue ) ; source . setParent ( parent ) ; source . setTimePeriodType ( timePeriodType ) ; org . lnu . is . resource . timeperiod . TimePeriodResource expected = new org . lnu . is . resource . timeperiod . TimePeriodResource ( ) ; expected . setBegDate ( begDate ) ; expected . setEndDate ( endDate ) ; expected . setId ( id ) ; expected . setName ( name ) ; expected . setNumValue ( numValue ) ; expected . setParentId ( parentId ) ; expected . setTimePeriodTypeId ( timePeriodTypeId ) ; java . util . Date begDate1 = new java . util . Date ( ) ; java . util . Date endDate1 = new java . util . Date ( ) ; java . lang . Long id1 = 2L ; java . lang . String name1 = "name1" ; java . lang . Integer numValue1 = 2 ; org . lnu . is . domain . timeperiod . TimePeriod source1 = new org . lnu . is . domain . timeperiod . TimePeriod ( ) ; source1 . setBegDate ( begDate1 ) ; source1 . setEndDate ( endDate1 ) ; source1 . setId ( id1 ) ; source1 . setName ( name1 ) ; source1 . setNumValue ( numValue1 ) ; org . lnu . is . resource . timeperiod . TimePeriodResource expected1 = new org . lnu . is . resource . timeperiod . TimePeriodResource ( ) ; expected1 . setBegDate ( begDate1 ) ; expected1 . setEndDate ( endDate1 ) ; expected1 . setId ( id1 ) ; expected1 . setName ( name1 ) ; expected1 . setNumValue ( numValue1 ) ; java . util . List < org . lnu . is . domain . timeperiod . TimePeriod > sources = java . util . Arrays . asList ( source , source1 ) ; java . util . List < org . lnu . is . resource . timeperiod . TimePeriodResource > expecteds = java . util . Arrays . asList ( expected , expected1 ) ; java . util . List < org . lnu . is . resource . timeperiod . TimePeriodResource > actuals = unit . convertAll ( sources ) ; "<AssertPlaceHolder>" ; } convertAll ( java . util . List ) { return convertAll ( sources , new java . util . ArrayList < TARGET > ( sources . size ( ) ) ) ; }
org . junit . Assert . assertEquals ( expecteds , actuals )
singleBlankNode ( ) { final org . eclipse . rdf4j . query . algebra . MultiProjection multiProjection = org . apache . rya . api . function . projection . MultiProjectionEvaluatorTest . getMultiProjection ( ( "CONSTRUCT<sp>{" + ( ( ( ( ( ( ( "predicate" 3 + "predicate" 8 ) + "<urn:direction><sp>?direction<sp>;<sp>" ) + "predicate" 7 ) + "WHERE<sp>{" ) + "predicate" 6 ) + "predicate" 5 ) + "predicate" 7 ) ) ) ; final org . eclipse . rdf4j . model . ValueFactory vf = org . eclipse . rdf4j . model . impl . SimpleValueFactory . getInstance ( ) ; org . eclipse . rdf4j . query . impl . MapBindingSet bs = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; bs . addBinding ( "location" , vf . createLiteral ( "predicate" 4 ) ) ; bs . addBinding ( "direction" , vf . createLiteral ( "NW" ) ) ; final org . apache . rya . api . model . VisibilityBindingSet original = new org . apache . rya . api . model . VisibilityBindingSet ( bs , "predicate" 1 ) ; final java . util . Set < org . apache . rya . api . model . VisibilityBindingSet > expected = new java . util . HashSet ( ) ; final java . lang . String blankNodeId = java . util . UUID . randomUUID ( ) . toString ( ) ; final org . eclipse . rdf4j . model . BNode blankNode = vf . createBNode ( blankNodeId ) ; bs = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; bs . addBinding ( "predicate" 2 , blankNode ) ; bs . addBinding ( "predicate" , RDF . TYPE ) ; bs . addBinding ( "object" , vf . createIRI ( "predicate" 0 ) ) ; expected . add ( new org . apache . rya . api . model . VisibilityBindingSet ( bs , "predicate" 1 ) ) ; bs = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; bs . addBinding ( "predicate" 2 , blankNode ) ; bs . addBinding ( "predicate" , vf . createIRI ( "urn:location" ) ) ; bs . addBinding ( "object" , vf . createLiteral ( "predicate" 4 ) ) ; expected . add ( new org . apache . rya . api . model . VisibilityBindingSet ( bs , "predicate" 1 ) ) ; bs = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; bs . addBinding ( "predicate" 2 , blankNode ) ; bs . addBinding ( "predicate" , vf . createIRI ( "urn:direction" ) ) ; bs . addBinding ( "object" , vf . createLiteral ( "NW" ) ) ; expected . add ( new org . apache . rya . api . model . VisibilityBindingSet ( bs , "predicate" 1 ) ) ; final java . util . Set < org . apache . rya . api . model . VisibilityBindingSet > results = org . apache . rya . api . function . projection . MultiProjectionEvaluator . make ( multiProjection , ( ) -> blankNodeId ) . project ( original ) ; "<AssertPlaceHolder>" ; } project ( java . lang . Iterable ) { if ( ( projections == null ) || ( ! ( projections . iterator ( ) . hasNext ( ) ) ) ) { return false ; } final java . util . List < org . bson . conversions . Bson > projectOpts = new java . util . LinkedList ( ) ; final java . util . Set < java . lang . String > bindingNamesUnion = new java . util . HashSet ( ) ; java . util . Set < java . lang . String > bindingNamesIntersection = null ; for ( final org . eclipse . rdf4j . query . algebra . ProjectionElemList projection : projections ) { if ( projection . getElements ( ) . isEmpty ( ) ) { return false ; } final org . bson . Document valueDoc = new org . bson . Document ( ) ; final org . bson . Document hashDoc = new org . bson . Document ( ) ; final org . bson . Document typeDoc = new org . bson . Document ( ) ; final java . util . Set < java . lang . String > projectionBindingNames = new java . util . HashSet ( ) ; for ( final org . eclipse . rdf4j . query . algebra . ProjectionElem elem : projection . getElements ( ) ) { java . lang . String to = elem . getTargetName ( ) ; if ( ! ( org . apache . rya . mongodb . aggregation . AggregationPipelineQueryNode . isValidFieldName ( to ) ) ) { to = replace ( to ) ; } java . lang . String from = elem . getSourceName ( ) ; if ( varToOriginalName . containsValue ( from ) ) { from = varToOriginalName . inverse ( ) . get ( from ) ; } projectionBindingNames . add ( to ) ; if ( to . equals ( from ) ) { valueDoc . append ( to , 1 ) ; hashDoc . append ( to , 1 ) ; typeDoc . append ( to , 1 ) ; } else { valueDoc . append ( to , org . apache . rya . mongodb . aggregation . AggregationPipelineQueryNode . valueFieldExpr ( from ) ) ; hashDoc . append ( to , org . apache . rya . mongodb . aggregation . AggregationPipelineQueryNode . hashFieldExpr ( from ) ) ; typeDoc . append ( to , org . apache . rya . mongodb . aggregation . AggregationPipelineQueryNode . typeFieldExpr ( from ) ) ; } } bindingNamesUnion . addAll ( projectionBindingNames ) ; if
org . junit . Assert . assertEquals ( expected , results )
testCaseOverInlineView ( ) { java . lang . String sql = "SELECT<sp>CASE<sp>WHEN<sp>x<sp>><sp>0<sp>THEN<sp>1.0<sp>ELSE<sp>2.0<sp>END<sp>FROM<sp>(SELECT<sp>e2<sp>AS<sp>x<sp>FROM<sp>pm1.g1)<sp>AS<sp>g" ; org . teiid . query . sql . lang . Command c = helpResolve ( sql ) ; "<AssertPlaceHolder>" ; verifyProjectedTypes ( c , new java . lang . Class [ ] { org . teiid . query . resolver . v7 . Double . class } ) ; } toString ( ) { if ( eIsProxy ( ) ) return super . toString ( ) ; java . lang . StringBuffer result = new java . lang . StringBuffer ( super . toString ( ) ) ; result . append ( "<sp>(description:<sp>" ) ; result . append ( description ) ; result . append ( ",<sp>keywords:<sp>" ) ; result . append ( keywords ) ; result . append ( ')' ) ; return result . toString ( ) ; }
org . junit . Assert . assertEquals ( sql , c . toString ( ) )
defaultToRemoteProxy ( ) { java . util . Map < java . lang . String , java . lang . Object > app1 = new java . util . HashMap ( ) ; app1 . put ( CapabilityType . APPLICATION_NAME , "app1" ) ; org . openqa . grid . internal . utils . configuration . GridNodeConfiguration config = new org . openqa . grid . internal . utils . configuration . GridNodeConfiguration ( ) ; config . capabilities . clear ( ) ; config . proxy = null ; config . capabilities . add ( new org . openqa . selenium . remote . DesiredCapabilities ( app1 ) ) ; org . openqa . grid . internal . RemoteProxy p = org . openqa . grid . internal . BaseRemoteProxy . getNewInstance ( new org . openqa . grid . common . RegistrationRequest ( config ) , registry ) ; "<AssertPlaceHolder>" ; } getNewInstance ( org . openqa . grid . common . RegistrationRequest , org . openqa . grid . internal . GridRegistry ) { try { java . lang . String proxyClass = request . getConfiguration ( ) . proxy ; if ( proxyClass == null ) { org . openqa . grid . internal . BaseRemoteProxy . log . fine ( "No<sp>proxy<sp>class.<sp>Using<sp>default" ) ; proxyClass = org . openqa . grid . internal . BaseRemoteProxy . class . getCanonicalName ( ) ; } java . lang . Class < ? > clazz = java . lang . Class . forName ( proxyClass ) ; org . openqa . grid . internal . BaseRemoteProxy . log . fine ( ( "Using<sp>class<sp>" + ( clazz . getName ( ) ) ) ) ; java . lang . Object [ ] args = new java . lang . Object [ ] { request , registry } ; java . lang . Class < ? > [ ] argsClass = new java . lang . Class [ ] { org . openqa . grid . common . RegistrationRequest . class , org . openqa . grid . internal . GridRegistry . class } ; java . lang . reflect . Constructor < ? > c = clazz . getConstructor ( argsClass ) ; java . lang . Object proxy = c . newInstance ( args ) ; if ( proxy instanceof org . openqa . grid . internal . RemoteProxy ) { ( ( org . openqa . grid . internal . RemoteProxy ) ( proxy ) ) . setupTimeoutListener ( ) ; return ( ( T ) ( proxy ) ) ; } throw new java . security . InvalidParameterException ( ( ( "Error:<sp>" + ( proxy . getClass ( ) ) ) + "<sp>isn't<sp>a<sp>remote<sp>proxy" ) ) ; } catch ( java . lang . reflect . InvocationTargetException e ) { throw new java . security . InvalidParameterException ( ( "Error:<sp>" + ( e . getTargetException ( ) . getMessage ( ) ) ) ) ; } catch ( java . lang . Exception e ) { throw new java . security . InvalidParameterException ( ( "Error:<sp>" + ( e . getMessage ( ) ) ) ) ; } }
org . junit . Assert . assertEquals ( org . openqa . grid . internal . BaseRemoteProxy . class , p . getClass ( ) )
testConnectionContextWithBareRemoting ( ) { org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . configureServerSideForInboundBareRemoting ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . serverSideMCC ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddOutboundSocketBindingOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OUTBOUND_SOCKET_BINDING , org . jboss . as . test . shared . TestSuiteEnvironment . getServerAddress ( ) , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . BARE_REMOTING_PORT ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddAuthenticationConfigurationOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_AUTH_CONFIG , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . BARE_REMOTING_PROTOCOL , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . PROPERTIES_REALM , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_USERNAME , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_PASSWORD ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddAuthenticationContextOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_AUTH_CONTEXT , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_AUTH_CONFIG ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddConnectionOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . REMOTE_OUTBOUND_CONNECTION , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OUTBOUND_SOCKET_BINDING , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_AUTH_CONTEXT ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . executeBlockingReloadClientServer ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC ) ; deployer . deploy ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . EJB_SERVER_DEPLOYMENT ) ; deployer . deploy ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . EJB_CLIENT_DEPLOYMENT ) ; "<AssertPlaceHolder>" ; } callIntermediateWhoAmI ( ) { org . wildfly . security . auth . client . AuthenticationConfiguration common = org . wildfly . security . auth . client . AuthenticationConfiguration . empty ( ) . useProviders ( ( ) -> new java . security . Provider [ ] { new org . wildfly . security . WildFlyElytronProvider ( ) } ) . setSaslMechanismSelector ( SaslMechanismSelector . ALL ) ; org . wildfly . security . auth . client . AuthenticationContext authCtxEmpty = org . wildfly . security . auth . client . AuthenticationContext . empty ( ) ; final org . wildfly . security . auth . client . AuthenticationContext authCtx = authCtxEmpty . with ( MatchRule . ALL , common ) ; final org . jboss . ejb . client . EJBClientContext . Builder ejbClientBuilder = new org . jboss . ejb . client . EJBClientContext . Builder ( ) ; ejbClientBuilder . addTransportProvider ( new org . jboss . ejb . protocol . remote . RemoteTransportProvider ( ) ) ; final org . jboss . ejb . client . EJBClientConnection . Builder connBuilder = new org . jboss . ejb . client . EJBClientConnection . Builder ( ) ; connBuilder . setDestination ( java . net . URI . create ( ( ( "remote+http://" + ( org . jboss . as . test . shared . TestSuiteEnvironment . getServerAddressNode1 ( ) ) ) + ":8180" ) )
org . junit . Assert . assertEquals ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_USERNAME , callIntermediateWhoAmI ( ) )
isConstructorShouldReturnTrueWhenMethodIsRegularMethod ( ) { final org . pitest . mutationtest . engine . gregor . MethodInfo testee = this . methodInfo . withMethodName ( "toString" ) ; "<AssertPlaceHolder>" ; } isConstructor ( ) { return org . pitest . mutationtest . engine . gregor . MethodInfo . isConstructor ( this . methodName ) ; }
org . junit . Assert . assertThat ( testee . isConstructor ( ) , org . hamcrest . Matchers . is ( false ) )
example07 ( ) { "<AssertPlaceHolder>" ; } example07 ( ) { org . junit . Assert . assertEquals ( 4.6904F , org . simmetrics . example . StringDistanceBuilderExample . example07 ( ) , org . simmetrics . example . StringDistanceBuilderExampleTest . DELTA ) ; }
org . junit . Assert . assertEquals ( 4.6904F , org . simmetrics . example . StringDistanceBuilderExample . example07 ( ) , org . simmetrics . example . StringDistanceBuilderExampleTest . DELTA )
readWrite_wrongType ( ) { log . warn ( "Attribute<sp>to<sp>write<sp>is<sp>not<sp>in<sp>whitelist:<sp>name={},<sp>type={}" , "bbb" , "java.lang.Integer" ) ; log . warn ( "Attribute<sp>to<sp>read<sp>is<sp>not<sp>in<sp>whitelist:<sp>name={},<sp>type={}" , "bbb" , "java.lang.Integer" ) ; replay ( log ) ; session . setAttribute ( "bbb" , 123 ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { java . lang . Object value = context . get ( name ) ; if ( value == null ) { value = getRequest ( ) . getAttribute ( name ) ; } return value ; }
org . junit . Assert . assertEquals ( 123 , session . getAttribute ( "bbb" ) )
testTPFSWithDateTimestamp ( ) { java . util . TimeZone . setDefault ( java . util . TimeZone . getTimeZone ( "UTC" ) ) ; final io . cdap . cdap . proto . id . DatasetId datasetInstanceId = io . cdap . cdap . explore . service . NAMESPACE_ID . dataset ( "2018-09-07<sp>16:09:50.595" 5 ) ; final java . lang . String tableName = getDatasetHiveName ( datasetInstanceId ) ; final io . cdap . cdap . api . data . schema . Schema dtSchema = io . cdap . cdap . api . data . schema . Schema . recordOf ( "dt" , Schema . Field . of ( "dt" 9 , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . INT ) ) , Schema . Field . of ( "2018-09-07<sp>16:09:50.595" 0 , io . cdap . cdap . api . data . schema . Schema . nullableOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) ) , Schema . Field . of ( "dt" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . LogicalType . DATE ) ) , Schema . Field . of ( "ts" , io . cdap . cdap . api . data . schema . Schema . nullableOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . LogicalType . TIMESTAMP_MILLIS ) ) ) ) ; datasetFramework . addInstance ( "dt" 0 , datasetInstanceId , io . cdap . cdap . api . dataset . lib . FileSetProperties . builder ( ) . setBasePath ( "dt" 5 ) . setEnableExploreOnCreate ( true ) . setSerDe ( "dt" 6 ) . setExploreInputFormat ( "2018-09-07<sp>16:09:50.595" 3 ) . setExploreOutputFormat ( "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat" ) . setTableProperty ( "avro.schema.literal" , dtSchema . toString ( ) ) . build ( ) ) ; runCommand ( io . cdap . cdap . explore . service . NAMESPACE_ID , "show<sp>tables" , true , com . google . common . collect . Lists . newArrayList ( new io . cdap . cdap . proto . ColumnDesc ( "dt" 2 , "dt" 8 , 1 , "from<sp>deserializer" ) ) , com . google . common . collect . Lists . newArrayList ( new io . cdap . cdap . proto . QueryResult ( com . google . common . collect . Lists . newArrayList ( tableName ) ) ) ) ; io . cdap . cdap . api . dataset . lib . TimePartitionedFileSet tpfs = datasetFramework . getDataset ( datasetInstanceId , DatasetDefinition . NO_ARGUMENTS , null ) ; "<AssertPlaceHolder>" ; org . apache . twill . filesystem . Location location1 = tpfs . getEmbeddedFileSet ( ) . getLocation ( "file1/nn" ) ; generateAvroFile ( location1 . getOutputStream ( ) , dtSchema ) ; long time1 = io . cdap . cdap . explore . service . HiveExploreServiceFileSetTestRun . DATE_FORMAT . parse ( "dt" 3 ) . getTime ( ) ; addTimePartition ( tpfs , time1 , "dt" 1 ) ; runCommand ( io . cdap . cdap . explore . service . NAMESPACE_ID , ( ( "SELECT<sp>id,<sp>name,<sp>dt,<sp>ts<sp>FROM<sp>" + tableName ) + "dt" 7 ) , true , com . google . common . collect . Lists . newArrayList ( new io . cdap . cdap . proto . ColumnDesc ( "dt" 9 , "2018-09-07<sp>16:09:50.595" 4 , 1 , null ) , new io . cdap . cdap . proto . ColumnDesc ( "2018-09-07<sp>16:09:50.595" 0 , "dt" 8 , 2 , null ) , new io . cdap . cdap . proto . ColumnDesc ( "dt" , "dt" 4 , 3 , null ) , new io . cdap . cdap . proto . ColumnDesc ( "ts" , "2018-09-07<sp>16:09:50.595" 1 , 4 , null ) ) , com . google . common . collect . Lists . newArrayList ( new io . cdap . cdap . proto . QueryResult ( com . google . common . collect . Lists . newArrayList ( 1 , "2018-09-07<sp>16:09:50.595" 2 , "2018-09-07<sp>16:09:50.595" 6 , "2018-09-07<sp>16:09:50.595" ) ) ) ) ; datasetFramework . deleteInstance ( datasetInstanceId ) ; runCommand ( io . cdap . cdap . explore . service . NAMESPACE_ID , "show<sp>tables" , false , com . google . common . collect . Lists . newArrayList ( new io . cdap . cdap . proto . ColumnDesc ( "dt" 2 , "dt" 8 , 1 , "from<sp>deserializer" ) ) , java . util . Collections . emptyList ( ) ) ; datasetFramework . addInstance ( "dt" 0 , datasetInstanceId , io . cdap . cdap . api . dataset . lib . FileSetProperties . builder ( ) . setBasePath ( "dt" 5 ) . setEnableExploreOnCreate ( true ) . setSerDe ( "dt" 6 ) . setExploreInputFormat ( "2018-09-07<sp>16:09:50.595" 3 ) . setExploreOutputFormat ( "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat" ) . setTableProperty ( "avro.schema.literal" , dtSchema . toString ( ) ) . build ( ) ) ; runCommand ( io . cdap . cdap . explore . service . NAMESPACE_ID , "show<sp>tables" , true , com . google . common . collect . Lists . newArrayList ( new io . cdap . cdap . proto . ColumnDesc ( "dt" 2 , "dt" 8 , 1 , "from<sp>deserializer" ) ) , com . google . common . collect . Lists . newArrayList ( new io . cdap . cdap . proto . QueryResult ( com . google . common . collect . Lists . newArrayList ( tableName ) ) ) ) ; } getDataset ( java . lang . String , java . util . Map , io . cdap . cdap . data2 . metadata . lineage . AccessType ) { T dataset = super . getDataset ( name , adjustRuntimeArguments ( arguments ) , accessType ) ; startDatasetTransaction ( dataset ) ; return dataset ; }
org . junit . Assert . assertNotNull ( tpfs )
shouldGetAUser ( ) { org . apache . ibatis . session . SqlSession sqlSession = org . apache . ibatis . submitted . primitives . PrimitivesTest . sqlSessionFactory . openSession ( ) ; try { org . apache . ibatis . submitted . primitives . Mapper mapper = sqlSession . getMapper ( org . apache . ibatis . submitted . primitives . Mapper . class ) ; java . util . List < org . apache . ibatis . submitted . primitives . Assetright > assetrights = mapper . select ( ) ; "<AssertPlaceHolder>" ; } finally { sqlSession . close ( ) ; } } size ( ) { return loaderMap . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , assetrights . size ( ) )
testRoundtrip ( ) { java . util . List < org . semanticweb . elk . owl . iris . ElkPrefix > prefixes = new java . util . ArrayList < org . semanticweb . elk . owl . iris . ElkPrefix > ( ) ; java . util . Collection < ? extends org . semanticweb . elk . owl . interfaces . ElkObject > elkObjects = getOriginalElkObjects ( prefixes ) ; java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; for ( org . semanticweb . elk . owl . interfaces . ElkObject elkObject : elkObjects ) { if ( elkObject instanceof org . semanticweb . elk . owl . interfaces . ElkSWRLRule ) { System . out . println ( "" ) ; } org . semanticweb . elk . owl . printers . OwlFunctionalStylePrinter . append ( builder , elkObject ) ; builder . append ( java . lang . System . getProperty ( "line.separator" ) ) ; } java . util . Collection < ? extends org . semanticweb . elk . owl . interfaces . ElkObject > loadedElkObjects = loadPrintedElkObjects ( builder . toString ( ) , prefixes ) ; "<AssertPlaceHolder>" ; } size ( ) { return contextCount . get ( ) ; }
org . junit . Assert . assertEquals ( elkObjects . size ( ) , loadedElkObjects . size ( ) )
testRawFilterWithNullObject ( ) { com . mitchellbosecke . pebble . PebbleEngine pebble = new com . mitchellbosecke . pebble . PebbleEngine . Builder ( ) . loader ( new com . mitchellbosecke . pebble . loader . StringLoader ( ) ) . strictVariables ( false ) . build ( ) ; com . mitchellbosecke . pebble . template . PebbleTemplate template = pebble . getTemplate ( "{{<sp>text<sp>|<sp>raw<sp>}}" ) ; java . io . Writer writer = new java . io . StringWriter ( ) ; template . evaluate ( writer , new java . util . HashMap ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( "" , writer . toString ( ) )
getSignerType ( ) { com . aliyuncs . auth . HmacSHA1Signer signer = new com . aliyuncs . auth . HmacSHA1Signer ( ) ; "<AssertPlaceHolder>" ; } getSignerType ( ) { return "BEARERTOKEN" ; }
org . junit . Assert . assertNull ( signer . getSignerType ( ) )
testFormatWithCustomSeparator ( ) { org . apache . hadoop . mapred . JobConf job = new org . apache . hadoop . mapred . JobConf ( ) ; java . lang . String separator = "" ; job . set ( "mapreduce.output.textoutputformat.separator" , separator ) ; job . set ( JobContext . TASK_ATTEMPT_ID , org . apache . hadoop . mapred . TestTextOutputFormat . attempt ) ; org . apache . hadoop . mapred . FileOutputFormat . setOutputPath ( job , org . apache . hadoop . mapred . TestTextOutputFormat . workDir . getParent ( ) . getParent ( ) ) ; org . apache . hadoop . mapred . FileOutputFormat . setWorkOutputPath ( job , org . apache . hadoop . mapred . TestTextOutputFormat . workDir ) ; org . apache . hadoop . fs . FileSystem fs = org . apache . hadoop . mapred . TestTextOutputFormat . workDir . getFileSystem ( job ) ; if ( ! ( fs . mkdirs ( org . apache . hadoop . mapred . TestTextOutputFormat . workDir ) ) ) { org . junit . Assert . fail ( "Failed<sp>to<sp>create<sp>output<sp>directory" ) ; } java . lang . String file = "test_custom.txt" ; org . apache . hadoop . mapred . Reporter reporter = Reporter . NULL ; org . apache . hadoop . mapred . TextOutputFormat < java . lang . Object , java . lang . Object > theOutputFormat = new org . apache . hadoop . mapred . TextOutputFormat < java . lang . Object , java . lang . Object > ( ) ; org . apache . hadoop . mapred . RecordWriter < java . lang . Object , java . lang . Object > theRecordWriter = theOutputFormat . getRecordWriter ( org . apache . hadoop . mapred . TestTextOutputFormat . localFs , job , file , reporter ) ; org . apache . hadoop . io . Text key1 = new org . apache . hadoop . io . Text ( "key1" ) ; org . apache . hadoop . io . Text key2 = new org . apache . hadoop . io . Text ( "key2" ) ; org . apache . hadoop . io . Text val1 = new org . apache . hadoop . io . Text ( "val1" ) ; org . apache . hadoop . io . Text val2 = new org . apache . hadoop . io . Text ( "val2" ) ; org . apache . hadoop . io . NullWritable nullWritable = org . apache . hadoop . io . NullWritable . get ( ) ; try { theRecordWriter . write ( key1 , val1 ) ; theRecordWriter . write ( null , nullWritable ) ; theRecordWriter . write ( null , val1 ) ; theRecordWriter . write ( nullWritable , val2 ) ; theRecordWriter . write ( key2 , nullWritable ) ; theRecordWriter . write ( key1 , null ) ; theRecordWriter . write ( null , null ) ; theRecordWriter . write ( key2 , val2 ) ; } finally { theRecordWriter . close ( reporter ) ; } java . io . File expectedFile = new java . io . File ( new org . apache . hadoop . fs . Path ( org . apache . hadoop . mapred . TestTextOutputFormat . workDir , file ) . toString ( ) ) ; java . lang . StringBuffer expectedOutput = new java . lang . StringBuffer ( ) ; expectedOutput . append ( key1 ) . append ( separator ) . append ( val1 ) . append ( "\n" ) ; expectedOutput . append ( val1 ) . append ( "\n" ) ; expectedOutput . append ( val2 ) . append ( "\n" ) ; expectedOutput . append ( key2 ) . append ( "\n" ) ; expectedOutput . append ( key1 ) . append ( "\n" ) ; expectedOutput . append ( key2 ) . append ( separator ) . append ( val2 ) . append ( "\n" ) ; java . lang . String output = org . apache . hadoop . mapred . UtilsForTests . slurp ( expectedFile ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( ( json ) == null ) { return "Test<sp>codec<sp>" + ( id ) ; } else { return json . toString ( ) ; } }
org . junit . Assert . assertEquals ( expectedOutput . toString ( ) , output )
squarePlanar4ShapeTest ( ) { org . openscience . cdk . interfaces . IAtom atomA = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 1 , 2 , 0 ) ) ; org . openscience . cdk . interfaces . IAtom atomB = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 2 , 1 , 0 ) ) ; org . openscience . cdk . interfaces . IAtom atomC = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 2 , 2 , 0 ) ) ; org . openscience . cdk . interfaces . IAtom atomD = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 1 , 1 , 0 ) ) ; org . openscience . cdk . stereo . StereoTool . SquarePlanarShape shape = org . openscience . cdk . stereo . StereoTool . getSquarePlanarShape ( atomA , atomB , atomC , atomD ) ; "<AssertPlaceHolder>" ; } getSquarePlanarShape ( org . openscience . cdk . interfaces . IAtom , org . openscience . cdk . interfaces . IAtom , org . openscience . cdk . interfaces . IAtom , org . openscience . cdk . interfaces . IAtom ) { javax . vecmath . Point3d pointA = atomA . getPoint3d ( ) ; javax . vecmath . Point3d pointB = atomB . getPoint3d ( ) ; javax . vecmath . Point3d pointC = atomC . getPoint3d ( ) ; javax . vecmath . Point3d pointD = atomD . getPoint3d ( ) ; javax . vecmath . Vector3d normalA = new javax . vecmath . Vector3d ( ) ; javax . vecmath . Vector3d normalB = new javax . vecmath . Vector3d ( ) ; javax . vecmath . Vector3d normalC = new javax . vecmath . Vector3d ( ) ; javax . vecmath . Vector3d tmpX = new javax . vecmath . Vector3d ( ) ; javax . vecmath . Vector3d tmpY = new javax . vecmath . Vector3d ( ) ; org . openscience . cdk . stereo . StereoTool . getRawNormal ( pointA , pointB , pointC , normalA , tmpX , tmpY ) ; org . openscience . cdk . stereo . StereoTool . getRawNormal ( pointB , pointC , pointD , normalB , tmpX , tmpY ) ; org . openscience . cdk . stereo . StereoTool . getRawNormal ( pointC , pointD , pointA , normalC , tmpX , tmpY ) ; normalA . normalize ( ) ; normalB . normalize ( ) ; normalC . normalize ( ) ; double aDotB = normalA . dot ( normalB ) ; double aDotC = normalA . dot ( normalC ) ; double bDotC = normalB . dot ( normalC ) ; if ( ( ( aDotB > 0 ) && ( aDotC > 0 ) ) && ( bDotC > 0 ) ) { return org . openscience . cdk . stereo . StereoTool . SquarePlanarShape . U_SHAPE ; } else if ( ( ( aDotB > 0 ) && ( aDotC < 0 ) ) && ( bDotC < 0 ) ) { return org . openscience . cdk . stereo . StereoTool . SquarePlanarShape . FOUR_SHAPE ; } else { return org . openscience . cdk . stereo . StereoTool . SquarePlanarShape . Z_SHAPE ; } }
org . junit . Assert . assertEquals ( SquarePlanarShape . FOUR_SHAPE , shape )
testCompletenessOfSpecifiedBoundProcessor ( ) { org . apache . taverna . scufl2 . api . profiles . ProcessorBinding pb = new org . apache . taverna . scufl2 . api . profiles . ProcessorBinding ( ) ; pb . setBoundProcessor ( new org . apache . taverna . scufl2 . api . core . Processor ( ) ) ; org . apache . taverna . scufl2 . validation . correctness . CorrectnessValidator cv = new org . apache . taverna . scufl2 . validation . correctness . CorrectnessValidator ( ) ; org . apache . taverna . scufl2 . validation . correctness . ReportCorrectnessValidationListener rcvl = new org . apache . taverna . scufl2 . validation . correctness . ReportCorrectnessValidationListener ( ) ; cv . checkCorrectness ( pb , true , rcvl ) ; java . util . Set < org . apache . taverna . scufl2 . validation . correctness . report . NullFieldProblem > nullFieldProblems = rcvl . getNullFieldProblems ( ) ; boolean problem = false ; for ( org . apache . taverna . scufl2 . validation . correctness . report . NullFieldProblem nlp : nullFieldProblems ) { if ( ( nlp . getBean ( ) . equals ( pb ) ) && ( nlp . getFieldName ( ) . equals ( "boundProcessor" ) ) ) { problem = true ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return ( getClass ( ) ) == ( obj . getClass ( ) ) ; }
org . junit . Assert . assertFalse ( problem )
TestSeparatorEmittedForEmptyIteratorValue2 ( ) { org . stringtemplate . v4 . ST st = new org . stringtemplate . v4 . ST ( "<values;<sp>separator=\"<sp>\">" ) ; st . add ( "values" , new java . lang . String [ ] { "x" , "" , "y" } ) ; java . io . StringWriter sw = new java . io . StringWriter ( ) ; st . write ( new org . stringtemplate . v4 . AutoIndentWriter ( sw ) ) ; java . lang . String result = sw . toString ( ) ; java . lang . String expecting = "x<sp>y" ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( getClass ( ) . getSimpleName ( ) ) + "{" ) + "self=" ) + ( scope . st ) ) + ",<sp>start=" ) + ( outputStartChar ) ) + ",<sp>stop=" ) + ( outputStopChar ) ) + '}' ; }
org . junit . Assert . assertEquals ( expecting , result )
reportsMissingResponseForTreatmentMoreThan16Weeks ( ) { final java . util . List < com . hartwig . hmftools . common . ecrf . datamodel . ValidationFinding > findings = com . hartwig . hmftools . patientdb . validators . PatientValidator . validateTreatmentResponses ( com . hartwig . hmftools . patientdb . validators . PatientValidatorTest . PATIENT_IDENTIFIER , com . google . common . collect . Lists . newArrayList ( com . hartwig . hmftools . patientdb . validators . PatientValidatorTest . TREATMENT_JAN_ONGOING ) , com . google . common . collect . Lists . newArrayList ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( maxheap . size ( ) ) + ( minheap . size ( ) ) ; }
org . junit . Assert . assertEquals ( 1 , findings . size ( ) )
ascendingEmptyIterator ( ) { final java . util . Iterator < com . yandex . yoctodb . util . immutable . IntToIntArray > iter = build ( ) . ascending ( com . yandex . yoctodb . util . mutable . impl . LongArrayBitSet . zero ( VALUES ) ) ; "<AssertPlaceHolder>" ; iter . next ( ) ; } hasNext ( ) { return ( chunk . hasNext ( ) ) || ( baseIterator . hasNext ( ) ) ; }
org . junit . Assert . assertFalse ( iter . hasNext ( ) )
purePropertyIndexAndNodeTypeRestriction2 ( ) { org . apache . jackrabbit . oak . spi . state . NodeBuilder defn = newLucenePropertyIndexDefinition ( builder , "test" , of ( "foo" ) , "async" ) ; defn . setProperty ( FulltextIndexConstants . EVALUATE_PATH_RESTRICTION , true ) ; defn = org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexDefinition . updateDefinition ( defn . getNodeState ( ) . builder ( ) ) ; org . apache . jackrabbit . oak . spi . state . NodeBuilder foob = org . apache . jackrabbit . oak . plugins . index . lucene . IndexPlannerTest . getNode ( defn , "indexRules/nt:base/properties/foo" ) ; foob . setProperty ( FulltextIndexConstants . PROP_NODE_SCOPE_INDEX , true ) ; org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexNode node = createIndexNode ( new org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexDefinition ( root , defn . getNodeState ( ) , "/foo" ) ) ; org . apache . jackrabbit . oak . query . index . FilterImpl filter = createFilter ( "nt:file" ) ; org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner planner = new org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner ( node , "/foo" , filter , java . util . Collections . < org . apache . jackrabbit . oak . spi . query . QueryIndex . OrderEntry > emptyList ( ) ) ; "<AssertPlaceHolder>" ; } getPlan ( ) { if ( ( definition ) == null ) { org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner . log . debug ( "Index<sp>{}<sp>not<sp>loaded" , indexPath ) ; return null ; } org . apache . jackrabbit . oak . plugins . index . search . spi . query . IndexPlan . Builder builder = getPlanBuilder ( ) ; if ( definition . isTestMode ( ) ) { if ( builder == null ) { if ( notSupportedFeature ( ) ) { return null ; } java . lang . String msg = java . lang . String . format ( ( "No<sp>plan<sp>found<sp>for<sp>filter<sp>[%s]<sp>" + "while<sp>using<sp>definition<sp>[%s]<sp>and<sp>testMode<sp>is<sp>found<sp>to<sp>be<sp>enabled" ) , filter , definition ) ; throw new java . lang . IllegalStateException ( msg ) ; } else { builder . setEstimatedEntryCount ( 1 ) . setCostPerExecution ( 0.001 ) . setCostPerEntry ( 0.001 ) ; } } return builder != null ? builder . build ( ) : null ; }
org . junit . Assert . assertNull ( planner . getPlan ( ) )
unionInPredicate_withoutIndex ( ) { final org . xmldb . api . modules . XQueryService service = storeXMLStringAndGetQueryService ( org . exist . xquery . UnionTest . PUBMED_DOC_NAME , org . exist . xquery . UnionTest . PUBMED ) ; final org . xmldb . api . base . ResourceSet result = service . queryResource ( org . exist . xquery . UnionTest . PUBMED_DOC_NAME , org . exist . xquery . UnionTest . XQUERY ) ; "<AssertPlaceHolder>" ; } getSize ( ) { return model . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , result . getSize ( ) )
testIntrospectOptionalPrimitive ( ) { com . jmethods . catatumbo . impl . EntityMetadata entityMetadata = com . jmethods . catatumbo . impl . EntityIntrospector . introspect ( com . jmethods . catatumbo . entities . OptionalPrimitive . class ) ; com . jmethods . catatumbo . impl . PropertyMetadata propertyMetadata = entityMetadata . getPropertyMetadata ( "optionalInt" ) ; "<AssertPlaceHolder>" ; } isOptional ( ) { return optional ; }
org . junit . Assert . assertFalse ( propertyMetadata . isOptional ( ) )
testNewConnection_SessionNotClosed ( ) { "<AssertPlaceHolder>" ; verify ( manager ) . attachChannel ( channelToClient1 , session ) ; verifyNoMoreInteractions ( manager ) ; } newConnection ( net . xenqtt . message . MqttChannel , net . xenqtt . message . ConnectMessage ) { if ( sessionClosed ) { return false ; } connectMessageByChannelPendingAttach . put ( channel , connectMessage ) ; channelManager . attachChannel ( channel , this ) ; return true ; }
org . junit . Assert . assertTrue ( session . newConnection ( channelToClient1 , connectMessage ) )
testActionExecutedInDFA ( ) { java . lang . String grammar = "lexer<sp>grammar<sp>L;\n" + ( "I<sp>:<sp>\'0\'..\'9\'+<sp>{System.out.println(\"I\");}<sp>;\n" + "I\n" 0 ) ; java . lang . String found = execLexer ( "L.g4" , grammar , "L" , "34<sp>34" ) ; java . lang . String expecting = "I\n" + ( ( ( "I\n" + "[@0,0:1=\'34\',<1>,1:0]\n" ) + "[@1,3:4=\'34\',<1>,1:3]\n" ) + "[@2,5:4=\'<EOF>\',<-1>,1:5]\n" ) ; "<AssertPlaceHolder>" ; } execLexer ( java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { return execLexer ( grammarFileName , grammarStr , lexerName , input , false ) ; }
org . junit . Assert . assertEquals ( expecting , found )
TestNeedCreate02 ( ) { java . lang . String tokenName = "aaa" ; org . terasoluna . gfw . web . token . transaction . TransactionTokenType beginToken = TransactionTokenType . IN ; org . terasoluna . gfw . web . token . transaction . TransactionTokenInfo info = new org . terasoluna . gfw . web . token . transaction . TransactionTokenInfo ( tokenName , beginToken ) ; boolean output = info . needCreate ( ) ; "<AssertPlaceHolder>" ; } needCreate ( ) { return tokenType . needCreate ( ) ; }
org . junit . Assert . assertThat ( output , org . hamcrest . CoreMatchers . is ( true ) )
testReturnFalseWhenDoesNotMatchesDefinedTextArgumentAndSensitivityMVELIsTrue ( ) { boolean result = ( ( java . lang . Boolean ) ( expressionExecutor . execute ( "wildcard('tes?',<sp>'TEST',<sp>true)" , context ) ) ) ; "<AssertPlaceHolder>" ; } execute ( org . mule . runtime . extension . api . runtime . operation . ComponentExecutor , org . mule . runtime . module . extension . api . runtime . privileged . ExecutionContextAdapter ) { final java . util . Optional < org . mule . runtime . module . extension . internal . runtime . config . MutableConfigurationStats > stats = getMutableConfigurationStats ( context ) ; stats . ifPresent ( ( s ) -> s . addInflightOperation ( ) ) ; try { return ( ( reactor . core . publisher . Mono < java . lang . Object > ) ( getExecutionTemplate ( ( ( org . mule . runtime . module . extension . api . runtime . privileged . ExecutionContextAdapter < org . mule . runtime . api . meta . model . ComponentModel > ) ( context ) ) ) . execute ( ( ) -> executeWithInterceptors ( executor , context , collectInterceptors ( context , executor ) , stats ) ) ) ) ; } catch ( java . lang . Exception e ) { return reactor . core . publisher . Mono . error ( e ) ; } catch ( java . lang . Throwable t ) { return reactor . core . publisher . Mono . error ( wrapFatal ( t ) ) ; } }
org . junit . Assert . assertFalse ( result )
testFileChecksum ( ) { final org . apache . hadoop . fs . Path p = new org . apache . hadoop . fs . Path ( "har://file-localhost/foo.har/file1" ) ; final org . apache . hadoop . fs . HarFileSystem harfs = new org . apache . hadoop . fs . HarFileSystem ( ) ; try { "<AssertPlaceHolder>" ; } finally { if ( harfs != null ) { harfs . close ( ) ; } } } getFileChecksum ( org . apache . hadoop . fs . Path ) { return dfs . getFileChecksumWithCombineMode ( getUriPath ( f ) , Long . MAX_VALUE ) ; }
org . junit . Assert . assertEquals ( null , harfs . getFileChecksum ( p ) )
toSortedListBy ( ) { com . gs . collections . api . list . MutableList < java . lang . Integer > mutableList = this . classUnderTest ( ) . toList ( ) ; mutableList . shuffleThis ( ) ; com . gs . collections . api . list . ImmutableList < java . lang . Integer > immutableList = mutableList . toImmutable ( ) ; com . gs . collections . api . list . MutableList < java . lang . Integer > sortedList = immutableList . toSortedListBy ( com . gs . collections . impl . block . factory . Functions . getIntegerPassThru ( ) ) ; "<AssertPlaceHolder>" ; } classUnderTest ( ) { return SortedBags . immutable . empty ( ) ; }
org . junit . Assert . assertEquals ( this . classUnderTest ( ) , sortedList )
testConditionalOnNulls ( ) { final java . lang . String fun = "function(doc)<sp>{<sp>if<sp>(doc.foo<sp>&&<sp>doc.bar)<sp>{<sp>return<sp>new<sp>Document();<sp>};<sp>return<sp>null;<sp>}" ; final com . github . rnewson . couchdb . lucene . DocumentConverter converter = new com . github . rnewson . couchdb . lucene . DocumentConverter ( context , view ( fun ) ) ; final java . util . Collection < org . apache . lucene . document . Document > result = converter . convert ( doc ( "{_id:\"hi\",<sp>foo:<sp>null,<sp>bar:<sp>null}" ) , settings ( ) , null ) ; "<AssertPlaceHolder>" ; } settings ( ) { return com . github . rnewson . couchdb . lucene . couchdb . ViewSettings . getDefaultSettings ( ) ; }
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
massByGroupId ( ) { java . lang . String [ ] msgId = massApi . massByGroupId ( new com . foxinmy . weixin4j . tuple . Image ( "mediaId" ) , true , 0 ) ; "<AssertPlaceHolder>" ; } massByGroupId ( com . foxinmy . weixin4j . tuple . MassTuple , boolean , int ) { if ( tuple instanceof com . foxinmy . weixin4j . tuple . MpNews ) { com . foxinmy . weixin4j . tuple . MpNews _news = ( ( com . foxinmy . weixin4j . tuple . MpNews ) ( tuple ) ) ; java . util . List < com . foxinmy . weixin4j . tuple . MpArticle > _articles = _news . getArticles ( ) ; if ( com . foxinmy . weixin4j . util . StringUtil . isBlank ( _news . getMediaId ( ) ) ) { if ( _articles . isEmpty ( ) ) { throw new com . foxinmy . weixin4j . exception . WeixinException ( "mass<sp>fail:mediaId<sp>or<sp>articles<sp>is<sp>required" ) ; } tuple = new com . foxinmy . weixin4j . tuple . MpNews ( uploadArticle ( _articles ) ) ; } } java . lang . String msgtype = tuple . getMessageType ( ) ; com . alibaba . fastjson . JSONObject obj = new com . alibaba . fastjson . JSONObject ( ) ; com . alibaba . fastjson . JSONObject item = new com . alibaba . fastjson . JSONObject ( ) ; item . put ( "is_to_all" , isToAll ) ; if ( ! isToAll ) { item . put ( "group_id" , groupId ) ; } obj . put ( "filter" , item ) ; obj . put ( msgtype , com . alibaba . fastjson . JSON . toJSON ( tuple ) ) ; obj . put ( "msgtype" , msgtype ) ; java . lang . String mass_group_uri = getRequestUri ( "mass_group_uri" ) ; com . foxinmy . weixin4j . model . Token token = tokenManager . getCache ( ) ; com . foxinmy . weixin4j . http . weixin . WeixinResponse response = weixinExecutor . post ( java . lang . String . format ( mass_group_uri , token . getAccessToken ( ) ) , obj . toJSONString ( ) ) ; obj = response . getAsJson ( ) ; return new java . lang . String [ ] { obj . getString ( "msg_id" ) , obj . getString ( "msg_data_id" ) } ; }
org . junit . Assert . assertTrue ( ( ( msgId [ 0 ] ) != null ) )
parseAtomMultiple ( ) { org . json . JSONObject feed = processor . process ( org . apache . shindig . gadgets . FeedProcessorTest . URL_ATOM , org . apache . shindig . gadgets . FeedProcessorTest . DATA_ATOM , true , 2 ) ; org . json . JSONArray entryArray = feed . getJSONArray ( "Entry" ) ; "<AssertPlaceHolder>" ; } length ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 2 , entryArray . length ( ) )
testCreatePushFromPullStopNotificationsWhenPushDestroyed ( ) { final boolean [ ] isCalled = new boolean [ ] { false } ; org . uma . jmetal . util . measure . PullMeasure < java . lang . Integer > pull = new org . uma . jmetal . util . measure . impl . SimplePullMeasure < java . lang . Integer > ( ) { int count = 0 ; @ org . uma . jmetal . util . measure . impl . Override public org . uma . jmetal . util . measure . impl . Integer get ( ) { isCalled [ 0 ] = true ; ( count ) ++ ; return count ; } } ; org . uma . jmetal . util . measure . impl . MeasureFactory factory = new org . uma . jmetal . util . measure . impl . MeasureFactory ( ) ; final int period = 10 ; factory . createPushFromPull ( pull , period ) ; java . lang . System . gc ( ) ; isCalled [ 0 ] = false ; java . lang . Thread . sleep ( ( 10 * period ) ) ; "<AssertPlaceHolder>" ; } createPushFromPull ( org . uma . jmetal . util . measure . PullMeasure , long ) { org . uma . jmetal . util . measure . impl . SimplePushMeasure < Value > push = new org . uma . jmetal . util . measure . impl . SimplePushMeasure ( pull . getName ( ) , pull . getDescription ( ) ) ; final java . lang . ref . WeakReference < org . uma . jmetal . util . measure . PullMeasure < Value > > weakPull = new java . lang . ref . WeakReference < org . uma . jmetal . util . measure . PullMeasure < Value > > ( pull ) ; final java . lang . ref . WeakReference < org . uma . jmetal . util . measure . impl . SimplePushMeasure < Value > > weakPush = new java . lang . ref . WeakReference < org . uma . jmetal . util . measure . impl . SimplePushMeasure < Value > > ( push ) ; final Value initialValue = pull . get ( ) ; java . lang . Thread thread = new java . lang . Thread ( new java . lang . Runnable ( ) { private Value lastValue = initialValue ; @ org . uma . jmetal . util . measure . impl . Override public void run ( ) { boolean isThreadNeeded = true ; long alreadyConsumed = 0 ; while ( isThreadNeeded ) { if ( alreadyConsumed > period ) { long realConsumption = alreadyConsumed ; long missed = alreadyConsumed / period ; alreadyConsumed = alreadyConsumed % period ; log . warning ( ( ( ( ( ( ( ( "Too<sp>much<sp>time<sp>consumed<sp>in<sp>the<sp>last<sp>measuring<sp>(" + realConsumption ) + ">" ) + period ) + "),<sp>ignore<sp>the<sp>" ) + missed ) + "<sp>pushes<sp>missed<sp>and<sp>consider<sp>it<sp>has<sp>consumed<sp>" ) + alreadyConsumed ) ) ; } else { } try { java . lang . Thread . sleep ( ( period - alreadyConsumed ) ) ; } catch ( java . lang . InterruptedException e ) { throw new org . uma . jmetal . util . JMetalException ( "Error<sp>in<sp>run<sp>method:<sp>" , e ) ; } long measureStart = java . lang . System . currentTimeMillis ( ) ; org . uma . jmetal . util . measure . PullMeasure < Value > pull = weakPull . get ( ) ; org . uma . jmetal . util . measure . impl . SimplePushMeasure < Value > push = weakPush . get ( ) ; if ( ( pull == null ) || ( push == null ) ) { isThreadNeeded = false ; } else { Value value = pull . get ( ) ; if ( ( value == ( lastValue ) ) || ( ( value != null ) && ( value . equals ( lastValue ) ) ) ) { } else { lastValue = value ; push . push ( value ) ; } } pull = null ; push = null ; long measureEnd = java . lang . System . currentTimeMillis ( ) ; alreadyConsumed = measureEnd - measureStart ; } } } ) ; thread . setDaemon ( true ) ; thread . start ( ) ; return push ; }
org . junit . Assert . assertFalse ( isCalled [ 0 ] )
testDatumAanvangGeldigheidActieVoorGeboorteDatumKindInFamilieRechtelijkeBetrekkingNieuweSituatie ( ) { final nl . bzk . brp . model . logisch . kern . Actie actie = maakActie ( 20110101 ) ; final nl . bzk . brp . model . bericht . kern . RelatieBericht relatie = new nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht ( ) ; relatie . setBetrokkenheden ( new java . util . ArrayList < nl . bzk . brp . model . bericht . kern . BetrokkenheidBericht > ( ) ) ; final nl . bzk . brp . model . bericht . kern . PersoonBericht kind = maakPersoonBericht ( 20120101 ) ; final nl . bzk . brp . model . bericht . kern . KindBericht kindBericht = new nl . bzk . brp . model . bericht . kern . KindBericht ( ) ; kindBericht . setPersoon ( kind ) ; final nl . bzk . brp . model . bericht . kern . PersoonBericht ouder1 = maakPersoonBericht ( 19830101 ) ; final nl . bzk . brp . model . bericht . kern . OuderBericht ouder1Bericht = new nl . bzk . brp . model . bericht . kern . OuderBericht ( ) ; ouder1Bericht . setPersoon ( ouder1 ) ; final nl . bzk . brp . model . bericht . kern . PersoonBericht ouder2 = maakPersoonBericht ( 19840505 ) ; final nl . bzk . brp . model . bericht . kern . OuderBericht ouder2Bericht = new nl . bzk . brp . model . bericht . kern . OuderBericht ( ) ; ouder2Bericht . setPersoon ( ouder2 ) ; relatie . getBetrokkenheden ( ) . add ( kindBericht ) ; relatie . getBetrokkenheden ( ) . add ( ouder1Bericht ) ; relatie . getBetrokkenheden ( ) . add ( ouder2Bericht ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteits = new nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . object . materielehistorie . BRAL2203 ( ) . voerRegelUit ( null , relatie , actie , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( berichtEntiteits . size ( ) ) == 1 ) )
qlAddressBeginswith ( ) { java . lang . String sqlite = "SELECT<sp>*<sp>FROM<sp>users<sp>WHERE<sp>address<sp>LIKE<sp>'B%'<sp>LIMIT<sp>10" ; java . lang . String api = "select<sp>*<sp>where<sp>address<sp>=<sp>'B*'" ; org . apache . usergrid . query . validator . QueryRequest request = new org . apache . usergrid . query . validator . QueryRequest ( ) ; request . setDbQuery ( sqlite ) ; request . getApiQuery ( ) . setQuery ( api ) ; org . apache . usergrid . query . validator . QueryResponse response = validator . execute ( request , new org . apache . usergrid . query . validator . QueryResultsMatcher ( ) { @ org . apache . usergrid . query . validator . users . Override public boolean equals ( java . util . List < org . apache . usergrid . persistence . Entity > expectedEntities , java . util . List < org . apache . usergrid . persistence . Entity > actuallyEntities ) { boolean equals = ( expectedEntities . size ( ) ) == ( expectedEntities . size ( ) ) ; if ( ! equals ) return false ; for ( org . apache . usergrid . persistence . Entity entity : actuallyEntities ) { java . lang . String address = ( ( java . lang . String ) ( entity . getProperty ( "address" ) ) ) ; if ( ( org . apache . usergrid . utils . StringUtils . startsWith ( address , "B" ) ) == false ) { return false ; } } return equals ; } } ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ( serviceName ) != null ) { sb . append ( "/" ) ; sb . append ( serviceName ) ; } for ( int i = 0 ; i < ( parameters . size ( ) ) ; i ++ ) { org . apache . usergrid . services . ServiceParameter p = parameters . get ( i ) ; if ( p instanceof org . apache . usergrid . services . ServiceParameter . QueryParameter ) { if ( i == ( ( parameters . size ( ) ) - 1 ) ) { sb . append ( '?' ) ; } else { sb . append ( ';' ) ; } boolean has_prev_param = false ; java . lang . String q = p . toString ( ) ; if ( isNotBlank ( q ) ) { try { sb . append ( "ql=" ) . append ( java . net . URLEncoder . encode ( q , "UTF-8" ) ) ; } catch ( java . io . UnsupportedEncodingException e ) { org . apache . usergrid . services . ServiceRequest . logger . error ( "Unable<sp>to<sp>encode<sp>url" , e ) ; } has_prev_param = true ; } int limit = p . getQuery ( ) . getLimit ( ) ; if ( limit != ( org . apache . usergrid . persistence . Query . DEFAULT_LIMIT ) ) { if ( has_prev_param ) { sb . append ( '&' ) ; } sb . append ( "limit=" ) . append ( limit ) ; has_prev_param = true ; } if ( ( p . getQuery ( ) . getStartResult ( ) ) != null ) { if ( has_prev_param ) { sb . append ( '&' ) ; } sb . append ( "start=" ) . append ( p . getQuery ( ) . getStartResult ( ) ) ; has_prev_param = true ; } } else { sb . append ( '/' ) ; sb . append ( p . toString ( ) ) ; } } return sb . toString ( ) ; }
org . junit . Assert . assertTrue ( response . toString ( ) , response . result ( ) )
testParseTemplate4 ( ) { java . lang . String parsed = jrds . Util . parseTemplate ( "%string" ) ; "<AssertPlaceHolder>" ; } parseTemplate ( java . lang . String ) { java . lang . Object [ ] arguments = new java . lang . Object [ ] { "${graphdesc.name}" , "${host}" , "${index}" , "${url}" , "${probename}" , "${index.signature}" , "${url.signature}" } ; return jrds . jrds . Util . parseOldTemplate ( template , arguments , probe , gd ) ; }
org . junit . Assert . assertEquals ( "%string" , parsed )
testGetWithMissingData ( ) { com . google . inject . Injector injector = getInjector ( ) ; injector . getInstance ( org . apache . usergrid . persistence . qakka . App . class ) ; org . apache . usergrid . persistence . actorsystem . ActorSystemFig actorSystemFig = injector . getInstance ( org . apache . usergrid . persistence . actorsystem . ActorSystemFig . class ) ; org . apache . usergrid . persistence . qakka . distributed . DistributedQueueService qas = injector . getInstance ( org . apache . usergrid . persistence . qakka . distributed . DistributedQueueService . class ) ; org . apache . usergrid . persistence . qakka . core . QueueManager qm = injector . getInstance ( org . apache . usergrid . persistence . qakka . core . QueueManager . class ) ; org . apache . usergrid . persistence . qakka . core . QueueMessageManager qmm = injector . getInstance ( org . apache . usergrid . persistence . qakka . core . QueueMessageManager . class ) ; org . apache . usergrid . persistence . qakka . serialization . queuemessages . QueueMessageSerialization qms = injector . getInstance ( org . apache . usergrid . persistence . qakka . serialization . queuemessages . QueueMessageSerialization . class ) ; java . lang . String region = actorSystemFig . getRegionLocal ( ) ; int numMessages = 100 ; java . lang . String queueName = "qmmt_queue_" + ( org . apache . commons . lang . RandomStringUtils . randomAlphanumeric ( 10 ) ) ; qm . createQueue ( new org . apache . usergrid . persistence . qakka . core . Queue ( queueName , "test-type" , region , region , 0L , 5 , 10 , null ) ) ; for ( int i = 0 ; i < numMessages ; i ++ ) { final org . apache . usergrid . persistence . qakka . core . UUID messageId = org . apache . usergrid . persistence . qakka . core . QakkaUtils . getTimeUuid ( ) ; if ( ( i % 2 ) == 0 ) { final java . lang . String data = "my<sp>test<sp>data" ; final org . apache . usergrid . persistence . qakka . serialization . queuemessages . DatabaseQueueMessageBody messageBody = new org . apache . usergrid . persistence . qakka . serialization . queuemessages . DatabaseQueueMessageBody ( com . datastax . driver . core . DataType . serializeValue ( data , ProtocolVersion . NEWEST_SUPPORTED ) , "text/plain" ) ; qms . writeMessageData ( messageId , messageBody ) ; } org . apache . usergrid . persistence . qakka . core . UUID queueMessageId = org . apache . usergrid . persistence . qakka . core . QakkaUtils . getTimeUuid ( ) ; org . apache . usergrid . persistence . qakka . serialization . queuemessages . DatabaseQueueMessage message = new org . apache . usergrid . persistence . qakka . serialization . queuemessages . DatabaseQueueMessage ( messageId , DatabaseQueueMessage . Type . DEFAULT , queueName , actorSystemFig . getRegionLocal ( ) , null , java . lang . System . currentTimeMillis ( ) , null , queueMessageId ) ; qms . writeMessage ( message ) ; } qas . refresh ( ) ; java . lang . Thread . sleep ( 1000 ) ; int count = 0 ; while ( count < ( numMessages / 2 ) ) { org . apache . usergrid . persistence . qakka . core . List < org . apache . usergrid . persistence . qakka . core . QueueMessage > messages = qmm . getNextMessages ( queueName , 1 ) ; "<AssertPlaceHolder>" ; count += messages . size ( ) ; org . apache . usergrid . persistence . qakka . core . QueueMessageManagerTest . logger . debug ( "Got<sp>{}<sp>messages" , ( ++ count ) ) ; } org . apache . usergrid . persistence . qakka . distributed . DistributedQueueService distributedQueueService = injector . getInstance ( org . apache . usergrid . persistence . qakka . distributed . DistributedQueueService . class ) ; distributedQueueService . shutdown ( ) ; } isEmpty ( ) { return getDynamicProperties ( ) . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( ( ! ( messages . isEmpty ( ) ) ) )
testSimpleModelWithSyntaxError ( ) { createJavaProjectWithRootSrc ( "foo" ) ; org . eclipse . core . resources . IFile file = createFile ( ( "foo/src/foo" + ( F_EXT ) ) , "objekt<sp>Foo<sp>" ) ; build ( ) ; "<AssertPlaceHolder>" ; } countMarkers ( org . eclipse . core . resources . IFile ) { return file . findMarkers ( EValidator . MARKER , true , org . eclipse . core . resources . IResource . DEPTH_INFINITE ) . length ; }
org . junit . Assert . assertEquals ( 1 , countMarkers ( file ) )
testCase8 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase8 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , branch_conditions . size ( ) )
whenFilteringFilesEndingWithJson_thenEqualExpectedFiles ( ) { java . io . FilenameFilter filter = ( dir , name ) -> name . endsWith ( ".json" ) ; java . lang . String [ ] expectedFiles = new java . lang . String [ ] { "people.json" , "students.json" } ; java . lang . String [ ] actualFiles = com . baeldung . file . FilenameFilterManualTest . directory . list ( filter ) ; "<AssertPlaceHolder>" ; } list ( org . springframework . ui . Model ) { model . addAttribute ( "todos" , todos ) ; return "scopedproxytodos" ; }
org . junit . Assert . assertArrayEquals ( expectedFiles , actualFiles )
testGetOutputTypeXml ( ) { hudson . plugins . jobConfigHistory . JobConfigHistoryBaseAction sut = new hudson . plugins . jobConfigHistory . JobConfigHistoryBaseActionTest . JobConfigHistoryBaseActionImpl ( ) ; when ( staplerRequestMock . getParameter ( "type" ) ) . thenReturn ( "xml" ) ; java . lang . String expResult = "xml" ; java . lang . String result = sut . getOutputType ( ) ; "<AssertPlaceHolder>" ; } getOutputType ( ) { if ( "xml" . equalsIgnoreCase ( getRequestParameter ( "type" ) ) ) { return "xml" ; } return "plain" ; }
org . junit . Assert . assertEquals ( expResult , result )
shouldReturnHolidaysFromSeveralYearsConsideringHiring ( ) { java . util . List < com . autentia . tnt . businessobject . Holiday > holidays = this . getListOfCompensationDays ( 3 ) ; com . autentia . tnt . businessobject . Holiday newYear2018 = new com . autentia . tnt . businessobject . Holiday ( ) ; newYear2018 . setId ( 4 ) ; newYear2018 . setCompensation ( false ) ; newYear2018 . setDate ( new java . util . GregorianCalendar ( 2018 , java . util . Calendar . JANUARY , 1 ) . getTime ( ) ) ; java . util . List < com . autentia . tnt . businessobject . Holiday > january2018 = java . util . Arrays . asList ( newYear2018 ) ; doReturn ( january2018 ) . when ( holidayManager ) . getAllEntities ( any ( ) , any ( ) ) ; java . util . Date hiringDate = new java . util . GregorianCalendar ( 2019 , java . util . Calendar . JANUARY , 3 ) . getTime ( ) ; java . util . Calendar calMin = new java . util . GregorianCalendar ( 2018 , java . util . Calendar . DECEMBER , 1 ) ; java . util . Calendar calMax = new java . util . GregorianCalendar ( 2019 , java . util . Calendar . FEBRUARY , 1 ) ; java . util . List < com . autentia . tnt . businessobject . Holiday > result = sut . calculateCorrespondingHolidays ( calMin , calMax , holidays , hiringDate ) ; "<AssertPlaceHolder>" ; } calculateCorrespondingHolidays ( java . util . Calendar , java . util . Calendar , java . util . List , java . util . Date ) { java . util . List < com . autentia . tnt . businessobject . Holiday > correspondingHolidays = new java . util . ArrayList < com . autentia . tnt . businessobject . Holiday > ( ) ; if ( ( ( calMax . get ( Calendar . YEAR ) ) - ( calMin . get ( Calendar . YEAR ) ) ) > 0 ) { for ( int year = calMin . get ( Calendar . YEAR ) ; year <= ( calMax . get ( Calendar . YEAR ) ) ; year ++ ) { correspondingHolidays = java . util . stream . Stream . concat ( getCorrespondingHolidays ( allHolidays , parseDate ( hiringDate ) , year ) . stream ( ) , correspondingHolidays . stream ( ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; } } else { correspondingHolidays = getCorrespondingHolidays ( allHolidays , parseDate ( hiringDate ) , calMax . get ( Calendar . YEAR ) ) ; } return correspondingHolidays ; }
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . core . Is . is ( 1 ) )
testCompute ( ) { de . mirkosertic . bytecoder . core . InterfaceLinkTest . Runner theRunner = new de . mirkosertic . bytecoder . core . InterfaceLinkTest . Runner ( ) ; "<AssertPlaceHolder>" ; } compute ( ) { java . util . stream . Nodes . SizedCollectorTask < P_IN , P_OUT , T_SINK , K > task = this ; java . util . Spliterator < P_IN > rightSplit = spliterator ; java . util . Spliterator < P_IN > leftSplit ; while ( ( ( rightSplit . estimateSize ( ) ) > ( task . targetSize ) ) && ( ( leftSplit = rightSplit . trySplit ( ) ) != null ) ) { task . setPendingCount ( 1 ) ; long leftSplitSize = leftSplit . estimateSize ( ) ; task . makeChild ( leftSplit , task . offset , leftSplitSize ) . fork ( ) ; task = task . makeChild ( rightSplit , ( ( task . offset ) + leftSplitSize ) , ( ( task . length ) - leftSplitSize ) ) ; } assert ( ( task . offset ) + ( task . length ) ) < ( java . util . stream . Nodes . MAX_ARRAY_SIZE ) ; @ java . util . stream . SuppressWarnings ( "unchecked" ) T_SINK sink = ( ( T_SINK ) ( task ) ) ; task . helper . wrapAndCopyInto ( sink , rightSplit ) ; task . propagateCompletion ( ) ; }
org . junit . Assert . assertEquals ( theRunner . compute ( ) , 10 , 0 )
isNullableValidationErrorWhenPropertyIsNotNullableAndValueNotNullShouldReturnFalse ( ) { java . lang . String value = "value" ; boolean isNullable = false ; resourceEditProperty = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withValue ( value ) . withIsNullable ( isNullable ) . build ( ) ; boolean isNullableValidationError = resourceEditProperty . isNullableValidationError ( ) ; "<AssertPlaceHolder>" ; } isNullableValidationError ( ) { return ( ( org . apache . commons . lang . StringUtils . isEmpty ( getPropertyValue ( ) ) ) && ( org . apache . commons . lang . StringUtils . isEmpty ( getDefaultValue ( ) ) ) ) && ( ! ( isNullable ( ) ) ) ; }
org . junit . Assert . assertFalse ( isNullableValidationError )
testPutThing ( ) { org . jboss . resteasy . test . rx . resource . Thing t = org . jboss . resteasy . test . rx . rxjava2 . Rx2SingleProxyServerAsyncTest . proxy . putThing ( "a" ) ; "<AssertPlaceHolder>" ; } putThing ( java . lang . String ) { return org . jboss . resteasy . test . rx . rxjava2 . resource . Rx2ObservableResourceNoStreamImpl . buildObservableThing ( s , 3 ) ; }
org . junit . Assert . assertEquals ( new org . jboss . resteasy . test . rx . resource . Thing ( "a" ) , t )
testDeserializeFromHeap ( ) { java . nio . ByteBuffer buffer = java . nio . ByteBuffer . wrap ( serialised ) . order ( order ) ; org . roaringbitmap . buffer . MutableRoaringBitmap deserialised = new org . roaringbitmap . buffer . MutableRoaringBitmap ( ) ; deserialised . deserialize ( buffer ) ; "<AssertPlaceHolder>" ; } deserialize ( java . lang . String ) { final java . io . DataInputStream dos = new java . io . DataInputStream ( new java . util . zip . GZIPInputStream ( this . getClass ( ) . getResourceAsStream ( bitsetResource ) ) ) ; try { final long [ ] [ ] bitset = new long [ dos . readInt ( ) ] [ ] ; for ( int i = 0 ; i < ( bitset . length ) ; i ++ ) { final int wordSize = dos . readInt ( ) ; final int clone = 0 ; final long [ ] words = new long [ wordSize * ( clone + 1 ) ] ; for ( int j = 0 ; j < wordSize ; j ++ ) { words [ j ] = dos . readLong ( ) ; } for ( int j = 0 ; j < clone ; j ++ ) { java . lang . System . arraycopy ( words , 0 , words , ( ( j + 1 ) * wordSize ) , wordSize ) ; } bitset [ i ] = words ; } return bitset ; } finally { if ( dos != null ) { dos . close ( ) ; } } }
org . junit . Assert . assertEquals ( input , deserialised )
TestGetLastHourInvertedTimestamp ( ) { long ts = 1391896800L ; long expectedTop = ( Long . MAX_VALUE ) - ts ; long actualTop = com . twitter . hraven . datasource . HdfsStatsService . getEncodedRunId ( ts ) ; "<AssertPlaceHolder>" ; } getEncodedRunId ( long ) { long lastHour = now - ( now % 3600 ) ; return ( Long . MAX_VALUE ) - lastHour ; }
org . junit . Assert . assertEquals ( actualTop , expectedTop )
testNoArgs ( io . vertx . ext . unit . TestContext ) { async = context . async ( ) ; java . lang . String [ ] args = new java . lang . String [ ] { } ; org . folio . okapi . MainDeploy d = new org . folio . okapi . MainDeploy ( ) ; d . init ( args , ( res ) -> { "<AssertPlaceHolder>" ; vertx = ( res . succeeded ( ) ) ? res . result ( ) : null ; async . complete ( ) ; } ) ; } succeeded ( ) { return true ; }
org . junit . Assert . assertFalse ( res . succeeded ( ) )
testGetConstrainedGroups ( ) { tested . groupManagerSettings = getGroupSettings ( ) ; java . util . Collection < java . lang . String > cGroups = new java . util . ArrayList < java . lang . String > ( 1 ) ; cGroups . add ( "admin" ) ; tested . groupManagerSettings . setConstrainedGroups ( cGroups ) ; "<AssertPlaceHolder>" ; } getConstrainedGroups ( ) { return constrainedGroups ; }
org . junit . Assert . assertEquals ( cGroups , tested . getConstrainedGroups ( ) )
testMinusPlusRoundtrip ( ) { jama . Matrix TMP = jama . Matrix . random ( A . getRowDimension ( ) , A . getColumnDimension ( ) ) ; jama . Matrix C = R . minus ( TMP ) ; "<AssertPlaceHolder>" ; } plus ( jama . FloatMatrix ) { checkFloatMatrixDimensions ( B ) ; jama . FloatMatrix X = new jama . FloatMatrix ( m , n ) ; float [ ] [ ] C = X . getArray ( ) ; for ( int i = 0 ; i < ( m ) ; i ++ ) { for ( int j = 0 ; j < ( n ) ; j ++ ) { C [ i ] [ j ] = ( A [ i ] [ j ] ) + ( B . A [ i ] [ j ] ) ; } } return X ; }
org . junit . Assert . assertEquals ( R , C . plus ( TMP ) )