input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
---|---|
shouldSkipNullPropertyValuesWhenCreatingAccumuloKey ( ) { final uk . gov . gchq . gaffer . data . element . Edge edge = new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . group ( TestGroups . EDGE ) . source ( "1" ) . dest ( "2" ) . directed ( true ) . property ( AccumuloPropertyNames . COLUMN_QUALIFIER , null ) . build ( ) ; final uk . gov . gchq . gaffer . commonutil . pair . Pair < org . apache . accumulo . core . data . Key , org . apache . accumulo . core . data . Key > keys = converter . getKeysFromElement ( edge ) ; uk . gov . gchq . gaffer . data . element . Properties properties = converter . getPropertiesFromColumnQualifier ( TestGroups . EDGE , keys . getFirst ( ) . getColumnQualifierData ( ) . getBackingArray ( ) ) ; "<AssertPlaceHolder>" ; } get ( K ) { return multiMap . get ( key ) ; }
|
org . junit . Assert . assertEquals ( null , properties . get ( AccumuloPropertyNames . COLUMN_QUALIFIER ) )
|
testNonExistingEngineRetrieval ( ) { org . camunda . bpm . ProcessEngineService engineService = org . camunda . bpm . BpmPlatform . getProcessEngineService ( ) ; org . camunda . bpm . engine . ProcessEngine engine = engineService . getProcessEngine ( "aNonExistingEngineName" ) ; "<AssertPlaceHolder>" ; } getProcessEngine ( java . lang . String ) { return org . camunda . bpm . engine . ProcessEngines . getProcessEngine ( processEngineName , true ) ; }
|
org . junit . Assert . assertNull ( engine )
|
testGetMapAsPrettyString ( ) { final java . util . Map testMap = org . pentaho . platform . util . StringUtilTest . getTestMap ( ) ; final java . lang . String output = org . pentaho . platform . util . StringUtil . getMapAsPrettyString ( testMap ) ; final java . lang . String expectedOutput = getExpectedPrettyMapOutput ( ) ; "<AssertPlaceHolder>" ; } getExpectedPrettyMapOutput ( ) { final java . lang . String NL = java . lang . System . getProperty ( "<sp>" 4 ) ; final java . lang . StringBuilder expectedOutput = new java . lang . StringBuilder ( ) ; expectedOutput . append ( "Map<sp>=<sp>" ) . append ( NL ) ; expectedOutput . append ( "<sp>" 3 ) . append ( NL ) ; expectedOutput . append ( "<sp>" ) . append ( "<sp>" 2 ) . append ( NL ) ; expectedOutput . append ( "<sp>" ) . append ( "<sp>" 5 ) . append ( "<sp>" 2 ) . append ( NL ) ; expectedOutput . append ( "<sp>" ) . append ( "<sp>" 0 ) . append ( "<sp>=<sp>" ) . append ( "<sp>" 5 ) . append ( NL ) ; expectedOutput . append ( "<sp>" ) . append ( "<sp>" 7 ) . append ( "<sp>=<sp>" ) . append ( "Doe<sp>java.lang.String" ) . append ( NL ) ; expectedOutput . append ( "<sp>" ) . append ( "map" ) . append ( "<sp>=<sp>" ) . append ( NL ) ; expectedOutput . append ( "<sp>" ) . append ( "<sp>" 3 ) . append ( NL ) ; expectedOutput . append ( "<sp>" 6 ) . append ( "<sp>" 7 ) . append ( "<sp>=<sp>" ) . append ( "Doe<sp>java.lang.String" ) . append ( NL ) ; expectedOutput . append ( "<sp>" 6 ) . append ( "testObj" ) . append ( "<sp>=<sp>" ) . append ( ( "<sp>" 8 + ".platform.util.StringUtilTest$TestObject" ) ) . append ( NL ) ; expectedOutput . append ( "<sp>" ) . append ( "}<sp>java.util.TreeMap" ) . append ( NL ) ; expectedOutput . append ( "<sp>" ) . append ( "<sp>" 1 ) . append ( "<sp>=<sp>" ) . append ( ( "someVar:testVar2<sp>org.pentaho" + ".platform.util.StringUtilTest$TestObject" ) ) ; expectedOutput . append ( NL ) . append ( "}<sp>java.util.HashMap" ) . append ( NL ) ; return expectedOutput . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expectedOutput , output )
|
testGetMaximum ( ) { "<AssertPlaceHolder>" ; } getMaximum ( ) { return max ; }
|
org . junit . Assert . assertEquals ( max , range . getMaximum ( ) )
|
issuerIsCorrect ( ) { java . lang . String issuer = "O=SAML2<sp>Burp<sp>Plugin<sp>Test,<sp>CN=saml.lan" ; "<AssertPlaceHolder>" ; } getIssuer ( ) { return certificate . getIssuerX500Principal ( ) . toString ( ) ; }
|
org . junit . Assert . assertEquals ( issuer , certificate . getIssuer ( ) )
|
testNonNotifyingCompoundCommand ( ) { final java . lang . String [ ] expectedPropertyName = new java . lang . String [ 2 ] ; expectedPropertyName [ 0 ] = com . archimatetool . editor . model . IEditorModelManager . PROPERTY_ECORE_EVENTS_START ; expectedPropertyName [ 1 ] = com . archimatetool . editor . model . IEditorModelManager . PROPERTY_ECORE_EVENTS_END ; java . beans . PropertyChangeListener listener = new java . beans . PropertyChangeListener ( ) { int sequence = 0 ; @ com . archimatetool . editor . model . commands . Override public void propertyChange ( java . beans . PropertyChangeEvent evt ) { "<AssertPlaceHolder>" ; sequence += ( ( sequence ) == 0 ) ? 1 : - 1 ; } } ; IEditorModelManager . INSTANCE . addPropertyChangeListener ( listener ) ; org . eclipse . gef . commands . CompoundCommand compoundCmd = new com . archimatetool . editor . model . commands . NonNotifyingCompoundCommand ( "command" ) ; compoundCmd . add ( new com . archimatetool . editor . model . commands . EObjectFeatureCommand ( "Rename" , model , IArchimatePackage . Literals . NAMEABLE__NAME , "Hello1" ) ) ; compoundCmd . add ( new com . archimatetool . editor . model . commands . EObjectFeatureCommand ( "Rename" , model , IArchimatePackage . Literals . NAMEABLE__NAME , "Hello2" ) ) ; compoundCmd . add ( new com . archimatetool . editor . model . commands . EObjectFeatureCommand ( "Rename" , model , IArchimatePackage . Literals . NAMEABLE__NAME , "Hello3" ) ) ; compoundCmd . execute ( ) ; compoundCmd . undo ( ) ; compoundCmd . redo ( ) ; IEditorModelManager . INSTANCE . removePropertyChangeListener ( listener ) ; } propertyChange ( java . beans . PropertyChangeEvent ) { java . lang . String propertyName = evt . getPropertyName ( ) ; java . lang . Object newValue = evt . getNewValue ( ) ; if ( propertyName == ( com . archimatetool . editor . model . IEditorModelManager . PROPERTY_MODEL_REMOVED ) ) { java . lang . Object input = getViewer ( ) . getInput ( ) ; if ( ( input instanceof com . archimatetool . model . IArchimateModelObject ) && ( ( ( ( com . archimatetool . model . IArchimateModelObject ) ( input ) ) . getArchimateModel ( ) ) == newValue ) ) { fDrillDownManager . reset ( ) ; } } else if ( propertyName == ( com . archimatetool . editor . model . IEditorModelManager . COMMAND_STACK_CHANGED ) ) { updateActions ( ) ; } else { super . propertyChange ( evt ) ; } }
|
org . junit . Assert . assertEquals ( expectedPropertyName [ sequence ] , evt . getPropertyName ( ) )
|
shouldCopyUnicodeStringToEndOfByteBuffer ( ) { byte [ ] buffer = new byte [ 10 ] ; java . util . Arrays . fill ( buffer , ( ( byte ) ( 0 ) ) ) ; java . lang . String s = "γειά" ; com . mpatric . mp3agic . BufferTools . stringIntoByteBuffer ( s , 0 , s . length ( ) , buffer , 2 , "UTF-16BE" ) ; byte [ ] expectedBuffer = new byte [ ] { 0 , 0 , 3 , ( ( byte ) ( 179 ) ) , 3 , ( ( byte ) ( 181 ) ) , 3 , ( ( byte ) ( 185 ) ) , 3 , ( ( byte ) ( 172 ) ) } ; "<AssertPlaceHolder>" ; } stringIntoByteBuffer ( java . lang . String , int , int , byte [ ] , int , java . lang . String ) { java . lang . String stringToCopy = s . substring ( offset , ( offset + length ) ) ; byte [ ] srcBytes = stringToCopy . getBytes ( charsetName ) ; if ( ( srcBytes . length ) > 0 ) { java . lang . System . arraycopy ( srcBytes , 0 , bytes , destOffset , srcBytes . length ) ; } }
|
org . junit . Assert . assertArrayEquals ( expectedBuffer , buffer )
|
parseAbsoluteLengthFrom10pt ( ) { java . lang . String value = "10pt" ; float actual = com . itextpdf . styledxmlparser . css . util . CssUtils . parseAbsoluteLength ( value , CommonCssConstants . PT ) ; float expected = 10.0F ; "<AssertPlaceHolder>" ; } parseAbsoluteLength ( java . lang . String , java . lang . String ) { int pos = com . itextpdf . styledxmlparser . css . util . CssUtils . determinePositionBetweenValueAndUnit ( length ) ; if ( pos == 0 ) { if ( length == null ) { length = "null" ; } throw new com . itextpdf . styledxmlparser . exceptions . StyledXMLParserException ( com . itextpdf . io . util . MessageFormatUtil . format ( LogMessageConstant . NAN , length ) ) ; } float f = java . lang . Float . parseFloat ( length . substring ( 0 , pos ) ) ; java . lang . String unit = length . substring ( pos ) ; if ( ( unit . startsWith ( CommonCssConstants . PT ) ) || ( ( unit . equals ( "" ) ) && ( defaultMetric . equals ( CommonCssConstants . PT ) ) ) ) { return f ; } if ( ( unit . startsWith ( CommonCssConstants . IN ) ) || ( ( unit . equals ( "" ) ) && ( defaultMetric . equals ( CommonCssConstants . IN ) ) ) ) { return f * 72.0F ; } else if ( ( unit . startsWith ( CommonCssConstants . CM ) ) || ( ( unit . equals ( "" ) ) && ( defaultMetric . equals ( CommonCssConstants . CM ) ) ) ) { return ( f / 2.54F ) * 72.0F ; } else if ( ( unit . startsWith ( CommonCssConstants . Q ) ) || ( ( unit . equals ( "" ) ) && ( defaultMetric . equals ( CommonCssConstants . Q ) ) ) ) { return ( ( f / 2.54F ) * 72.0F ) / 40 ; } else if ( ( unit . startsWith ( CommonCssConstants . MM ) ) || ( ( unit . equals ( "" ) ) && ( defaultMetric . equals ( CommonCssConstants . MM ) ) ) ) { return ( f / 25.4F ) * 72.0F ; } else if ( ( unit . startsWith ( CommonCssConstants . PC ) ) || ( ( unit . equals ( "" ) ) && ( defaultMetric . equals ( CommonCssConstants . PC ) ) ) ) { return f * 12.0F ; } else if ( ( unit . startsWith ( CommonCssConstants . PX ) ) || ( ( unit . equals ( "" ) ) && ( defaultMetric . equals ( CommonCssConstants . PX ) ) ) ) { return f * 0.75F ; } org . slf4j . Logger logger = org . slf4j . LoggerFactory . getLogger ( com . itextpdf . styledxmlparser . css . util . CssUtils . class ) ; logger . error ( com . itextpdf . io . util . MessageFormatUtil . format ( LogMessageConstant . UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED , ( unit . equals ( "" ) ? defaultMetric : unit ) ) ) ; return f ; }
|
org . junit . Assert . assertEquals ( expected , actual , 0 )
|
testBulkMutate ( ) { java . lang . String tableName = "testBulkMutate" ; createTable ( tableName ) ; java . lang . String bulkId = java . util . UUID . randomUUID ( ) . toString ( ) ; org . apache . blur . thrift . generated . Blur . Iface client = getClient ( ) ; client . bulkMutateStart ( bulkId ) ; int batchSize = 11 ; int total = 10000 ; int maxFacetValue = 100 ; java . util . List < org . apache . blur . thrift . generated . RowMutation > mutations = new java . util . ArrayList < org . apache . blur . thrift . generated . RowMutation > ( ) ; java . util . Random random = new java . util . Random ( 1 ) ; for ( int i = 0 ; i < total ; i ++ ) { java . lang . String rowId = java . util . UUID . randomUUID ( ) . toString ( ) ; org . apache . blur . thrift . generated . RecordMutation mutation = org . apache . blur . thrift . util . BlurThriftHelper . newRecordMutation ( "test" , rowId , org . apache . blur . thrift . util . BlurThriftHelper . newColumn ( "test" , "value" ) , org . apache . blur . thrift . util . BlurThriftHelper . newColumn ( "facet" , java . lang . Integer . toString ( random . nextInt ( maxFacetValue ) ) ) , org . apache . blur . thrift . util . BlurThriftHelper . newColumn ( "facetFixed" , "test" ) ) ; org . apache . blur . thrift . generated . RowMutation rowMutation = org . apache . blur . thrift . util . BlurThriftHelper . newRowMutation ( tableName , rowId , mutation ) ; mutations . add ( rowMutation ) ; if ( ( mutations . size ( ) ) >= batchSize ) { client . bulkMutateAddMultiple ( bulkId , mutations ) ; mutations . clear ( ) ; } } if ( ( mutations . size ( ) ) > 0 ) { client . bulkMutateAddMultiple ( bulkId , mutations ) ; mutations . clear ( ) ; } client . bulkMutateFinish ( bulkId , true , true ) ; org . apache . blur . thrift . generated . TableStats tableStats = client . tableStats ( tableName ) ; "<AssertPlaceHolder>" ; } getRecordCount ( ) { org . apache . blur . lucene . search . IndexSearcherCloseable searcher = getIndexSearcher ( false ) ; try { return searcher . getIndexReader ( ) . numDocs ( ) ; } finally { if ( searcher != null ) { searcher . close ( ) ; } } }
|
org . junit . Assert . assertEquals ( total , tableStats . getRecordCount ( ) )
|
testCase60 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase60 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , branch_conditions . size ( ) )
|
testEncodeURLTxPowerAboveMax ( ) { org . eclipse . kura . internal . ble . eddystone . BluetoothLeEddystoneEncoderImpl encoder = new org . eclipse . kura . internal . ble . eddystone . BluetoothLeEddystoneEncoderImpl ( ) ; org . eclipse . kura . ble . eddystone . BluetoothLeEddystone beacon = new org . eclipse . kura . ble . eddystone . BluetoothLeEddystone ( ) ; beacon . setBrEdrSupported ( true ) ; beacon . setLeBrController ( true ) ; beacon . setLeBrHost ( true ) ; beacon . setLeGeneral ( true ) ; beacon . setLeLimited ( true ) ; beacon . setTxPower ( ( ( short ) ( 190 ) ) ) ; beacon . setFrameType ( EddystoneFrameType . URL . name ( ) ) ; java . lang . String scheme = "http://" ; beacon . setUrlScheme ( scheme ) ; java . lang . String url = "http://eurotech.com" ; beacon . setUrl ( url ) ; byte [ ] encoded = encoder . encode ( beacon ) ; byte [ ] expected = new byte [ ] { 30 , 2 , 1 , 31 , 3 , 3 , ( ( byte ) ( 170 ) ) , ( ( byte ) ( 254 ) ) , 22 , 22 , ( ( byte ) ( 170 ) ) , ( ( byte ) ( 254 ) ) , 16 , 126 , 2 , 104 , 116 , 116 , 112 , 58 , 47 , 47 , 101 , 117 , 114 , 111 , 116 , 101 , 99 , 104 , 7 , 0 } ; "<AssertPlaceHolder>" ; } encode ( org . eclipse . kura . ble . eddystone . BluetoothLeEddystone ) { byte flags = encodeFlags ( beacon ) ; org . eclipse . kura . internal . ble . eddystone . EddystoneFrameType frameType = org . eclipse . kura . internal . ble . eddystone . EddystoneFrameType . valueOf ( beacon . getFrameType ( ) ) ; if ( frameType . equals ( EddystoneFrameType . UID ) ) { return encodeUID ( flags , beacon ) ; } else if ( frameType . equals ( EddystoneFrameType . URL ) ) { return encodeURL ( flags , beacon ) ; } else if ( frameType . equals ( EddystoneFrameType . TLM ) ) { return encodeTLM ( flags , beacon ) ; } else if ( frameType . equals ( EddystoneFrameType . EID ) ) { return encodeEID ( flags , beacon ) ; } else { return new byte [ 1 ] ; } }
|
org . junit . Assert . assertArrayEquals ( expected , encoded )
|
testRemoveValidatorOnZeroSpot ( ) { "<AssertPlaceHolder>" ; } removeValidator ( com . tech . configurations . tools . ValidationScopes , int ) { if ( i == 0 ) { return false ; } switch ( scope ) { case ROOM_NAME : if ( ( com . tech . models . dtos . MessageDTO . CHATROOM_NAME_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . CHATROOM_NAME_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . CHATROOM_NAME_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . CHATROOM_NAME_VALIDATORS . remove ( i ) ; return true ; } return false ; case LATITUDE : if ( ( com . tech . models . dtos . MessageDTO . LAT_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . LAT_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . LAT_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . LAT_VALIDATORS . remove ( i ) ; return true ; } return false ; case LONGITUDE : if ( ( com . tech . models . dtos . MessageDTO . LNG_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . LNG_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . LNG_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . LNG_VALIDATORS . remove ( i ) ; return true ; } return false ; case STRING : if ( ( com . tech . models . dtos . MessageDTO . MESSAGE_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . MESSAGE_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . MESSAGE_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . MESSAGE_VALIDATORS . remove ( i ) ; return true ; } return false ; case TTL : if ( ( com . tech . models . dtos . MessageDTO . TTL_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . TTL_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . TTL_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . TTL_VALIDATORS . remove ( i ) ; return true ; } case USER_NAME : if ( ( com . tech . models . dtos . MessageDTO . USERNAME_VALIDATORS . size ( ) ) >= ( i + 1 ) ) { com . tech . models . dtos . MessageDTO . USERNAME_VALIDATORS . get ( ( i - 1 ) ) . replaceNext ( com . tech . models . dtos . MessageDTO . USERNAME_VALIDATORS . get ( i ) . getNext ( ) ) ; com . tech . models . dtos . MessageDTO . USERNAME_VALIDATORS . remove ( i ) ; return true ; } return false ; default : throw new com . tech . exceptions . customexceptions . ValidatorNotListedException ( ) ; } }
|
org . junit . Assert . assertFalse ( com . tech . models . dtos . MessageDTO . removeValidator ( ValidationScopes . USER_NAME , 0 ) )
|
testHeteroSubT ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( HETERO_SUBSTITUENT_COUNT , 1 ) ; org . openscience . cdk . interfaces . IAtom atom = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; org . openscience . cdk . interfaces . IAtom o = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; org . openscience . cdk . interfaces . IBond b = mock ( org . openscience . cdk . interfaces . IBond . class ) ; when ( atom . getBondCount ( ) ) . thenReturn ( 1 ) ; when ( b . getOther ( atom ) ) . thenReturn ( o ) ; when ( b . getOther ( o ) ) . thenReturn ( atom ) ; when ( atom . getImplicitHydrogenCount ( ) ) . thenReturn ( 2 ) ; when ( o . getAtomicNumber ( ) ) . thenReturn ( 8 ) ; when ( atom . bonds ( ) ) . thenReturn ( java . util . Collections . singletonList ( b ) ) ; "<AssertPlaceHolder>" ; } matches ( org . openscience . cdk . interfaces . IAtomContainer ) { return matches ( atomContainer , true ) ; }
|
org . junit . Assert . assertTrue ( expr . matches ( atom ) )
|
testGetRANGERESBY ( ) { java . lang . String actual = table . getRANGERESBY ( ) ; java . lang . String expected = ":->" ; "<AssertPlaceHolder>" ; } getRANGERESBY ( ) { return ":->" ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
hasVariableLocationShouldBeTrue ( ) { com . graphhopper . jsprit . core . problem . job . Break aBreak = ( ( com . graphhopper . jsprit . core . problem . job . Break ) ( serviceActivity . getJob ( ) ) ) ; "<AssertPlaceHolder>" ; } hasVariableLocation ( ) { return variableLocation ; }
|
org . junit . Assert . assertTrue ( aBreak . hasVariableLocation ( ) )
|
testUpdate ( ) { org . hisp . dhis . metadata . version . MetadataVersion metadataVersion = new org . hisp . dhis . metadata . version . MetadataVersion ( "version1" , org . hisp . dhis . metadata . version . VersionType . ATOMIC ) ; metadataVersion . setHashCode ( "12345" ) ; metadataVersionStore . save ( metadataVersion ) ; metadataVersion . setName ( "newVersion" ) ; metadataVersionStore . update ( metadataVersion ) ; "<AssertPlaceHolder>" ; metadataVersionStore . delete ( metadataVersion ) ; } getVersionByName ( java . lang . String ) { javax . persistence . criteria . CriteriaBuilder builder = getCriteriaBuilder ( ) ; return getSingleResult ( builder , newJpaParameters ( ) . addPredicate ( ( root ) -> builder . equal ( root . get ( "name" ) , versionName ) ) ) ; }
|
org . junit . Assert . assertNotNull ( metadataVersionStore . getVersionByName ( "newVersion" ) )
|
rejectForEach ( ) { org . eclipse . collections . api . LazyIterable < java . lang . Integer > select = org . eclipse . collections . impl . utility . LazyIterate . reject ( org . eclipse . collections . impl . list . Interval . oneTo ( 5 ) , org . eclipse . collections . impl . block . factory . Predicates . lessThan ( 5 ) ) ; int sum = select . injectInto ( 0 , AddFunction . INTEGER_TO_INT ) ; "<AssertPlaceHolder>" ; } injectInto ( double , org . eclipse . collections . api . block . function . primitive . DoubleObjectToDoubleFunction ) { return 0 ; }
|
org . junit . Assert . assertEquals ( 5 , sum )
|
test ( ) { com . github . knightliao . canalx . core . plugin . injector . template . IInjectEventProcessOperator injectEventProcessOperator = new com . github . knightliao . canalx . core . plugin . injector . template . InjectorEventProcessTemplate ( new com . github . knightliao . canalx . core . plugin . injector . template . IInjectEventProcessCallback ( ) { @ com . github . knightliao . canalx . core . test . plugin . injector . template . Override public void processMysqlEntry ( com . github . knightliao . canalx . core . dto . MysqlEntryWrap mysqlEntry ) throws com . github . knightliao . canalx . core . exception . CanalxInjectorException { } @ com . github . knightliao . canalx . core . test . plugin . injector . template . Override public void shutdown ( ) { } } ) ; com . github . knightliao . canalx . core . dto . MysqlEntryWrap mysqlEntryWrap = new com . github . knightliao . canalx . core . dto . MysqlEntryWrap ( "topic" , new com . github . knightliao . canalx . core . dto . MysqlEntry ( ) ) ; try { injectEventProcessOperator . processEntry ( mysqlEntryWrap ) ; injectEventProcessOperator . shutdown ( ) ; } catch ( com . github . knightliao . canalx . core . exception . CanalxInjectorException e ) { "<AssertPlaceHolder>" ; } } shutdown ( ) { if ( ( firstCanalxRouter ) != null ) { try { firstCanalxRouter . shutdown ( ) ; } catch ( com . github . knightliao . canalx . core . exception . CanalxRouterException e ) { com . github . knightliao . canalx . router . impl . RouterMgrImpl . LOGGER . warn ( e . toString ( ) ) ; } } }
|
org . junit . Assert . assertTrue ( false )
|
noInstancesGenerated2 ( ) { biweekly . util . Recurrence recur = new biweekly . util . Recurrence . Builder ( biweekly . util . Frequency . YEARLY ) . byMonth ( 2 ) . byMonthDay ( 30 ) . build ( ) ; biweekly . util . com . google . ical . values . DateValue start = new biweekly . util . com . google . ical . values . DateValueImpl ( 2000 , 1 , 1 ) ; biweekly . util . com . google . ical . iter . RecurrenceIterator it = biweekly . util . com . google . ical . iter . RecurrenceIteratorFactory . createRecurrenceIterator ( recur , start , biweekly . util . com . google . ical . iter . RRuleIteratorImplTest . UTC ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return ( i ) < ( datesUtc . length ) ; }
|
org . junit . Assert . assertFalse ( it . hasNext ( ) )
|
testBuildWithDisabledStatusCOnstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . education . form . type . EducationFormType context = new org . lnu . is . domain . education . form . type . EducationFormType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>EducationFormType<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . education . form . type . EducationFormType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
testNewDelegateProxy ( ) { edu . illinois . library . cantaloupe . resource . RequestContext context = new edu . illinois . library . cantaloupe . resource . RequestContext ( ) ; "<AssertPlaceHolder>" ; } newDelegateProxy ( edu . illinois . library . cantaloupe . resource . RequestContext ) { if ( edu . illinois . library . cantaloupe . script . DelegateProxyService . isEnabled ( ) ) { return new edu . illinois . library . cantaloupe . script . DelegateProxy ( context ) ; } else { throw new edu . illinois . library . cantaloupe . script . DisabledException ( ) ; } }
|
org . junit . Assert . assertNotNull ( instance . newDelegateProxy ( context ) )
|
testGetDesktopWindow_succeeds ( ) { doTestWithNotepad ( ( instance , app ) -> { mmarquee . automation . controls . AutomationWindow window = instance . getDesktopWindow ( getLocal ( "notepad.title" ) ) ; "<AssertPlaceHolder>" ; } ) ; } getLocal ( java . lang . String ) { return mmarquee . automation . BaseAutomationTest . locals . getString ( key ) ; }
|
org . junit . Assert . assertNotNull ( window )
|
testWhereOrRule ( ) { java . lang . String s = "select<sp>*<sp>from<sp>dbo.test<sp>where<sp>a<sp>=<sp>4<sp>or<sp>x<sp>=<sp>5<sp>OR<sp>f<sp>=<sp>8<sp>Or<sp>t<sp>=<sp>0;" ; org . sonar . plugins . tsql . checks . custom . Rule sut = org . sonar . plugins . tsql . checks . CustomPluginChecks . getWhereWithOrVsUnionRule ( ) ; org . sonar . plugins . tsql . helpers . AntlrUtils . print ( s ) ; org . sonar . plugins . tsql . rules . issues . TsqlIssue [ ] issues = org . sonar . plugins . tsql . helpers . AntlrUtils . verify ( sut , s ) ; "<AssertPlaceHolder>" ; } verify ( org . sonar . plugins . tsql . checks . custom . Rule , java . lang . String ) { org . sonar . plugins . tsql . antlr . AntlrContext request = org . sonar . plugins . tsql . helpers . AntlrUtils . getRequest ( text ) ; org . sonar . plugins . tsql . antlr . visitors . CustomRulesVisitor visitor = new org . sonar . plugins . tsql . antlr . visitors . CustomRulesVisitor ( new org . sonar . plugins . tsql . antlr . CandidateRule ( "test" , rule ) ) ; org . sonar . plugins . tsql . antlr . visitors . CustomTreeVisitor treeVisitor = new org . sonar . plugins . tsql . antlr . visitors . CustomTreeVisitor ( visitor ) ; treeVisitor . visit ( request . getRoot ( ) ) ; org . sonar . plugins . tsql . antlr . CandidateNode [ ] nodes = visitor . getNodes ( ) ; final org . sonar . plugins . tsql . antlr . issues . CustomIssuesProvider provider = new org . sonar . plugins . tsql . antlr . issues . CustomIssuesProvider ( ) ; org . sonar . plugins . tsql . rules . issues . TsqlIssue [ ] issues = provider . getIssues ( request , nodes ) ; return issues ; }
|
org . junit . Assert . assertEquals ( 3 , issues . length )
|
nodeInDatabaseShouldBeRetrievable ( ) { long nodeId = new org . neo4j . server . rest . domain . GraphDbHelper ( org . neo4j . server . rest . web . DatabaseActionsTest . database ) . createNode ( ) ; "<AssertPlaceHolder>" ; } getNode ( long ) { try { return output . ok ( actions . getNode ( nodeId ) ) ; } catch ( org . neo4j . server . rest . web . NodeNotFoundException e ) { return output . notFound ( e ) ; } }
|
org . junit . Assert . assertNotNull ( org . neo4j . server . rest . web . DatabaseActionsTest . actions . getNode ( nodeId ) )
|
testFastutil2ObjMap ( ) { it . unimi . dsi . fastutil . chars . Char2ObjectMap < org . apache . hadoop . io . IntWritable > list = new it . unimi . dsi . fastutil . chars . Char2ObjectOpenHashMap ( ) ; list . put ( 'a' , new org . apache . hadoop . io . IntWritable ( 6 ) ) ; list . put ( 'q' , new org . apache . hadoop . io . IntWritable ( 7 ) ) ; list . put ( 'w' , new org . apache . hadoop . io . IntWritable ( 8 ) ) ; list . put ( 'e' , new org . apache . hadoop . io . IntWritable ( 9 ) ) ; list . put ( 'r' , new org . apache . hadoop . io . IntWritable ( 7 ) ) ; list . put ( 'c' , null ) ; it . unimi . dsi . fastutil . chars . Char2ObjectMap < org . apache . hadoop . io . IntWritable > deser = org . apache . giraph . writable . kryo . KryoWritableWrapperTest . kryoSerDeser ( list ) ; deser . put ( 'b' , null ) ; list . put ( 'b' , null ) ; "<AssertPlaceHolder>" ; } put ( int , java . lang . Object ) { switch ( field ) { case 0 : vertexId = ( ( java . lang . CharSequence ) ( value ) ) ; break ; case 1 : vertexValue = ( ( java . lang . Float ) ( value ) ) ; break ; case 2 : edges = ( ( java . util . Map < java . lang . CharSequence , java . lang . CharSequence > ) ( ( value instanceof org . apache . gora . persistency . Dirtyable ) ? value : new org . apache . gora . persistency . impl . DirtyMapWrapper ( ( ( java . util . Map ) ( value ) ) ) ) ) ; break ; default : throw new org . apache . avro . AvroRuntimeException ( "Bad<sp>index" ) ; } }
|
org . junit . Assert . assertEquals ( list , deser )
|
testNullReturnedOnClosedParserOnNextValue ( ) { "<AssertPlaceHolder>" ; } nextValue ( ) { com . fasterxml . jackson . core . JsonToken t = nextToken ( ) ; if ( t == ( com . fasterxml . jackson . core . JsonToken . FIELD_NAME ) ) { t = nextToken ( ) ; } return t ; }
|
org . junit . Assert . assertNull ( parser . nextValue ( ) )
|
getTestMethodNamePrefix_A$TestMethodMeta ( ) { java . lang . String sourceCodeString = "package<sp>hoge.foo;<sp>import<sp>java.util.List;<sp>public<sp>class<sp>Sample<sp>{<sp>public<sp>Sample()<sp>{}\r\n<sp>public<sp>int<sp>doSomething(String<sp>str,<sp>long<sp>longValue)<sp>throws<sp>Throwable<sp>{<sp>System.out.println(\"aaaa\")<sp>}<sp>}" ; org . junithelper . core . meta . ClassMeta targetClassMeta = classMetaExtractor . extract ( sourceCodeString ) ; generator . initialize ( targetClassMeta ) ; org . junithelper . core . meta . MethodMeta targetMethodMeta = targetClassMeta . methods . get ( 0 ) ; org . junithelper . core . meta . TestMethodMeta testMethodMeta = generator . getTestMethodMeta ( targetMethodMeta ) ; java . lang . String actual = generator . getTestMethodNamePrefix ( testMethodMeta ) ; java . lang . String expected = "doSomething_A$String$long" ; "<AssertPlaceHolder>" ; } getTestMethodNamePrefix ( org . junithelper . core . meta . TestMethodMeta ) { return getTestMethodNamePrefix ( testMethodMeta , null ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
hammingDistance ( ) { "<AssertPlaceHolder>" ; } hammingDistance ( ) { org . junit . Assert . assertNotNull ( org . simmetrics . metrics . StringDistances . hammingDistance ( ) ) ; }
|
org . junit . Assert . assertNotNull ( org . simmetrics . metrics . StringDistances . hammingDistance ( ) )
|
testSelectAllFromText3UsingMultipleStep ( ) { com . liferay . dynamic . data . mapping . form . values . query . DDMFormValuesQuery ddmFormValuesQuery = createDDMFormValuesQuery ( "//text3//*" ) ; java . util . List < com . liferay . dynamic . data . mapping . storage . DDMFormFieldValue > ddmFormFieldValues = ddmFormValuesQuery . selectDDMFormFieldValues ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( ddmFormFieldValues . toString ( ) , 7 , ddmFormFieldValues . size ( ) )
|
testLookupEnum ( ) { java . lang . String name = org . eclipse . tracecompass . ctf . core . tests . types . StructDefinitionTest . ENUM_ID ; org . eclipse . tracecompass . ctf . core . event . types . EnumDefinition result = fixture . lookupEnum ( name ) ; "<AssertPlaceHolder>" ; } lookupEnum ( java . lang . String ) { return fEnums . get ( name ) ; }
|
org . junit . Assert . assertNotNull ( result )
|
testDateSupport ( ) { io . cdap . cdap . api . data . schema . Schema schema = io . cdap . cdap . api . data . schema . Schema . recordOf ( "test" , Schema . Field . of ( "id" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . INT ) ) , Schema . Field . of ( "name" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) , Schema . Field . of ( "date" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . LogicalType . DATE ) ) ) ; java . time . LocalDate expected = java . time . LocalDate . of ( 2002 , 11 , 18 ) ; io . cdap . cdap . api . data . format . StructuredRecord record = io . cdap . cdap . api . data . format . StructuredRecord . builder ( schema ) . set ( "id" , 1 ) . set ( "name" , "test" ) . setDate ( "date" , expected ) . build ( ) ; java . time . LocalDate actual = record . getDate ( "date" ) ; "<AssertPlaceHolder>" ; } getDate ( java . lang . String ) { return getDate ( findColumn ( s ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testOnPlayerInteractFarmland ( ) { when ( clickedBlock . getType ( ) ) . thenReturn ( Material . FARMLAND ) ; org . bukkit . event . player . PlayerInteractEvent e = new org . bukkit . event . player . PlayerInteractEvent ( player , org . bukkit . event . block . Action . PHYSICAL , item , clickedBlock , org . bukkit . block . BlockFace . UP ) ; world . bentobox . bentobox . listeners . flags . protection . PhysicalInteractionListener i = new world . bentobox . bentobox . listeners . flags . protection . PhysicalInteractionListener ( ) ; i . onPlayerInteract ( e ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( notifier ) . notify ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . eq ( "protection.protected" ) ) ; } isCancelled ( ) { return cancelled ; }
|
org . junit . Assert . assertTrue ( e . isCancelled ( ) )
|
TestGetPowerStateRunning ( ) { com . vmware . admiral . compute . kubernetes . entities . pods . ContainerStatus status = new com . vmware . admiral . compute . kubernetes . entities . pods . ContainerStatus ( ) ; status . state = new com . vmware . admiral . compute . kubernetes . entities . pods . ContainerState ( ) ; status . state . running = new com . vmware . admiral . compute . kubernetes . entities . pods . ContainerStateRunning ( ) ; com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState state = com . vmware . admiral . adapter . kubernetes . KubernetesContainerStateMapper . getPowerState ( status ) ; "<AssertPlaceHolder>" ; } getPowerState ( com . vmware . admiral . compute . kubernetes . entities . pods . ContainerStatus ) { if ( ( status == null ) || ( ( status . state ) == null ) ) { return com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState . UNKNOWN ; } if ( ( status . state . running ) != null ) { return com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState . RUNNING ; } else if ( ( status . state . waiting ) != null ) { return com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState . PAUSED ; } else if ( ( status . state . terminated ) != null ) { return com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState . STOPPED ; } else { return com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState . UNKNOWN ; } }
|
org . junit . Assert . assertEquals ( PowerState . RUNNING , state )
|
testFromJsonObjectNoData ( ) { javax . json . JsonObject jsonObject = javax . json . Json . createObjectBuilder ( ) . build ( ) ; edu . wpi . rail . jrosbridge . messages . std . UInt8 data = edu . wpi . rail . jrosbridge . messages . std . UInt8 . fromJsonObject ( jsonObject ) ; "<AssertPlaceHolder>" ; } getData ( ) { return this . data ; }
|
org . junit . Assert . assertEquals ( ( ( byte ) ( 0 ) ) , data . getData ( ) )
|
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . blogs . model . BlogsEntry > blogsEntries = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( blogsEntries . isEmpty ( ) )
|
testReadFailure ( ) { final org . opendaylight . mdsal . common . api . ReadFailedException cause = new org . opendaylight . mdsal . common . api . ReadFailedException ( "fail" ) ; doReturn ( immediateFailedFluentFuture ( cause ) ) . when ( mockReadTx ) . read ( org . opendaylight . netconf . topology . singleton . impl . actors . ReadTransactionActorTestAdapter . STORE , org . opendaylight . netconf . topology . singleton . impl . actors . ReadTransactionActorTestAdapter . PATH ) ; actorRef . tell ( new org . opendaylight . netconf . topology . singleton . messages . transactions . ReadRequest ( org . opendaylight . netconf . topology . singleton . impl . actors . ReadTransactionActorTestAdapter . STORE , org . opendaylight . netconf . topology . singleton . impl . actors . ReadTransactionActorTestAdapter . PATH ) , probe . ref ( ) ) ; verify ( mockReadTx ) . read ( org . opendaylight . netconf . topology . singleton . impl . actors . ReadTransactionActorTestAdapter . STORE , org . opendaylight . netconf . topology . singleton . impl . actors . ReadTransactionActorTestAdapter . PATH ) ; final akka . actor . Status . Failure response = probe . expectMsgClass ( akka . actor . Status . Failure . class ) ; "<AssertPlaceHolder>" ; } read ( org . opendaylight . mdsal . common . api . LogicalDatastoreType , org . opendaylight . yangtools . yang . data . api . YangInstanceIdentifier ) { return delegateReadTx . read ( store , path ) ; }
|
org . junit . Assert . assertEquals ( cause , response . cause ( ) )
|
getCollaboratorsEntityHasNoDocumentReferenceResultsInEmptyCollection ( ) { when ( this . entity . getDocumentReference ( ) ) . thenReturn ( null ) ; final java . util . Collection < org . phenotips . data . permissions . Collaborator > result = this . component . getCollaborators ( this . entity ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return this . properties . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( result . isEmpty ( ) )
|
test_forward ( ) { for ( int i = 0 ; i < 2 ; i ++ ) { browser . forward ( ) ; } boolean result = browser . forward ( ) ; "<AssertPlaceHolder>" ; } forward ( ) { checkWidget ( ) ; return webBrowser . forward ( ) ; }
|
org . junit . Assert . assertFalse ( result )
|
shouldReturnEmptyQueryOnEmptyListOfSinter ( ) { when ( localParamsMock . get ( "command" ) ) . thenReturn ( "sinter" ) ; when ( localParamsMock . get ( "key" ) ) . thenReturn ( "key1" ) ; when ( localParamsMock . get ( "key1" ) ) . thenReturn ( "key2" ) ; when ( localParamsMock . getParameterNamesIterator ( ) ) . thenReturn ( com . sematext . solr . redis . Arrays . asList ( "command" , "key" , "key1" ) . iterator ( ) ) ; when ( localParamsMock . get ( QueryParsing . V ) ) . thenReturn ( "string_field" ) ; when ( jedisMock . sinter ( anyString ( ) , anyString ( ) ) ) . thenReturn ( new com . sematext . solr . redis . HashSet < java . lang . String > ( ) ) ; when ( requestMock . getSchema ( ) ) . thenReturn ( schema ) ; when ( schema . getQueryAnalyzer ( ) ) . thenReturn ( new org . apache . lucene . analysis . standard . StandardAnalyzer ( ) ) ; redisQParser = new com . sematext . solr . redis . RedisQParser ( "string_field" , localParamsMock , paramsMock , requestMock , commandHandler ) ; final org . apache . lucene . search . Query query = redisQParser . parse ( ) ; verify ( jedisMock ) . sinter ( "key1" , "key2" ) ; org . apache . lucene . search . IndexSearcher searcher = new org . apache . lucene . search . IndexSearcher ( new org . apache . lucene . index . MultiReader ( ) ) ; final com . sematext . solr . redis . Set < org . apache . lucene . index . Term > terms = com . sematext . solr . redis . TestRedisQParser . extractTerms ( searcher , query ) ; "<AssertPlaceHolder>" ; } extractTerms ( org . apache . lucene . search . IndexSearcher , org . apache . lucene . search . Query ) { final com . sematext . solr . redis . Set < org . apache . lucene . index . Term > terms = new com . sematext . solr . redis . HashSet ( ) ; org . apache . lucene . search . Query rewrittenQuery = searcher . rewrite ( query ) ; if ( rewrittenQuery instanceof org . apache . lucene . search . ConstantScoreQuery ) { org . apache . lucene . search . ConstantScoreQuery constantScoreQuery = ( ( org . apache . lucene . search . ConstantScoreQuery ) ( rewrittenQuery ) ) ; rewrittenQuery = constantScoreQuery . getQuery ( ) ; } searcher . createNormalizedWeight ( rewrittenQuery , true ) . extractTerms ( terms ) ; return terms ; }
|
org . junit . Assert . assertEquals ( 0 , terms . size ( ) )
|
equalsTo ( ) { java . lang . Object object = new java . lang . Object ( ) ; doReturn ( object ) . when ( map ) . get ( object ) ; java . util . List < java . lang . Object > actualObjects = index . equalsTo ( object ) ; "<AssertPlaceHolder>" ; } get ( byte [ ] ) { return getClient ( ) . get ( key ) ; }
|
org . junit . Assert . assertEquals ( object , actualObjects . get ( 0 ) )
|
testMaakBerichtVoorSelectie ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Dienst dienst = nl . bzk . brp . domain . algemeen . AutAutUtil . zoekDienst ( nl . bzk . brp . domain . algemeen . TestAutorisaties . metSoortDienst ( SoortDienst . SELECTIE ) , SoortDienst . SELECTIE ) ; dienst . setSoortSelectie ( SoortSelectie . STANDAARD_SELECTIE . getId ( ) ) ; final nl . bzk . brp . domain . algemeen . Autorisatiebundel autorisatiebundel = new nl . bzk . brp . domain . algemeen . Autorisatiebundel ( nl . bzk . brp . domain . algemeen . TestAutorisaties . maak ( Rol . AFNEMER , dienst ) , dienst ) ; final java . util . List < nl . bzk . brp . domain . berichtmodel . VerwerkPersoonBericht > verwerkPersoonBerichten = new java . util . ArrayList ( ) ; final nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst persoonslijst = new nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst ( nl . bzk . brp . domain . leveringmodel . helper . TestBuilders . LEEG_PERSOON , 0L ) ; final nl . bzk . brp . domain . berichtmodel . BijgehoudenPersoon bijgehoudenPersoon = new nl . bzk . brp . domain . berichtmodel . BijgehoudenPersoon . Builder ( persoonslijst , new nl . bzk . brp . domain . berichtmodel . BerichtElement ( "test" ) ) . build ( ) ; java . util . List < nl . bzk . brp . domain . berichtmodel . BijgehoudenPersoon > bijgehoudenPersonen = com . google . common . collect . Lists . newArrayList ( bijgehoudenPersoon ) ; final nl . bzk . brp . domain . berichtmodel . BasisBerichtGegevens basisBerichtGegevens = nl . bzk . brp . domain . berichtmodel . BasisBerichtGegevens . builder ( ) . metParameters ( ) . metDienst ( dienst ) . metSoortSynchronisatie ( SoortSynchronisatie . VOLLEDIG_BERICHT ) . eindeParameters ( ) . build ( ) ; final nl . bzk . brp . domain . berichtmodel . VerwerkPersoonBericht bericht = new nl . bzk . brp . domain . berichtmodel . VerwerkPersoonBericht ( basisBerichtGegevens , autorisatiebundel , bijgehoudenPersonen ) ; verwerkPersoonBerichten . add ( bericht ) ; org . mockito . Mockito . when ( verwerkPersoonBerichtFactory . maakBerichten ( org . mockito . Mockito . any ( ) ) ) . thenReturn ( verwerkPersoonBerichten ) ; final nl . bzk . brp . domain . internbericht . selectie . SelectieAutorisatieBericht selectieAutorisatieBericht = new nl . bzk . brp . domain . internbericht . selectie . SelectieAutorisatieBericht ( ) ; nl . bzk . brp . service . selectie . verwerker . SelectieAutorisatiebundel selectieAutorisatiebundel = new nl . bzk . brp . service . selectie . verwerker . SelectieAutorisatiebundel ( autorisatiebundel , selectieAutorisatieBericht ) ; final java . util . List < nl . bzk . brp . domain . berichtmodel . VerwerkPersoonBericht > verwerkPersoonBerichtenReturned = selectieBerichtFactory . maakBerichten ( com . google . common . collect . Lists . newArrayList ( selectieAutorisatiebundel ) , persoonslijst ) ; "<AssertPlaceHolder>" ; } maakBerichten ( java . util . List , nl . bzk . brp . service . mutatielevering . dto . Mutatiehandeling ) { final java . util . List < nl . bzk . brp . service . mutatielevering . dto . Mutatiebericht > brpBerichten = com . google . common . collect . Lists . newLinkedList ( ) ; final java . util . Map < nl . bzk . brp . domain . algemeen . Autorisatiebundel , nl . bzk . brp . service . mutatielevering . dto . Mutatielevering > map = new java . util . HashMap ( ) ; for ( nl . bzk . brp . service . mutatielevering . dto . Mutatielevering mutatielevering : leveringList ) { map . put ( mutatielevering . getAutorisatiebundel ( ) , mutatielevering ) ; } final java . util . List < nl . bzk . brp . domain . berichtmodel . VerwerkPersoonBericht > berichten = mutatieleveringBerichtFactory . apply ( leveringList , mutatiehandeling ) ; for ( nl . bzk . brp . domain . berichtmodel . VerwerkPersoonBericht verwerkPersoonBericht : berichten ) { final java . util . Set < nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst > personenInBerichtSet = com . google . common . collect . Sets . newHashSet ( ) ; final java . util . List < nl . bzk . brp . domain . berichtmodel . BijgehoudenPersoon > bijgehoudenPersonen = verwerkPersoonBericht . getBijgehoudenPersonen ( ) ; for ( final nl . bzk . brp . domain . berichtmodel . BijgehoudenPersoon bijgehoudenPersoon : bijgehoudenPersonen ) { personenInBerichtSet . add ( bijgehoudenPersoon . getPersoonslijst ( ) ) ; } final nl . bzk . brp . service . mutatielevering . dto . Mutatielevering mutatielevering = map . get ( verwerkPersoonBericht . getAutorisatiebundel ( ) ) ; final java . lang . String berichtText = maakPersoonBerichtService . maakPersoonBericht ( verwerkPersoonBericht ) ; final nl . bzk . brp . domain . internbericht . verzendingmodel . SynchronisatieBerichtGegevens stuurgegevens = maakStuurgegevens ( mutatielevering , verwerkPersoonBericht , berichtText , mutatiehandeling ) ; brpBerichten . add ( new nl . bzk . brp . service . mutatielevering . dto . Mutatiebericht ( mutatielevering , personenInBerichtSet , berichtText , stuurgegevens ) ) ; } return brpBerichten ; }
|
org . junit . Assert . assertEquals ( verwerkPersoonBerichten , verwerkPersoonBerichtenReturned )
|
setVersionSetsTheVersion ( ) { java . lang . String versionStr = "abcdefg" ; byte [ ] data = new byte [ 1 ] ; com . microsoft . azure . sdk . iot . device . MessageType messageType = com . microsoft . azure . sdk . iot . device . MessageType . DEVICE_TWIN ; com . microsoft . azure . sdk . iot . device . transport . IotHubTransportMessage iotHubTransportMessage = new com . microsoft . azure . sdk . iot . device . transport . IotHubTransportMessage ( data , messageType ) ; iotHubTransportMessage . setVersion ( versionStr ) ; "<AssertPlaceHolder>" ; } getVersion ( ) { return this . version ; }
|
org . junit . Assert . assertEquals ( versionStr , iotHubTransportMessage . getVersion ( ) )
|
testModifyTicketAddGroupEmptyGroup ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyAddAccess ( ticketId , TicketModifyAddOrRemoveTypeEnum . TICKET_MODIFY_GROUP , "" ) ; "<AssertPlaceHolder>" ; } instanceForModifyAddAccess ( java . lang . String , org . irods . jargon . ticket . packinstr . TicketModifyAddOrRemoveTypeEnum , java . lang . String ) { if ( ( ticketId == null ) || ( ticketId . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>ticket<sp>id" ) ; } if ( addTypeEnum == null ) { throw new java . lang . IllegalArgumentException ( "null<sp>modify<sp>add<sp>permission<sp>type<sp>not<sp>set" ) ; } if ( ( modObject == null ) || ( modObject . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>modify<sp>add<sp>-<sp>user,<sp>group,<sp>or<sp>host" ) ; } return new org . irods . jargon . ticket . packinstr . TicketAdminInp ( TICKET_ADMIN_INP_API_NBR , "mod" , ticketId , "add" , addTypeEnum . getTextValue ( ) , modObject , BLANK ) ; }
|
org . junit . Assert . assertNotNull ( pi )
|
future_A$Function0 ( ) { java . util . concurrent . Future < java . lang . String > f = future ( new com . m3 . scalaflavor4j . F0 < java . lang . String > ( ) { public java . lang . String apply ( ) throws com . m3 . scalaflavor4j . Exception { java . lang . Thread . sleep ( 1000L ) ; return "foo" ; } } ) ; "<AssertPlaceHolder>" ; } apply ( ) { com . m3 . scalaflavor4j . MainFunction main = new com . m3 . scalaflavor4j . MainFunction ( ) { public void apply ( java . lang . String [ ] args ) throws com . m3 . scalaflavor4j . Exception { print . apply ( args . length ) ; com . m3 . scalaflavor4j . Seq . apply ( args ) . foreach ( new com . m3 . scalaflavor4j . VoidF1 < java . lang . String > ( ) { public void apply ( java . lang . String arg ) throws com . m3 . scalaflavor4j . Exception { print . apply ( arg ) ; } } ) ; } } ; main . apply ( new java . lang . String [ ] { "a" , "b" } ) ; }
|
org . junit . Assert . assertThat ( f . get ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( "foo" ) ) )
|
testRestoreWithFilterWhenAlreadyCalledAndNotMatching ( ) { final boolean required = true ; org . mockito . Mockito . when ( referencedEntry . restore ( required ) ) . thenReturn ( false ) ; org . mockito . Mockito . when ( referencedEntry . restore ( org . mockito . Mockito . eq ( required ) , org . mockito . Mockito . any ( ) ) ) . thenReturn ( false ) ; org . mockito . Mockito . doNothing ( ) . when ( entry ) . verifyPropertyAfterCompletion ( ) ; entry . restore ( required ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( referencedEntry ) . restore ( required ) ; org . mockito . Mockito . verify ( entry , org . mockito . Mockito . never ( ) ) . verifyPropertyAfterCompletion ( ) ; org . mockito . Mockito . verify ( referencedEntry , org . mockito . Mockito . never ( ) ) . restore ( org . mockito . Mockito . eq ( required ) , org . mockito . Mockito . any ( ) ) ; } restore ( boolean , java . nio . file . PathMatcher ) { org . apache . commons . lang . Validate . notNull ( filter , "invalid<sp>null<sp>path<sp>filter" ) ; if ( ( restored ) == null ) { this . restored = false ; if ( filter . matches ( path ) ) { this . restored = handleRestore ( required , filter ) ; } else { this . restored = handleRestoreWhenFilterNotMatching ( required ) ; } } return restored ; }
|
org . junit . Assert . assertThat ( entry . restore ( required , ( p ) -> false ) , org . hamcrest . Matchers . equalTo ( false ) )
|
testInvalidConf ( ) { com . streamsets . pipeline . stage . origin . eventhubs . EventHubConsumerSource eventHubConsumerSource = new com . streamsets . pipeline . stage . origin . eventhubs . EventHubConsumerSourceBuilder ( ) . namespaceName ( "inValidNamspaceName" ) . eventHubName ( "inValidSampleEventHub" ) . sasKeyName ( "inValidSasKeyName" ) . sasKey ( "inValidSasKey" ) . build ( ) ; com . streamsets . pipeline . sdk . PushSourceRunner sourceRunner = new com . streamsets . pipeline . sdk . PushSourceRunner . Builder ( com . streamsets . pipeline . stage . origin . eventhubs . EventHubConsumerDSource . class , eventHubConsumerSource ) . addOutputLane ( "a" ) . build ( ) ; java . util . List < com . streamsets . pipeline . api . Stage . ConfigIssue > issues = sourceRunner . runValidateConfigs ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return delegate . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , issues . size ( ) )
|
test_authentication_successful ( ) { when ( clientData . getUsername ( ) ) . thenReturn ( com . google . common . base . Optional . of ( "test" ) ) ; when ( clientData . getPassword ( ) ) . thenReturn ( com . google . common . base . Optional . of ( "pw" ) ) ; com . dcsquare . hivemq . plugin . stormpathplugin . callbacks . AuthenticationTest . TestAuthentication testAuthentication = new com . dcsquare . hivemq . plugin . stormpathplugin . callbacks . AuthenticationTest . TestAuthentication ( app , account ) ; "<AssertPlaceHolder>" ; } checkCredentials ( com . dcsquare . hivemq . spi . security . ClientCredentialsData ) { if ( ! ( clientData . getUsername ( ) . isPresent ( ) ) ) { log . info ( ( "Authentication<sp>failed<sp>" + ( clientData . getClientId ( ) ) ) ) ; throw new com . dcsquare . hivemq . spi . callback . exception . AuthenticationException ( "No<sp>Username<sp>provided" , com . dcsquare . hivemq . spi . message . ReturnCode . REFUSED_NOT_AUTHORIZED ) ; } java . lang . String username = clientData . getUsername ( ) . get ( ) ; if ( com . google . common . base . Strings . isNullOrEmpty ( username ) ) { log . info ( ( "Authentication<sp>failed<sp>" + ( clientData . getClientId ( ) ) ) ) ; throw new com . dcsquare . hivemq . spi . callback . exception . AuthenticationException ( "No<sp>Username<sp>provided" , com . dcsquare . hivemq . spi . message . ReturnCode . REFUSED_NOT_AUTHORIZED ) ; } account = getAuthenticatedAccount ( username , clientData . getPassword ( ) . or ( "" ) ) ; if ( ( account ) != null ) { log . info ( ( "Authentication<sp>successful<sp>" + ( clientData . getClientId ( ) ) ) ) ; return true ; } log . info ( ( "Authentication<sp>failed<sp>" + ( clientData . getClientId ( ) ) ) ) ; return false ; }
|
org . junit . Assert . assertTrue ( testAuthentication . checkCredentials ( clientData ) )
|
testBerichtMetOverrulMetOverrulbareFouten1 ( ) { nl . bzk . brp . business . dto . bijhouding . AbstractBijhoudingsBericht bericht = new nl . bzk . brp . business . dto . bijhouding . VerhuizingBericht ( ) ; nl . bzk . brp . business . dto . BerichtContext context = new nl . bzk . brp . business . dto . BerichtContext ( new nl . bzk . brp . business . dto . BerichtenIds ( 1L , 1L ) , 1 , new nl . bzk . brp . model . objecttype . operationeel . statisch . Partij ( ) , "ref" ) ; bericht . setOverruledMeldingen ( java . util . Arrays . asList ( new nl . bzk . brp . model . validatie . OverruleMelding ( MeldingCode . AUTH0001 . getNaam ( ) ) ) ) ; nl . bzk . brp . business . dto . BerichtResultaat resultaat = new nl . bzk . brp . business . dto . BerichtResultaat ( java . util . Arrays . asList ( new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . INFO , nl . bzk . brp . model . validatie . MeldingCode . BRAL0012 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . FOUT_OVERRULEBAAR , nl . bzk . brp . model . validatie . MeldingCode . AUTH0001 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . INFO , nl . bzk . brp . model . validatie . MeldingCode . BRAL2032 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . FOUT_OVERRULEBAAR , nl . bzk . brp . model . validatie . MeldingCode . AUTH0001 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . FOUT_OVERRULEBAAR , nl . bzk . brp . model . validatie . MeldingCode . AUTH0001 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . FOUT_OVERRULEBAAR , nl . bzk . brp . model . validatie . MeldingCode . BRAL2033 ) , new nl . bzk . brp . model . validatie . Melding ( nl . bzk . brp . model . validatie . SoortMelding . WAARSCHUWING , nl . bzk . brp . model . validatie . MeldingCode . ALG0001 ) ) ) ; bedrijfsregelValidatieStap . corrigeerVoorOverrulebareFouten ( bericht , context , resultaat ) ; "<AssertPlaceHolder>" ; } bevatVerwerkingStoppendeFouten ( ) { for ( nl . bzk . brp . model . validatie . Melding melding : getMeldingen ( ) ) { if ( ( ( melding . getSoort ( ) ) == ( nl . bzk . brp . model . algemeen . stamgegeven . ber . SoortMelding . DEBLOKKEERBAAR ) ) || ( ( melding . getSoort ( ) ) == ( nl . bzk . brp . model . algemeen . stamgegeven . ber . SoortMelding . FOUT ) ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertEquals ( true , resultaat . bevatVerwerkingStoppendeFouten ( ) )
|
testFoldersCountWhenAddingWikiPage ( ) { int initialFoldersCount = com . liferay . document . library . kernel . service . DLFolderLocalServiceUtil . getDLFoldersCount ( ) ; addWikiPage ( ) ; "<AssertPlaceHolder>" ; } getDLFoldersCount ( ) { return com . liferay . document . library . kernel . service . DLFolderLocalServiceUtil . getService ( ) . getDLFoldersCount ( ) ; }
|
org . junit . Assert . assertEquals ( initialFoldersCount , com . liferay . document . library . kernel . service . DLFolderLocalServiceUtil . getDLFoldersCount ( ) )
|
testCreateWithAtomicLongReturnsInteger ( ) { final org . jsoar . kernel . symbols . Symbol s = org . jsoar . kernel . symbols . Symbols . create ( syms , new java . util . concurrent . atomic . AtomicLong ( 43 ) ) ; "<AssertPlaceHolder>" ; } asInteger ( ) { return null ; }
|
org . junit . Assert . assertEquals ( 43 , s . asInteger ( ) . getValue ( ) )
|
getNextInvocationTime_A$Calendar$Crontab_fixedInvocationAndRenew ( ) { java . util . Calendar arg0 = com . github . seratch . taskun . util . CalendarUtil . getCalendar ( "2010" , "4" , "21" , "22" , "00" , "01" ) ; java . util . Calendar expected = com . github . seratch . taskun . util . CalendarUtil . getCalendar ( "2010" , "4" , "22" , "5" , "00" , "00" ) ; com . github . seratch . taskun . scheduler . crond . Crontab crontab = new com . github . seratch . taskun . scheduler . crond . Crontab ( ) ; crontab . minuteElement = new com . github . seratch . taskun . scheduler . crond . CrontabElement ( "0" ) ; crontab . hourElement = new com . github . seratch . taskun . scheduler . crond . CrontabElement ( "5,11,22" ) ; crontab . hourFixedInvocations = new java . util . ArrayList < java . lang . Integer > ( ) ; crontab . hourFixedInvocations . add ( 5 ) ; crontab . hourFixedInvocations . add ( 11 ) ; crontab . hourFixedInvocations . add ( 22 ) ; crontab . dayElement = new com . github . seratch . taskun . scheduler . crond . CrontabElement ( "*" ) ; crontab . monthElement = new com . github . seratch . taskun . scheduler . crond . CrontabElement ( "*" ) ; crontab . dayOfWeekElement = new com . github . seratch . taskun . scheduler . crond . CrontabElement ( "*" ) ; long actual = parser . getNextInvocationTime ( arg0 , crontab ) ; "<AssertPlaceHolder>" ; } getNextInvocationTime ( java . util . Calendar , com . github . seratch . taskun . scheduler . crond . Crontab ) { int millisecond = com . github . seratch . taskun . util . CalendarUtil . getMillisecond ( currentTime ) ; if ( millisecond > 0 ) { currentTime . set ( Calendar . MILLISECOND , 0 ) ; currentTime . add ( Calendar . SECOND , 1 ) ; } int second = com . github . seratch . taskun . util . CalendarUtil . getSecond ( currentTime ) ; int minute = com . github . seratch . taskun . util . CalendarUtil . getMinute ( currentTime ) ; if ( second > 0 ) { minute ++ ; } if ( crontab . minuteElement . isFixedValue ( ) ) { minute = getFixedNextInvocationValue ( minute , 59 , crontab . minuteElement ) ; } else { minute = getFixedSameOrNextInvocationValue ( minute , crontab . minuteFixedInvocations ) ; } int hour = com . github . seratch . taskun . util . CalendarUtil . get24Hour ( currentTime ) ; if ( crontab . hourElement . isFixedValue ( ) ) { int newHour = crontab . hourElement . toInt ( ) ; if ( newHour > hour ) { if ( crontab . minuteElement . isFixedValue ( ) ) { minute = getFixedNextInvocationValue ( minute , 59 , crontab . minuteElement ) ; } else { minute = getFixedMinimumInvocationValue ( crontab . minuteFixedInvocations ) ; } } hour = newHour ; } crontab = replaceWildcardsOfMinuteOrHourValue ( crontab ) ; int day = com . github . seratch . taskun . util . CalendarUtil . getDay ( currentTime ) ; if ( crontab . dayElement . isFixedValue ( ) ) { day = crontab . dayElement . toInt ( ) ; } int dayOfWeek = getCrontabDayOfWeekNumber ( currentTime ) ; if ( dayOfWeek >= 7 ) { dayOfWeek = dayOfWeek - 7 ; } int month = com . github . seratch . taskun . util . CalendarUtil . getMonth ( currentTime ) ; if ( crontab . monthElement . isFixedValue ( ) ) { month = crontab . monthElement . toInt ( ) ; } int year = com . github . seratch . taskun . util . CalendarUtil . getYear ( currentTime ) ; java . util . Calendar nextInvocationTime = com . github . seratch . taskun . util . CalendarUtil . getCalendar ( year , month , day , hour , minute , 0 ) ; boolean isMinuteModified = false ; boolean isHourModified = false ; boolean isDayModified = false ; boolean isMonthModified = false ; boolean isDayOfWeekPrior = true ; int loopCounter = 0 ; if ( crontab . dayOfWeekElement . isNotWildcard ( ) ) { while ( ( ( nextInvocationTime . getTimeInMillis ( ) ) <= ( currentTime . getTimeInMillis ( ) ) ) || ( isDayOfWeekPrior && ( isDayOfWeekNotCameAt ( crontab , nextInvocationTime , dayOfWeek ) ) ) ) { if ( loopCounter >= 100 ) { throw new java . lang . IllegalStateException ( "Cannot<sp>get<sp>next<sp>invocation<sp>time<sp>of<sp>crontab<sp>scheduled<sp>task..." ) ; } if ( isMinuteModified || ( crontab . minuteElement . isWildcard ( ) ) ) { if ( isHourModified || ( crontab . hourElement . isNotWildcard ( ) ) ) { if ( isHourModified || ( crontab . hourElement . isFixedValue ( ) ) ) { if ( isDayModified ) { if ( isMonthModified || ( crontab . monthElement . isNotWildcard ( ) ) ) { if ( isMonthModified || ( crontab . monthElement . isFixedValue ( ) ) ) { nextInvocationTime . add ( Calendar . YEAR , 1 ) ; } else { nextInvocationTime . set ( Calendar . MONTH , getFixedNextInvocationValue ( month , 12 , crontab . monthElement ) ) ; isMonthModified = true ; } } else { nextInvocationTime . add ( Calendar . MONTH , 1 ) ; isMonthModified = true ; } } else { boolean isDayOfWeekNotContainedInCrontab = ! ( isInvocationValueContainedInCrontabValue ( dayOfWeek , 6 , crontab . dayOfWeekElement ) ) ; boolean isNextInvocationNotInThisDate = ( currentTime . getTimeInMillis ( ) ) > ( nextInvocationTime . getTimeInMillis ( ) ) ; if ( isDayOfWeekNotContainedInCrontab || isNextInvocationNotInThisDate ) { int addDays = 0 ; int nextDayOfWeek = getFixedNextInvocationValue ( dayOfWeek , 6 , crontab . dayOfWeekElement ) ; if ( nextDayOfWeek
|
org . junit . Assert . assertTrue ( ( ( expected . getTimeInMillis ( ) ) == actual ) )
|
testHashCodeEquals ( ) { org . spf4j . base . avro . Method m = new org . spf4j . base . avro . Method ( "org.apache.avro.Schema" , "toString" ) ; org . spf4j . base . avro . Method m2 = new org . spf4j . base . avro . Method ( "org.apache.avro.Schema" , "toString" ) ; org . spf4j . stackmonitor . MethodMapTest . LOG . debug ( "{}<sp>{}<sp>{}" , m . hashCode ( ) , m2 . hashCode ( ) , m . equals ( m2 ) ) ; org . spf4j . stackmonitor . MethodMap mm = new org . spf4j . stackmonitor . MethodMap ( ) ; org . spf4j . stackmonitor . MethodMapTest . LOG . debug ( "{}<sp>{}<sp>{}" , mm . hash ( m ) , mm . hash ( m2 ) , mm . equals ( m , m2 ) ) ; "<AssertPlaceHolder>" ; } hash ( java . lang . Object ) { org . spf4j . base . avro . Method m = ( ( org . spf4j . base . avro . Method ) ( notnull ) ) ; return ( m . getName ( ) . hashCode ( ) ) + ( ( m . getDeclaringClass ( ) . hashCode ( ) ) * 7 ) ; }
|
org . junit . Assert . assertEquals ( mm . hash ( m ) , mm . hash ( m2 ) , 0 )
|
testPut_VoidValue_CharSequenceNodeFactory ( ) { com . googlecode . concurrenttrees . radix . ConcurrentRadixTree < com . googlecode . concurrenttrees . radix . node . concrete . voidvalue . VoidValue > tree = new com . googlecode . concurrenttrees . radix . ConcurrentRadixTree < com . googlecode . concurrenttrees . radix . node . concrete . voidvalue . VoidValue > ( new com . googlecode . concurrenttrees . radix . node . concrete . DefaultCharSequenceNodeFactory ( ) ) ; tree . put ( "FOO" , VoidValue . SINGLETON ) ; tree . put ( "FOOBAR" , VoidValue . SINGLETON ) ; java . lang . String expected = "○\n" + ( "└──<sp>○<sp>FOO<sp>(-)\n" + "<sp>└──<sp>○<sp>BAR<sp>(-)\n" ) ; java . lang . String actual = com . googlecode . concurrenttrees . common . PrettyPrinter . prettyPrint ( tree ) ; "<AssertPlaceHolder>" ; } prettyPrint ( com . googlecode . concurrenttrees . radix . node . util . PrettyPrintable ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; com . googlecode . concurrenttrees . common . PrettyPrinter . prettyPrint ( tree . getNode ( ) , sb , "" , true , true ) ; return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
createRegistrationStateQuerySucceed ( tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . QuerySpecification ) { final java . lang . String enrollmentGroupId = "valid-enrollmentGroupId" ; tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . ProvisioningServiceClient provisioningServiceClient = createClient ( ) ; new mockit . NonStrictExpectations ( ) { { mockit . Deencapsulation . invoke ( mockedRegistrationStatusManager , "createEnrollmentGroupQuery" , mockedQuerySpecification , enrollmentGroupId , 0 ) ; times = 1 ; } } ; tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . Query query = provisioningServiceClient . createEnrollmentGroupRegistrationStateQuery ( mockedQuerySpecification , enrollmentGroupId ) ; "<AssertPlaceHolder>" ; } createEnrollmentGroupRegistrationStateQuery ( com . microsoft . azure . sdk . iot . provisioning . service . QuerySpecification , java . lang . String ) { return registrationStatusManager . createEnrollmentGroupQuery ( querySpecification , enrollmentGroupId , 0 ) ; }
|
org . junit . Assert . assertNotNull ( query )
|
testGetValidKontonummerFromInvalidKontonummerWrongChecksum ( ) { no . bekk . bekkopen . banking . Kontonummer knr = no . bekk . bekkopen . banking . KontonummerValidator . getAndForceValidKontonummer ( no . bekk . bekkopen . banking . KontonummerValidatorTest . KONTONUMMER_INVALID_CHECKSUM ) ; "<AssertPlaceHolder>" ; } isValid ( java . lang . String ) { try { no . bekk . bekkopen . banking . KontonummerValidator . getKontonummer ( kontonummer ) ; return true ; } catch ( java . lang . IllegalArgumentException e ) { return false ; } }
|
org . junit . Assert . assertTrue ( no . bekk . bekkopen . banking . KontonummerValidator . isValid ( knr . toString ( ) ) )
|
testFilteredEagerEvaluation ( ) { java . lang . String str = "package<sp>org.simple<sp>\n" + ( ( ( ( ( ( ( ( ( "rule<sp>xxx<sp>@Propagation(EAGER)<sp>\n" + "when<sp>\n" ) + "<sp>$s<sp>:<sp>String()\n" ) + "then<sp>\n" ) + "end<sp>\n" ) + "rule<sp>yyy<sp>@Propagation(EAGER)<sp>\n" ) + "when<sp>\n" ) + "<sp>$s<sp>:<sp>String()\n" ) + "then<sp>\n" ) + "end<sp>\n" ) ; org . kie . api . runtime . KieSessionConfiguration conf = org . drools . core . impl . KnowledgeBaseFactory . newKnowledgeSessionConfiguration ( ) ; conf . setOption ( new org . kie . internal . runtime . conf . ForceEagerActivationOption . FILTERED ( new org . kie . internal . runtime . conf . ForceEagerActivationFilter ( ) { @ org . drools . compiler . common . Override public boolean accept ( org . kie . api . definition . rule . Rule rule ) { return rule . getName ( ) . equals ( "xxx" ) ; } } ) ) ; org . kie . api . KieBase kbase = loadKnowledgeBaseFromString ( str ) ; org . kie . api . runtime . KieSession ksession = createKnowledgeSession ( kbase , conf ) ; final java . util . List list = new java . util . ArrayList ( ) ; org . kie . api . event . rule . AgendaEventListener agendaEventListener = new org . kie . api . event . rule . DefaultAgendaEventListener ( ) { public void matchCreated ( org . kie . api . event . rule . MatchCreatedEvent event ) { list . add ( "activated" ) ; } } ; ksession . addEventListener ( agendaEventListener ) ; ksession . insert ( "test" ) ; ( ( org . drools . core . common . InternalWorkingMemory ) ( ksession ) ) . flushPropagations ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return rulesFired . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , list . size ( ) )
|
testFormat ( ) { java . lang . String formatted = new pl . jgwozdz . brickcommand . brick . helper . HexDump ( "\r\n" ) . format ( pl . jgwozdz . brickcommand . brick . helper . HexDumpTest . data ) ; java . lang . String expected = "2600<sp>0100<sp>819e<sp>084d<sp>6169<sp>6c42<sp>6f78<sp>0017<sp>0054<sp>6869<sp>7320<sp>6973<sp>2061<sp>206d<sp>6573<sp>7361<sp>&......MailBox...This<sp>is<sp>a<sp>messa\r\n" + "6765<sp>2074<sp>6578<sp>7400<sp>ge<sp>text." ; "<AssertPlaceHolder>" ; } format ( byte [ ] ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; java . lang . StringBuilder print = new java . lang . StringBuilder ( ) ; int c0 = 0 ; int c1 = 0 ; int c2 = 0 ; for ( byte b : rawMessage ) { sb . append ( java . lang . String . format ( "%02x" , b ) ) ; if ( ( b >= 32 ) && ( b < 127 ) ) { print . append ( ( ( char ) ( ( int ) ( b ) ) ) ) ; } else print . append ( '.' ) ; c0 ++ ; c1 ++ ; c2 ++ ; if ( c1 == 2 ) { sb . append ( '<sp>' ) ; c1 = 0 ; } if ( c2 == 32 ) { sb . append ( "<sp>" ) . append ( print ) . append ( lineSep ) ; c2 = 0 ; print = new java . lang . StringBuilder ( ) ; } } while ( c2 < 32 ) { sb . append ( "<sp>" ) ; print . append ( '<sp>' ) ; c0 ++ ; c1 ++ ; c2 ++ ; if ( c1 == 2 ) { sb . append ( '<sp>' ) ; c1 = 0 ; } } sb . append ( "<sp>" ) . append ( print ) ; return sb . toString ( ) . trim ( ) ; }
|
org . junit . Assert . assertEquals ( expected , formatted )
|
testDoesNotEqualSecondNull ( ) { com . rmn . pairwise . Molecule molecule1 = new com . rmn . pairwise . Molecule ( new int [ ] { 1 , 0 } ) ; com . rmn . pairwise . Molecule molecule2 = new com . rmn . pairwise . Molecule ( null ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; com . rmn . pairwise . Molecule that = ( ( com . rmn . pairwise . Molecule ) ( o ) ) ; if ( ( atoms ) != null ? ! ( java . util . Arrays . equals ( atoms , that . getAtoms ( ) ) ) : ( that . getAtoms ( ) ) != null ) return false ; return true ; }
|
org . junit . Assert . assertFalse ( molecule1 . equals ( molecule2 ) )
|
testGetFWRevisionFail ( ) { org . eclipse . kura . bluetooth . le . BluetoothLeGattService infoSvcMock = mock ( org . eclipse . kura . bluetooth . le . BluetoothLeGattService . class ) ; doThrow ( new org . eclipse . kura . KuraBluetoothResourceNotFoundException ( "test" ) ) . when ( infoSvcMock ) . findCharacteristic ( TiSensorTagGatt . UUID_DEVINFO_FIRMWARE_REVISION ) ; org . eclipse . kura . example . ble . tisensortag . tinyb . TiSensorTagBuilder builder = new org . eclipse . kura . example . ble . tisensortag . tinyb . TiSensorTagBuilder ( true , true ) . addService ( TiSensorTagGatt . UUID_DEVINFO_SERVICE , infoSvcMock ) ; org . eclipse . kura . example . ble . tisensortag . tinyb . TiSensorTag tag = builder . build ( true ) ; "<AssertPlaceHolder>" ; } getFirmareRevision ( ) { return this . firmwareRevision ; }
|
org . junit . Assert . assertEquals ( "" , tag . getFirmareRevision ( ) )
|
c01_int ( ) { java . lang . String o = org . apache . juneau . rest . client . remote . BodyAnnotationTest . c01 . postC01 ( 1 ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( "1" , o )
|
testEnsureProxy ( ) { final java . util . function . Function < java . lang . Long , org . opendaylight . controller . cluster . databroker . actors . dds . AbstractProxyTransaction > function = org . opendaylight . controller . cluster . databroker . actors . dds . AbstractClientHandleTest . mock ( java . util . function . Function . class ) ; final org . opendaylight . controller . cluster . databroker . actors . dds . AbstractProxyTransaction expected = org . opendaylight . controller . cluster . databroker . actors . dds . AbstractClientHandleTest . mock ( org . opendaylight . controller . cluster . databroker . actors . dds . AbstractProxyTransaction . class ) ; when ( function . apply ( 0L ) ) . thenReturn ( expected ) ; final org . opendaylight . controller . cluster . databroker . actors . dds . AbstractProxyTransaction proxy = handle . ensureProxy ( org . opendaylight . controller . cluster . databroker . actors . dds . AbstractClientHandleTest . PATH , function ) ; verify ( function ) . apply ( 0L ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . Object ) { return null ; }
|
org . junit . Assert . assertEquals ( expected , proxy )
|
getPaymentInfos_Admin_Authorized ( ) { java . lang . reflect . Method method = beanClass . getMethod ( "getPaymentInfos" ) ; boolean isRoleAllowed = isRoleAllowed ( method , UserRoleType . ORGANIZATION_ADMIN ) ; "<AssertPlaceHolder>" ; } isRoleAllowed ( java . lang . reflect . Method , org . oscm . internal . types . enumtypes . UserRoleType ) { javax . annotation . security . RolesAllowed rolesAllowed = method . getAnnotation ( javax . annotation . security . RolesAllowed . class ) ; if ( rolesAllowed == null ) { return true ; } for ( java . lang . String role : rolesAllowed . value ( ) ) { if ( role . equals ( roleType . name ( ) ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertTrue ( isRoleAllowed )
|
callInvokeWithException_ShouldThrowException ( ) { java . lang . String message = "Message" ; org . openengsb . core . api . remote . MethodResult result = new org . openengsb . core . api . remote . MethodResult ( message , org . openengsb . core . api . remote . MethodResult . ReturnType . Exception ) ; when ( router . sendMethodCallWithResult ( any ( java . lang . String . class ) , any ( java . lang . String . class ) , any ( org . openengsb . core . api . remote . MethodCall . class ) ) ) . thenReturn ( result ) ; org . openengsb . core . services . internal . ProxyConnectorTest . Interface newProxyInstance = ( ( org . openengsb . core . services . internal . ProxyConnectorTest . Interface ) ( java . lang . reflect . Proxy . newProxyInstance ( org . openengsb . core . services . internal . ProxyConnectorTest . Interface . class . getClassLoader ( ) , new java . lang . Class [ ] { org . openengsb . core . services . internal . ProxyConnectorTest . Interface . class } , proxy ) ) ) ; try { newProxyInstance . testException ( ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
|
org . junit . Assert . assertThat ( e . getMessage ( ) , org . hamcrest . Matchers . equalTo ( message ) )
|
isExportEnabled_NoServiceSelected ( ) { java . util . List < org . oscm . ui . model . TechnicalService > services = givenServicesNotSelected ( 1 ) ; doReturn ( services ) . when ( bean ) . getSelectableTechnicalServices ( ) ; boolean isExportEnabled = bean . isExportEnabled ( ) ; "<AssertPlaceHolder>" ; } isExportEnabled ( ) { org . oscm . ui . beans . List < org . oscm . ui . model . TechnicalService > list = getSelectableTechnicalServices ( ) ; if ( list != null ) { for ( org . oscm . ui . model . TechnicalService ts : list ) { if ( ts . isSelected ( ) ) return true ; } } return false ; }
|
org . junit . Assert . assertFalse ( isExportEnabled )
|
testGetPropertyUsingNullKeyReturnsNull ( ) { org . apache . qpid . jms . message . facade . JmsMessageFacade amqpMessageFacade = createNewMessageFacade ( ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { return org . apache . qpid . jms . provider . amqp . message . AmqpJmsMessagePropertyIntercepter . getProperty ( this , key ) ; }
|
org . junit . Assert . assertNull ( amqpMessageFacade . getProperty ( null ) )
|
testShouldFire ( ) { org . apache . beam . runners . core . triggers . TriggerStateMachineTester < java . lang . Integer , org . apache . beam . sdk . transforms . windowing . IntervalWindow > tester = org . apache . beam . runners . core . triggers . TriggerStateMachineTester . forTrigger ( org . apache . beam . runners . core . triggers . ReshuffleTriggerStateMachine . create ( ) , org . apache . beam . sdk . transforms . windowing . FixedWindows . of ( org . joda . time . Duration . millis ( 100 ) ) ) ; org . apache . beam . sdk . transforms . windowing . IntervalWindow arbitraryWindow = new org . apache . beam . sdk . transforms . windowing . IntervalWindow ( new org . joda . time . Instant ( 300 ) , new org . joda . time . Instant ( 400 ) ) ; "<AssertPlaceHolder>" ; } shouldFire ( org . joda . time . Instant ) { return ( currentWatermark . isAfter ( fireAfter ) ) || ( currentWatermark . equals ( BoundedWindow . TIMESTAMP_MAX_VALUE ) ) ; }
|
org . junit . Assert . assertTrue ( tester . shouldFire ( arbitraryWindow ) )
|
includeExcludeRule4Test ( ) { java . lang . String code = "class<sp>A{isA<sp>T1;}trait<sp>T1{isA<sp>T2<sp><+show()>;void<sp>test(){/*T1*/}<sp>}trait<sp>T2{}" ; cruise . umple . compiler . UmpleModel model = getModel ( code ) ; boolean result = false ; try { model . run ( ) ; } catch ( java . lang . Exception e ) { result = e . getMessage ( ) . contains ( "212" ) ; } finally { "<AssertPlaceHolder>" ; cruise . umple . util . SampleFileWriter . destroy ( "traitTest.ump" ) ; } } contains ( java . lang . Object ) { if ( ( parent ) != null ) { return ( super . contains ( obj ) ) || ( parent . contains ( obj ) ) ; } else { return super . contains ( obj ) ; } }
|
org . junit . Assert . assertTrue ( result )
|
concurrencyFalse ( ) { org . apache . hadoop . hive . conf . HiveConf badConf = new org . apache . hadoop . hive . conf . HiveConf ( ) ; if ( badConf . getBoolVar ( HiveConf . ConfVars . HIVE_SUPPORT_CONCURRENCY ) ) { return ; } badConf . setVar ( HiveConf . ConfVars . HIVE_TXN_MANAGER , "org.apache.hadoop.hive.ql.lockmgr.DbTxnManager" ) ; badConf . setBoolVar ( HiveConf . ConfVars . HIVE_SUPPORT_CONCURRENCY , false ) ; boolean sawException = false ; try { org . apache . hadoop . hive . ql . lockmgr . TxnManagerFactory . getTxnManagerFactory ( ) . getTxnManager ( badConf ) ; } catch ( java . lang . RuntimeException e ) { sawException = true ; } "<AssertPlaceHolder>" ; } getTxnManager ( org . apache . hadoop . hive . conf . HiveConf ) { org . apache . hadoop . hive . ql . lockmgr . HiveTxnManager txnMgr = null ; java . lang . String txnMgrName = conf . getVar ( HiveConf . ConfVars . HIVE_TXN_MANAGER ) ; if ( ( txnMgrName == null ) || ( txnMgrName . isEmpty ( ) ) ) { throw new org . apache . hadoop . hive . ql . lockmgr . LockException ( ErrorMsg . TXNMGR_NOT_SPECIFIED . getMsg ( ) ) ; } try { org . apache . hadoop . hive . ql . lockmgr . HiveTxnManagerImpl impl = ( ( org . apache . hadoop . hive . ql . lockmgr . HiveTxnManagerImpl ) ( org . apache . hadoop . util . ReflectionUtils . newInstance ( conf . getClassByName ( txnMgrName ) , conf ) ) ) ; impl . setHiveConf ( conf ) ; txnMgr = impl ; } catch ( java . lang . ClassNotFoundException e ) { throw new org . apache . hadoop . hive . ql . lockmgr . LockException ( ErrorMsg . TXNMGR_NOT_INSTANTIATED . getMsg ( ) ) ; } return txnMgr ; }
|
org . junit . Assert . assertTrue ( sawException )
|
setupIssuerParametersIdemix ( ) { java . lang . String issuerParametersUid = "urn:issuerparameters:test:foobar" ; eu . abc4trust . services . issuer . IssuerServiceFactory issuerServiceFactory = new eu . abc4trust . services . issuer . IssuerServiceFactory ( ) ; eu . abc4trust . xml . IssuerParameters issuerParameters = issuerServiceFactory . getIssuerParameters ( issuerParametersUid ) ; "<AssertPlaceHolder>" ; } getIssuerParameters ( java . lang . String ) { java . io . InputStream is = eu . abc4trust . ri . servicehelper . FileSystem . getInputStream ( "/credentialSpecificationSimpleIdentitycard.xml" ) ; eu . abc4trust . xml . CredentialSpecification credSpec = ( ( eu . abc4trust . xml . CredentialSpecification ) ( eu . abc4trust . xml . util . XmlUtils . getObjectFromXML ( is , false ) ) ) ; return this . getIssuerParameters ( issuerParametersUid , credSpec ) ; }
|
org . junit . Assert . assertNotNull ( issuerParameters )
|
testCreateThenDelete ( ) { java . lang . String createStr = com . palominolabs . crm . sf . rest . HttpApiClientTest . createTask ( ) ; com . fasterxml . jackson . databind . node . ObjectNode actual = com . palominolabs . crm . sf . rest . TestConnections . MAPPER . readValue ( createStr , com . fasterxml . jackson . databind . node . ObjectNode . class ) ; com . fasterxml . jackson . databind . node . ObjectNode expected = com . palominolabs . crm . sf . rest . TestConnections . MAPPER . readValue ( com . palominolabs . testutil . ResourceUtil . readResource ( "/apiResponses/create.json" ) , com . fasterxml . jackson . databind . node . ObjectNode . class ) ; java . lang . String id = actual . get ( "id" ) . textValue ( ) ; expected . put ( "id" , id ) ; "<AssertPlaceHolder>" ; com . palominolabs . crm . sf . rest . HttpApiClientTest . client . delete ( "Task" , new com . palominolabs . crm . sf . core . Id ( id ) ) ; } get ( int ) { return this . bitSet . get ( i ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testBuildTableNameNonRootServicePathDataModelByServicePathNewEncoding ( ) { System . out . println ( ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildTableName]" ) ) + "--------<sp>When<sp>a<sp>non<sp>root<sp>service-path<sp>is<sp>notified/defaulted<sp>and<sp>data_model<sp>is<sp>" ) + "'dm-by-service-path'<sp>the<sp>MySQL<sp>table<sp>name<sp>is<sp>the<sp>encoding<sp>of<sp><service-path>" ) ) ; java . lang . String attrPersistence = null ; java . lang . String batchSize = null ; java . lang . String batchTime = null ; java . lang . String batchTTL = null ; java . lang . String dataModel = "dm-by-service-path" ; java . lang . String enableEncoding = "true" ; java . lang . String enableGrouping = null ; java . lang . String enableLowercase = null ; java . lang . String host = null ; java . lang . String password = null ; java . lang . String port = null ; java . lang . String username = null ; java . lang . String cache = null ; com . telefonica . iot . cygnus . sinks . NGSIPostgreSQLSink sink = new com . telefonica . iot . cygnus . sinks . NGSIPostgreSQLSink ( ) ; sink . configure ( createContext ( attrPersistence , batchSize , batchTime , batchTTL , dataModel , enableEncoding , enableGrouping , enableLowercase , host , password , port , username , cache ) ) ; java . lang . String servicePath = "/somePath" ; java . lang . String entity = null ; java . lang . String attribute = null ; try { java . lang . String builtTableName = sink . buildTableName ( servicePath , entity , attribute ) ; java . lang . String expecetedTableName = "x002fsomex0050ath" ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildTableName]" ) ) + "-<sp>OK<sp>-<sp>'" ) + builtTableName ) + "'<sp>is<sp>equals<sp>to<sp>the<sp>encoding<sp>of<sp><service-path>" ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildTableName]" ) ) + "-<sp>FAIL<sp>-<sp>'" ) + builtTableName ) + "x002fsomex0050ath" 1 ) ) ; throw e ; } } catch ( java . lang . Exception e ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildTableName]" ) ) + "x002fsomex0050ath" 0 ) ) ; throw e ; } buildTableName ( java . lang . String , java . lang . String , java . lang . String ) { java . lang . String name ; switch ( dataModel ) { case DMBYSERVICEPATH : name = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; break ; case DMBYENTITY : java . lang . String truncatedServicePath = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; name = ( truncatedServicePath . isEmpty ( ) ? "" : truncatedServicePath + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( entity ) ) ; break ; case DMBYATTRIBUTE : truncatedServicePath = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; name = ( ( ( truncatedServicePath . isEmpty ( ) ? "" : truncatedServicePath + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( entity ) ) ) + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( attribute ) ) ; break ; default : throw new com . telefonica . iot . cygnus . errors . CygnusBadConfiguration ( ( ( "Unknown<sp>data<sp>model<sp>'" + ( dataModel . toString ( ) ) ) + "'.<sp>Please,<sp>use<sp>dm-by-service-path,<sp>dm-by-entity<sp>or<sp>dm-by-attribute" ) ) ; } if ( ( name . length ( ) ) > ( com . telefonica . iot . cygnus . utils . NGSIConstants . POSTGRESQL_MAX_NAME_LEN ) ) { throw new com . telefonica . iot . cygnus . errors . CygnusBadConfiguration ( ( ( ( "Building<sp>table<sp>name<sp>'" + name ) + "'<sp>and<sp>its<sp>length<sp>is<sp>greater<sp>than<sp>" ) + ( com . telefonica . iot . cygnus . utils . NGSIConstants . POSTGRESQL_MAX_NAME_LEN ) ) ) ; } return name ; }
|
org . junit . Assert . assertEquals ( expecetedTableName , builtTableName )
|
testSQLTemplateForDataMapWithInsert ( ) { createArtistDataSet ( ) ; org . apache . cayenne . map . DataMap testDataMap = context . getEntityResolver ( ) . getDataMap ( "testmap" ) ; org . apache . cayenne . query . SQLTemplate q2 = new org . apache . cayenne . query . SQLTemplate ( testDataMap , "SELECT<sp>*<sp>FROM<sp>ARTIST" , true ) ; java . util . List < org . apache . cayenne . DataRow > result = context . performQuery ( q2 ) ; "<AssertPlaceHolder>" ; } size ( ) { return neighbors . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , result . size ( ) )
|
test_WhiteKingSideCastle_MovesThroughCheckAtF1 ( ) { classUnderTest = new eubos . position . PositionManager ( "8/8/8/8/8/3b4/8/4K2R<sp>w<sp>K<sp>-<sp>-<sp>-" ) . castling ; classUnderTest . addCastlingMoves ( ml ) ; "<AssertPlaceHolder>" ; } addCastlingMoves ( java . util . List ) { eubos . board . pieces . Piece . Colour onMove = pm . getOnMove ( ) ; if ( ! ( castlingAvaillable ( onMove ) ) ) return ; eubos . board . pieces . King ownKing = pm . getKing ( onMove ) ; if ( ownKing != null ) { if ( ( ownKing . hasEverMoved ( ) ) || ( ! ( ownKing . isOnInitialSquare ( ) ) ) ) { return ; } } com . fluxchess . jcpi . models . GenericMove ksc = null ; if ( onMove == ( eubos . board . pieces . Piece . Colour . white ) ) { ksc = getWhiteKingsideCastleMove ( ) ; } else { ksc = getBlackKingsideCastleMove ( ) ; } if ( ksc != null ) ml . add ( ksc ) ; com . fluxchess . jcpi . models . GenericMove qsc = null ; if ( onMove == ( eubos . board . pieces . Piece . Colour . white ) ) { qsc = getWhiteQueensideCastleMove ( ) ; } else { qsc = getBlackQueensideCastleMove ( ) ; } if ( qsc != null ) ml . add ( qsc ) ; }
|
org . junit . Assert . assertTrue ( ml . isEmpty ( ) )
|
testGetFallback ( ) { org . orbisgis . legend . thematic . categorize . CategorizedArea ca = getCategorizedArea ( ) ; org . orbisgis . legend . thematic . AreaParameters ap = new org . orbisgis . legend . thematic . AreaParameters ( org . orbisgis . legend . thematic . categorize . Color . decode ( "#111111" ) , 0.2 , 1.0 , "1<sp>1" , org . orbisgis . legend . thematic . categorize . Color . decode ( "#111111" ) , 0.5 ) ; "<AssertPlaceHolder>" ; } getFallbackParameters ( ) { return new org . orbisgis . legend . thematic . LineParameters ( color . getFallbackValue ( ) , opacity . getFallbackValue ( ) , width . getFallbackValue ( ) , dash . getFallbackValue ( ) ) ; }
|
org . junit . Assert . assertTrue ( ca . getFallbackParameters ( ) . equals ( ap ) )
|
testBytes1 ( ) { com . laytonsmith . core . constructs . CByteArray ba1 = new com . laytonsmith . core . constructs . CByteArray ( Target . UNKNOWN ) ; ba1 . writeUTF8String ( "A<sp>string" , null , null ) ; com . laytonsmith . core . constructs . CByteArray ba2 = new com . laytonsmith . core . constructs . CByteArray ( Target . UNKNOWN ) ; ba2 . putBytes ( ba1 , null ) ; "<AssertPlaceHolder>" ; } asByteArrayCopy ( ) { byte [ ] src = data . array ( ) ; byte [ ] dest = new byte [ maxValue ] ; java . lang . System . arraycopy ( src , 0 , dest , 0 , maxValue ) ; return dest ; }
|
org . junit . Assert . assertArrayEquals ( ba1 . asByteArrayCopy ( ) , ba2 . asByteArrayCopy ( ) )
|
testDeserializeStreamOfNull ( ) { java . io . ByteArrayOutputStream streamReal = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream oos = new java . io . ObjectOutputStream ( streamReal ) ; oos . writeObject ( null ) ; oos . flush ( ) ; oos . close ( ) ; java . io . ByteArrayInputStream inTest = new java . io . ByteArrayInputStream ( streamReal . toByteArray ( ) ) ; java . lang . Object test = org . apache . commons . lang3 . SerializationUtils . deserialize ( inTest ) ; "<AssertPlaceHolder>" ; } toByteArray ( ) { int dataSize = getWriteSize ( ) ; byte [ ] data = new byte [ dataSize ] ; int offset = 0 ; short sourceFileAttributeNameIndex = 0 ; if ( ( itsSourceFileNameIndex ) != 0 ) { sourceFileAttributeNameIndex = itsConstantPool . addUtf8 ( "SourceFile" ) ; } offset = org . mozilla . classfile . ClassFileWriter . putInt32 ( org . mozilla . classfile . ClassFileWriter . FileHeaderConstant , data , offset ) ; offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( org . mozilla . classfile . ClassFileWriter . MinorVersion , data , offset ) ; offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( org . mozilla . classfile . ClassFileWriter . MajorVersion , data , offset ) ; offset = itsConstantPool . write ( data , offset ) ; offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( itsFlags , data , offset ) ; offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( itsThisClassIndex , data , offset ) ; offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( itsSuperClassIndex , data , offset ) ; offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( itsInterfaces . size ( ) , data , offset ) ; for ( int i = 0 ; i < ( itsInterfaces . size ( ) ) ; i ++ ) { int interfaceIndex = ( ( java . lang . Short ) ( itsInterfaces . get ( i ) ) ) . shortValue ( ) ; offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( interfaceIndex , data , offset ) ; } offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( itsFields . size ( ) , data , offset ) ; for ( int i = 0 ; i < ( itsFields . size ( ) ) ; i ++ ) { org . mozilla . classfile . ClassFileField field = ( ( org . mozilla . classfile . ClassFileField ) ( itsFields . get ( i ) ) ) ; offset = field . write ( data , offset ) ; } offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( itsMethods . size ( ) , data , offset ) ; for ( int i = 0 ; i < ( itsMethods . size ( ) ) ; i ++ ) { org . mozilla . classfile . ClassFileMethod method = ( ( org . mozilla . classfile . ClassFileMethod ) ( itsMethods . get ( i ) ) ) ; offset = method . write ( data , offset ) ; } if ( ( itsSourceFileNameIndex ) != 0 ) { offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( 1 , data , offset ) ; offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( sourceFileAttributeNameIndex , data , offset ) ; offset = org . mozilla . classfile . ClassFileWriter . putInt32 ( 2 , data , offset ) ; offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( itsSourceFileNameIndex , data , offset ) ; } else { offset = org . mozilla . classfile . ClassFileWriter . putInt16 ( 0 , data , offset ) ; } if ( offset != dataSize ) { throw new java . lang . RuntimeException ( ) ; } return data ; }
|
org . junit . Assert . assertNull ( test )
|
testpropertyoutput3 ( ) { project . setNewProperty ( "bar" , "bar" ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { final java . lang . Object value = org . apache . tools . ant . PropertyHelper . getPropertyHelper ( this ) . getProperty ( propertyName ) ; return value == null ? null : java . lang . String . valueOf ( value ) ; }
|
org . junit . Assert . assertEquals ( "bar" , project . getProperty ( "bar" ) )
|
testShouldUseAMapToRepresentComplexObjects ( ) { org . json . JSONObject toModel = new org . json . JSONObject ( ) ; toModel . put ( "thing" , "hairy" ) ; toModel . put ( "hairy" , "true" ) ; java . util . Map < ? , ? > modelled = ( ( java . util . Map < ? , ? > ) ( new org . openqa . selenium . remote . JsonToBeanConverter ( ) . convert ( java . lang . Object . class , toModel ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { java . lang . Object response = executeMethod . execute ( DriverCommand . GET_LOCAL_STORAGE_SIZE , null ) ; return java . lang . Integer . parseInt ( response . toString ( ) ) ; }
|
org . junit . Assert . assertEquals ( 2 , modelled . size ( ) )
|
testAsInt ( ) { org . apache . tajo . datum . Datum d = org . apache . tajo . datum . DatumFactory . createChar ( "5" ) ; "<AssertPlaceHolder>" ; } asInt4 ( ) { throw new org . apache . tajo . exception . TajoRuntimeException ( new org . apache . tajo . exception . InvalidValueForCastException ( type , INT4 ) ) ; }
|
org . junit . Assert . assertEquals ( 5 , d . asInt4 ( ) )
|
testNewInstanceWithExistingClassName ( ) { java . lang . Object instance = org . eclipse . rap . rwt . internal . util . ClassUtil . newInstance ( classLoader , org . eclipse . rap . rwt . internal . util . ClassUtil_Test . PublicClass . class . getName ( ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
|
org . junit . Assert . assertEquals ( instance . getClass ( ) , org . eclipse . rap . rwt . internal . util . ClassUtil_Test . PublicClass . class )
|
testGetMax ( ) { stat . processLatency ( 1 ) ; stat . processLatency ( 7 ) ; stat . processLatency ( 4 ) ; stat . processLatency ( 5 ) ; stat . processLatency ( 2 ) ; stat . processLatency ( 3 ) ; stat . processLatency ( 6 ) ; "<AssertPlaceHolder>" ; } getMax ( ) { return max ; }
|
org . junit . Assert . assertEquals ( 7 , stat . getMax ( ) )
|
testSnapshot ( ) { io . atomix . primitive . service . ServiceContext context = mock ( io . atomix . primitive . service . ServiceContext . class ) ; when ( context . serviceType ( ) ) . thenReturn ( io . atomix . core . set . DistributedSetType . instance ( ) ) ; when ( context . serviceName ( ) ) . thenReturn ( "test" ) ; when ( context . serviceId ( ) ) . thenReturn ( io . atomix . primitive . PrimitiveId . from ( 1 ) ) ; when ( context . wallClock ( ) ) . thenReturn ( new io . atomix . utils . time . WallClock ( ) ) ; io . atomix . primitive . session . Session session = mock ( io . atomix . primitive . session . Session . class ) ; when ( session . sessionId ( ) ) . thenReturn ( io . atomix . primitive . session . SessionId . from ( 1 ) ) ; io . atomix . core . set . impl . DefaultDistributedNavigableSetService service = new io . atomix . core . set . impl . DefaultDistributedNavigableSetService ( ) ; service . init ( context ) ; service . add ( "foo" ) ; io . atomix . storage . buffer . Buffer buffer = io . atomix . storage . buffer . HeapBuffer . allocate ( ) ; service . backup ( new io . atomix . primitive . service . impl . DefaultBackupOutput ( buffer , service . serializer ( ) ) ) ; service = new io . atomix . core . set . impl . DefaultDistributedNavigableSetService ( ) ; service . restore ( new io . atomix . primitive . service . impl . DefaultBackupInput ( buffer . flip ( ) , service . serializer ( ) ) ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { return map . containsKey ( o ) ; }
|
org . junit . Assert . assertTrue ( service . contains ( "foo" ) )
|
test_return_dataflavour_inany ( ) { try { org . jacorb . test . CharServerPackage . DataFlavour flavour = new org . jacorb . test . CharServerPackage . DataFlavour ( "Test_Flavour" , new org . jacorb . test . CharServerPackage . NameValuePair [ 0 ] ) ; org . omg . CORBA . Any data = server . return_dataflavour_inany ( flavour ) ; org . jacorb . test . CharServerPackage . DataFlavour flavour2 = org . jacorb . test . CharServerPackage . DataFlavourHelper . extract ( data ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "unexpected<sp>exception:<sp>" + e ) ) ; } } extract ( org . omg . CORBA . Any ) { return org . jacorb . test . bugs . bug532 . ByteSequenceHelper . read ( a . create_input_stream ( ) ) ; }
|
org . junit . Assert . assertEquals ( flavour2 . name , "Test_Flavour" )
|
coreACAssignAssociationToWorkspace ( ) { systems . dmx . core . storage . spi . DMXTransaction tx = dmx . beginTx ( ) ; try { systems . dmx . core . Topic t1 = dmx . createTopic ( mf . newTopicModel ( "dmx.core.plugin" ) ) ; systems . dmx . core . Topic t2 = dmx . createTopic ( mf . newTopicModel ( "dmx.core.plugin" ) ) ; systems . dmx . core . Topic ws = dmx . createTopic ( mf . newTopicModel ( "dmx.core.plugin" ) ) ; systems . dmx . core . Association assoc = createAssociation ( t1 , t2 ) ; dmx . getAccessControl ( ) . assignToWorkspace ( assoc , ws . getId ( ) ) ; long wsId = ( ( java . lang . Long ) ( assoc . getProperty ( "dmx.workspaces.workspace_id" ) ) ) ; "<AssertPlaceHolder>" ; tx . success ( ) ; } finally { tx . finish ( ) ; } } getId ( ) { return geomapTopic . getId ( ) ; }
|
org . junit . Assert . assertEquals ( ws . getId ( ) , wsId )
|
mustNotCachePoisonedSlots ( ) { config . setSize ( 1 ) . setBackgroundExpirationEnabled ( false ) ; final stormpot . Semaphore semaphore = new stormpot . Semaphore ( 1 ) ; final java . util . concurrent . atomic . AtomicBoolean hasExpired = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; config . setExpiration ( expire ( $expiredIf ( hasExpired ) ) ) ; final java . lang . String allocationCause = "allocation<sp>blew<sp>up!" ; final java . util . concurrent . atomic . AtomicReference < stormpot . Slot > failOnAllocatingSlot = new java . util . concurrent . atomic . AtomicReference ( ) ; final java . util . concurrent . atomic . AtomicInteger observedFailedAllocation = new java . util . concurrent . atomic . AtomicInteger ( ) ; stormpot . Action observeFailure = ( slot , obj ) -> { if ( slot == ( failOnAllocatingSlot . get ( ) ) ) { observedFailedAllocation . incrementAndGet ( ) ; failOnAllocatingSlot . set ( null ) ; throw new java . lang . RuntimeException ( allocationCause ) ; } return new stormpot . GenericPoolable ( slot ) ; } ; allocator = allocator ( alloc ( $acquire ( semaphore , observeFailure ) ) ) ; config . setAllocator ( allocator ) ; stormpot . ManagedPool managedPool = assumeManagedPool ( ) ; stormpot . GenericPoolable obj = pool . claim ( stormpot . PoolTest . longTimeout ) ; failOnAllocatingSlot . set ( obj . slot ) ; obj . release ( ) ; hasExpired . set ( true ) ; java . util . concurrent . atomic . AtomicReference < stormpot . GenericPoolable > ref = new java . util . concurrent . atomic . AtomicReference ( ) ; try { forkFuture ( capture ( $claim ( pool , stormpot . PoolTest . shortTimeout ) , ref ) ) . get ( ) ; } catch ( stormpot . ExecutionException ignore ) { } "<AssertPlaceHolder>" ; semaphore . release ( Integer . MAX_VALUE ) ; while ( ( managedPool . getAllocationCount ( ) ) < 2 ) { java . lang . Thread . yield ( ) ; } while ( ( managedPool . getFailedAllocationCount ( ) ) < 1 ) { java . lang . Thread . yield ( ) ; } hasExpired . set ( false ) ; pool . claim ( stormpot . PoolTest . longTimeout ) . release ( ) ; } get ( ) { return state ; }
|
org . junit . Assert . assertNull ( ref . get ( ) )
|
testExpandSymbolicRef ( ) { org . eclipse . swtbot . swt . finder . widgets . SWTBotTree tree = getOrOpenView ( ) . bot ( ) . tree ( ) ; org . eclipse . swtbot . swt . finder . widgets . SWTBotTreeItem item = org . eclipse . egit . ui . test . TestUtil . expandAndWait ( myRepoViewUtil . getSymbolicRefsItem ( tree , repositoryFile ) ) ; java . util . List < java . lang . String > children = item . getNodes ( ) ; boolean found = false ; for ( java . lang . String child : children ) { if ( child . contains ( Constants . HEAD ) ) { found = true ; break ; } } "<AssertPlaceHolder>" ; } contains ( org . eclipse . core . runtime . jobs . ISchedulingRule ) { if ( rule instanceof org . eclipse . egit . ui . internal . RepositoryCacheRule ) { return true ; } else if ( rule instanceof org . eclipse . core . runtime . jobs . MultiRule ) { for ( org . eclipse . core . runtime . jobs . ISchedulingRule child : ( ( org . eclipse . core . runtime . jobs . MultiRule ) ( rule ) ) . getChildren ( ) ) { if ( ! ( contains ( child ) ) ) { return false ; } } return true ; } return false ; }
|
org . junit . Assert . assertTrue ( found )
|
testNullPropertyName ( ) { java . lang . Object result = cn . jimmyshi . beanquery . DefaultNullValuePropertyValueGetter . getProperty ( new cn . jimmyshi . beanquery . example . Book ( ) , null ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . Object , java . lang . String ) { if ( ( null == from ) || ( org . apache . commons . lang3 . StringUtils . isBlank ( propertyName ) ) ) { org . slf4j . LoggerFactory . getLogger ( cn . jimmyshi . beanquery . DefaultNullValuePropertyValueGetter . class ) . info ( "Object<sp>is<sp>null<sp>or<sp>the<sp>property<sp>[{}]<sp>is<sp>blank,<sp>returning<sp>null" , propertyName ) ; return null ; } try { return org . apache . commons . beanutils . PropertyUtils . getProperty ( from , propertyName ) ; } catch ( java . lang . Exception e ) { org . slf4j . LoggerFactory . getLogger ( cn . jimmyshi . beanquery . DefaultNullValuePropertyValueGetter . class ) . info ( "Exception<sp>[{}]<sp>when<sp>fetching<sp>property<sp>[{}]<sp>from<sp>object<sp>[{}],<sp>returning<sp>null<sp>as<sp>the<sp>value." , e . toString ( ) , propertyName , from ) ; return null ; } }
|
org . junit . Assert . assertNull ( result )
|
testFilterCountByKeywordsWithBlankKeywordsExcludingBasicType ( ) { int initialFileEntryTypesCount = com . liferay . document . library . kernel . service . persistence . DLFileEntryTypeFinderUtil . filterCountByKeywords ( _group . getCompanyId ( ) , new long [ ] { _group . getGroupId ( ) } , StringPool . BLANK , false ) ; com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( _group . getGroupId ( ) , _user . getUserId ( ) ) ; addFileEntryType ( serviceContext ) ; "<AssertPlaceHolder>" ; } filterCountByKeywords ( long , long [ ] , java . lang . String , boolean ) { return com . liferay . document . library . kernel . service . persistence . DLFileEntryTypeFinderUtil . getFinder ( ) . filterCountByKeywords ( companyId , groupIds , keywords , includeBasicFileEntryType ) ; }
|
org . junit . Assert . assertEquals ( ( initialFileEntryTypesCount + 1 ) , com . liferay . document . library . kernel . service . persistence . DLFileEntryTypeFinderUtil . filterCountByKeywords ( _group . getCompanyId ( ) , new long [ ] { _group . getGroupId ( ) } , StringPool . BLANK , false ) )
|
removeReturnFalseInsteadOfThrowingAfterUnderlyingPoolResourceException ( ) { org . appenders . log4j2 . elasticsearch . ResizePolicy resizePolicy = mock ( org . appenders . log4j2 . elasticsearch . ResizePolicy . class ) ; when ( resizePolicy . increase ( any ( ) ) ) . thenThrow ( org . appenders . log4j2 . elasticsearch . PoolResourceException . class ) ; org . appenders . log4j2 . elasticsearch . BufferedItemSourcePool pool = new org . appenders . log4j2 . elasticsearch . BufferedItemSourcePool ( org . appenders . log4j2 . elasticsearch . BufferedItemSourcePoolTest . DEFAULT_TEST_ITEM_POOL_NAME , org . appenders . log4j2 . elasticsearch . BufferedItemSourcePoolTest . byteBufAllocator , resizePolicy , 0 , false , org . appenders . log4j2 . elasticsearch . BufferedItemSourcePoolTest . DEFAULT_TEST_MONITOR_TASK_INTERVAL , 0 , org . appenders . log4j2 . elasticsearch . BufferedItemSourcePoolTest . DEFAULT_TEST_ITEM_SIZE_IN_BYTES ) ; boolean resized = pool . remove ( ) ; "<AssertPlaceHolder>" ; } remove ( ) { try { removeInternal ( org . appenders . log4j2 . elasticsearch . BufferedItemSourcePool . MAX_RESIZE_INTERNAL_STACK_DEPTH ) . getSource ( ) . release ( ) ; totalPoolSize . getAndDecrement ( ) ; } catch ( org . appenders . log4j2 . elasticsearch . PoolResourceException e ) { return false ; } return true ; }
|
org . junit . Assert . assertFalse ( resized )
|
query_with_auth_14 ( ) { org . apache . jena . sparql . engine . http . QueryEngineHTTP qe = ( ( org . apache . jena . sparql . engine . http . QueryEngineHTTP ) ( org . apache . jena . query . QueryExecutionFactory . sparqlService ( org . apache . jena . fuseki . TestAuth . authServiceQuery , "ASK<sp>{<sp>}" ) ) ) ; qe . setClient ( org . apache . jena . fuseki . TestAuth . withBasicAuth ( new org . apache . http . auth . AuthScope ( "localhost" , org . apache . jena . fuseki . TestAuth . authPort ) , "allowed" , "password" ) ) ; "<AssertPlaceHolder>" ; } execAsk ( ) { checkNotClosed ( ) ; if ( ! ( query . isAskType ( ) ) ) throw new org . apache . jena . sparql . engine . QueryExecException ( ( ( "Attempt<sp>to<sp>have<sp>boolean<sp>from<sp>a<sp>" + ( org . apache . jena . sparql . engine . QueryExecutionBase . labelForQuery ( query ) ) ) + "<sp>query" ) ) ; startQueryIterator ( ) ; boolean r ; try { queryIterator . next ( ) ; r = true ; } catch ( java . util . NoSuchElementException ex ) { r = false ; } this . close ( ) ; return r ; }
|
org . junit . Assert . assertTrue ( qe . execAsk ( ) )
|
testSortedCommands ( ) { injector . getInstance ( org . apache . ambari . server . orm . OrmTestHelper . class ) . createStageCommands ( ) ; org . apache . ambari . server . orm . dao . HostRoleCommandDAO hostRoleCommandDAO = injector . getInstance ( org . apache . ambari . server . orm . dao . HostRoleCommandDAO . class ) ; org . apache . ambari . server . orm . dao . HostDAO hostDAO = injector . getInstance ( org . apache . ambari . server . orm . dao . HostDAO . class ) ; org . apache . ambari . server . orm . dao . StageDAO stageDAO = injector . getInstance ( org . apache . ambari . server . orm . dao . StageDAO . class ) ; java . util . List < org . apache . ambari . server . orm . entities . HostRoleCommandEntity > list = hostRoleCommandDAO . findSortedCommandsByStageAndHost ( stageDAO . findByActionId ( "1-1" ) , hostDAO . findByName ( "test_host1" ) ) ; org . apache . ambari . server . orm . TestOrmImpl . log . info ( "command<sp>'{}'<sp>-<sp>taskId<sp>'{}'<sp>" , list . get ( 0 ) . getRoleCommand ( ) , list . get ( 0 ) . getTaskId ( ) ) ; org . apache . ambari . server . orm . TestOrmImpl . log . info ( "command<sp>'{}'<sp>-<sp>taskId<sp>'{}'" , list . get ( 1 ) . getRoleCommand ( ) , list . get ( 1 ) . getTaskId ( ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Long ) { org . apache . ambari . server . view . RemoteAmbariCluster remoteAmbariCluster = clusterMap . get ( clusterId ) ; if ( remoteAmbariCluster == null ) { org . apache . ambari . server . view . RemoteAmbariCluster cluster = getCluster ( clusterId ) ; org . apache . ambari . server . view . RemoteAmbariCluster oldCluster = clusterMap . putIfAbsent ( clusterId , cluster ) ; if ( oldCluster == null ) remoteAmbariCluster = cluster ; else remoteAmbariCluster = oldCluster ; } return remoteAmbariCluster ; }
|
org . junit . Assert . assertTrue ( ( ( list . get ( 0 ) . getTaskId ( ) ) < ( list . get ( 1 ) . getTaskId ( ) ) ) )
|
testConsume ( ) { int port = getPort ( ) ; producer . send ( session . createTextMessage ( "test" ) ) ; org . apache . activemq . web . RestTest . LOG . info ( "message<sp>sent" ) ; org . eclipse . jetty . client . HttpClient httpClient = new org . eclipse . jetty . client . HttpClient ( ) ; httpClient . start ( ) ; final java . lang . StringBuffer buf = new java . lang . StringBuffer ( ) ; final java . util . concurrent . CountDownLatch latch = asyncRequest ( httpClient , ( ( "http://localhost:" + port ) + "/message/test?readTimeout=1000&type=queue" ) , buf ) ; latch . await ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "DummyMessage[id=" + ( getMessageId ( ) ) ) + "<sp>size=" ) + ( size ) ) + "]" ; }
|
org . junit . Assert . assertEquals ( "test" , buf . toString ( ) )
|
testBadParentJoin ( ) { b . table ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , com . foundationdb . ais . model . AISMergeTest . TABLE ) ; b . column ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , com . foundationdb . ais . model . AISMergeTest . TABLE , "c1" , 0 , "MCOMPAT" , "INT" , false ) ; b . column ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , com . foundationdb . ais . model . AISMergeTest . TABLE , "c2" , 1 , "MCOMPAT" , "INT" , false ) ; b . pk ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , com . foundationdb . ais . model . AISMergeTest . TABLE ) ; b . indexColumn ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , com . foundationdb . ais . model . AISMergeTest . TABLE , Index . PRIMARY , "c1" , 0 , true , null ) ; b . basicSchemaIsComplete ( ) ; b . createGroup ( "FRED" , com . foundationdb . ais . model . AISMergeTest . SCHEMA ) ; b . addTableToGroup ( "FRED" , com . foundationdb . ais . model . AISMergeTest . SCHEMA , com . foundationdb . ais . model . AISMergeTest . TABLE ) ; b . groupingIsComplete ( ) ; com . foundationdb . ais . model . AISMerge merge = new com . foundationdb . ais . model . AISMerge ( aisCloner , t , s . getTable ( com . foundationdb . ais . model . AISMergeTest . TABLENAME ) ) ; t = merge . merge ( ) . getAIS ( ) ; "<AssertPlaceHolder>" ; b = new com . foundationdb . ais . model . TestAISBuilder ( aisCloner . getTypesRegistry ( ) ) ; b . table ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t1" ) ; b . column ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t1" , "c5" , 0 , "MCOMPAT" , "t1" 0 , false ) ; b . pk ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t1" ) ; b . indexColumn ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t1" , Index . PRIMARY , "c5" , 0 , true , null ) ; b . createGroup ( "DOUG" , com . foundationdb . ais . model . AISMergeTest . SCHEMA ) ; b . addTableToGroup ( "DOUG" , com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t1" ) ; b . table ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t2" ) ; b . column ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t2" , "c1" , 0 , "MCOMPAT" , "INT" , false ) ; b . column ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t2" , "c2" , 1 , "MCOMPAT" , "INT" , true ) ; b . joinTables ( "test/t1/test/t2" , com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t1" , com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t2" ) ; b . joinColumns ( "test/t1/test/t2" , com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t1" , "c5" , com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t2" , "c1" ) ; b . basicSchemaIsComplete ( ) ; b . addJoinToGroup ( "DOUG" , "test/t1/test/t2" , 0 ) ; b . groupingIsComplete ( ) ; merge = new com . foundationdb . ais . model . AISMerge ( aisCloner , t , b . akibanInformationSchema ( ) . getTable ( com . foundationdb . ais . model . AISMergeTest . SCHEMA , "t2" ) ) ; t = merge . merge ( ) . getAIS ( ) ; } isFrozen ( ) { return isFrozen ; }
|
org . junit . Assert . assertTrue ( t . isFrozen ( ) )
|
checkIndex ( ) { final org . exist . storage . BrokerPool pool = org . exist . indexing . spatial . GMLIndexTest . server . getBrokerPool ( ) ; try ( final org . exist . storage . DBBroker broker = pool . get ( java . util . Optional . of ( pool . getSecurityManager ( ) . getSystemSubject ( ) ) ) ) { org . exist . indexing . spatial . AbstractGMLJDBCIndex index = ( ( org . exist . indexing . spatial . AbstractGMLJDBCIndex ) ( pool . getIndexManager ( ) . getIndexById ( AbstractGMLJDBCIndex . ID ) ) ) ; if ( index != null ) { "<AssertPlaceHolder>" ; } } } checkIndex ( org . exist . storage . DBBroker ) { return false ; }
|
org . junit . Assert . assertTrue ( index . checkIndex ( broker ) )
|
testIsValidFileNotFile ( ) { java . io . File file = new java . io . File ( "file" ) { @ net . holmes . core . common . Override public boolean isFile ( ) { return false ; } } ; "<AssertPlaceHolder>" ; } isValidFile ( java . io . File ) { return ( ( file . isFile ( ) ) && ( file . canRead ( ) ) ) && ( ! ( file . isHidden ( ) ) ) ; }
|
org . junit . Assert . assertFalse ( isValidFile ( file ) )
|
testMath1129 ( ) { final double [ ] data = new double [ ] { - 0.012086732064244697 , - 0.24975668704012527 , 0.5706168483164684 , - 0.322111769955327 , 0.24166759508327315 , Double . NaN , 0.16698443218942854 , - 0.10427763937565114 , - 0.15595963093172435 , - 0.028075857595882995 , - 0.24137994506058857 , 0.47543170476574426 , - 0.07495595384947631 , 0.37445697625436497 , - 0.09944199541668033 } ; final org . hipparchus . stat . descriptive . DescriptiveStatistics ds = new org . hipparchus . stat . descriptive . DescriptiveStatistics ( data ) ; final double t = ds . getPercentile ( 75 ) ; final double o = ds . getPercentile ( 25 ) ; final double iqr = t - o ; "<AssertPlaceHolder>" ; } getPercentile ( double ) { percentileImpl . setQuantile ( p ) ; return apply ( percentileImpl ) ; }
|
org . junit . Assert . assertTrue ( ( iqr >= 0 ) )
|
testGetConfigurationsWhenInputListContainsNullElement ( ) { java . util . List < org . finra . herd . model . api . xml . EmrClusterDefinitionConfiguration > emrClusterDefinitionConfigurations = new java . util . ArrayList ( ) ; emrClusterDefinitionConfigurations . add ( null ) ; java . util . List < com . amazonaws . services . elasticmapreduce . model . Configuration > result = emrDaoImpl . getConfigurations ( emrClusterDefinitionConfigurations ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
|
org . junit . Assert . assertEquals ( new java . util . ArrayList ( ) , result )
|
retry_headersRead_cancel ( ) { io . grpc . internal . ClientStream mockStream1 = mock ( io . grpc . internal . ClientStream . class ) ; doReturn ( mockStream1 ) . when ( retriableStreamRecorder ) . newSubstream ( 0 ) ; org . mockito . InOrder inOrder = inOrder ( retriableStreamRecorder ) ; retriableStream . start ( masterListener ) ; org . mockito . ArgumentCaptor < io . grpc . internal . ClientStreamListener > sublistenerCaptor1 = org . mockito . ArgumentCaptor . forClass ( io . grpc . internal . ClientStreamListener . class ) ; verify ( mockStream1 ) . start ( sublistenerCaptor1 . capture ( ) ) ; io . grpc . internal . ClientStream mockStream2 = mock ( io . grpc . internal . ClientStream . class ) ; doReturn ( mockStream2 ) . when ( retriableStreamRecorder ) . newSubstream ( 1 ) ; sublistenerCaptor1 . getValue ( ) . closed ( io . grpc . Status . fromCode ( io . grpc . internal . RetriableStreamTest . RETRIABLE_STATUS_CODE_1 ) , new io . grpc . Metadata ( ) ) ; "<AssertPlaceHolder>" ; fakeClock . forwardTime ( ( ( long ) ( ( io . grpc . internal . RetriableStreamTest . INITIAL_BACKOFF_IN_SECONDS ) * ( io . grpc . internal . RetriableStreamTest . FAKE_RANDOM ) ) ) , TimeUnit . SECONDS ) ; org . mockito . ArgumentCaptor < io . grpc . internal . ClientStreamListener > sublistenerCaptor2 = org . mockito . ArgumentCaptor . forClass ( io . grpc . internal . ClientStreamListener . class ) ; verify ( mockStream2 ) . start ( sublistenerCaptor2 . capture ( ) ) ; inOrder . verify ( retriableStreamRecorder , never ( ) ) . postCommit ( ) ; sublistenerCaptor2 . getValue ( ) . headersRead ( new io . grpc . Metadata ( ) ) ; inOrder . verify ( retriableStreamRecorder ) . postCommit ( ) ; retriableStream . cancel ( Status . CANCELLED ) ; inOrder . verify ( retriableStreamRecorder , never ( ) ) . postCommit ( ) ; } numPendingTasks ( ) { return ( dueTasks . size ( ) ) + ( scheduledTasks . size ( ) ) ; }
|
org . junit . Assert . assertEquals ( 1 , fakeClock . numPendingTasks ( ) )
|
test1 ( ) { final com . jogamp . opengl . util . awt . AWTGLReadBufferUtil awtGLReadBufferUtil = new com . jogamp . opengl . util . awt . AWTGLReadBufferUtil ( com . jogamp . opengl . test . junit . jogl . util . texture . TestTexture02AWT . caps . getGLProfile ( ) , false ) ; final java . awt . Frame frame0 = new java . awt . Frame ( "GL<sp>-><sp>AWT" ) ; final javax . swing . ImageIcon imageIcon = new javax . swing . ImageIcon ( ) ; final javax . swing . JLabel imageLabel = new javax . swing . JLabel ( imageIcon ) ; frame0 . add ( imageLabel ) ; final com . jogamp . opengl . awt . GLCanvas glCanvas = new com . jogamp . opengl . awt . GLCanvas ( com . jogamp . opengl . test . junit . jogl . util . texture . TestTexture02AWT . caps ) ; final java . awt . Frame frame1 = new java . awt . Frame ( "GearsES2" ) ; "<AssertPlaceHolder>" ; frame1 . add ( glCanvas ) ; glCanvas . addGLEventListener ( new com . jogamp . opengl . test . junit . jogl . demos . es2 . GearsES2 ( 1 ) ) ; glCanvas . addGLEventListener ( new com . jogamp . opengl . GLEventListener ( ) { @ com . jogamp . opengl . test . junit . jogl . util . texture . Override public void init ( final com . jogamp . opengl . GLAutoDrawable drawable ) { } @ com . jogamp . opengl . test . junit . jogl . util . texture . Override public void dispose ( final com . jogamp . opengl . GLAutoDrawable drawable ) { } @ com . jogamp . opengl . test . junit . jogl . util . texture . Override public void display ( final com . jogamp . opengl . GLAutoDrawable drawable ) { final java . awt . image . BufferedImage outputImage = awtGLReadBufferUtil . readPixelsToBufferedImage ( drawable . getGL ( ) , true ) ; imageIcon . setImage ( outputImage ) ; imageLabel . repaint ( ) ; } @ com . jogamp . opengl . test . junit . jogl . util . texture . Override public void reshape ( final com . jogamp . opengl . GLAutoDrawable drawable , final int x , final int y , final int width , final int height ) { frame0 . setSize ( frame1 . getWidth ( ) , frame1 . getHeight ( ) ) ; frame0 . setLocation ( ( ( ( frame1 . getX ( ) ) + ( frame1 . getWidth ( ) ) ) + 32 ) , frame0 . getY ( ) ) ; frame0 . validate ( ) ; } } ) ; try { javax . swing . SwingUtilities . invokeAndWait ( new java . lang . Runnable ( ) { public void run ( ) { frame1 . setSize ( 256 , 256 ) ; frame1 . setLocation ( 0 , 0 ) ; frame1 . setVisible ( true ) ; frame0 . setSize ( frame1 . getWidth ( ) , frame1 . getHeight ( ) ) ; frame0 . setLocation ( ( ( ( frame1 . getX ( ) ) + ( frame1 . getWidth ( ) ) ) + 32 ) , frame0 . getY ( ) ) ; frame0 . setVisible ( true ) ; } } ) ; } catch ( final java . lang . Throwable throwable ) { throwable . printStackTrace ( ) ; org . junit . Assume . assumeNoException ( throwable ) ; } final com . jogamp . opengl . util . FPSAnimator animator = new com . jogamp . opengl . util . FPSAnimator ( glCanvas , 15 ) ; animator . start ( ) ; java . lang . Thread . sleep ( com . jogamp . opengl . test . junit . jogl . util . texture . TestTexture02AWT . durationPerTest ) ; animator . stop ( ) ; try { javax . swing . SwingUtilities . invokeAndWait ( new java . lang . Runnable ( ) { public void run ( ) { frame0 . setVisible ( false ) ; frame0 . dispose ( ) ; frame1 . setVisible ( false ) ; frame1 . dispose ( ) ; } } ) ; } catch ( final java . lang . Throwable throwable ) { throwable . printStackTrace ( ) ; org . junit . Assume . assumeNoException ( throwable ) ; } } add ( com . jogamp . nativewindow . util . Dimension ) { width += pd . width ; height += pd . height ; return this ; }
|
org . junit . Assert . assertNotNull ( frame1 )
|
testSingleNode ( ) { java . lang . String grammar = "a<sp>:<sp>ID<sp>-><sp>template(x={$ID.text})<sp><<|<x>|>><sp>;\n" 4 + ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>ID<sp>;\n" ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "a<sp>:<sp>ID<sp>-><sp>template(x={$ID.text})<sp><<|<x>|>><sp>;\n" 7 ) + "WS<sp>:<sp>(\'<sp>\'|\'\\n\')<sp>{$channel=HIDDEN;}<sp>;\n" ) ; java . lang . String treeGrammar = "a<sp>:<sp>ID<sp>-><sp>template(x={$ID.text})<sp><<|<x>|>><sp>;\n" 6 + ( ( "a<sp>:<sp>ID<sp>-><sp>template(x={$ID.text})<sp><<|<x>|>><sp>;\n" 1 + "s<sp>:<sp>a<sp>{System.out.println($a.st);}<sp>;\n" ) + "a<sp>:<sp>ID<sp>-><sp>template(x={$ID.text})<sp><<|<x>|>><sp>;\n" ) ; java . lang . String found = execTreeParser ( "a<sp>:<sp>ID<sp>-><sp>template(x={$ID.text})<sp><<|<x>|>><sp>;\n" 8 , grammar , "TParser" , "TP.g" , treeGrammar , "a<sp>:<sp>ID<sp>-><sp>template(x={$ID.text})<sp><<|<x>|>><sp>;\n" 0 , "TLexer" , "a" , "a<sp>:<sp>ID<sp>-><sp>template(x={$ID.text})<sp><<|<x>|>><sp>;\n" 2 , "a<sp>:<sp>ID<sp>-><sp>template(x={$ID.text})<sp><<|<x>|>><sp>;\n" 5 ) ; "<AssertPlaceHolder>" ; } execTreeParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { return execTreeParser ( parserGrammarFileName , parserGrammarStr , parserName , treeParserGrammarFileName , treeParserGrammarStr , treeParserName , lexerName , parserStartRuleName , treeParserStartRuleName , input , false ) ; }
|
org . junit . Assert . assertEquals ( "a<sp>:<sp>ID<sp>-><sp>template(x={$ID.text})<sp><<|<x>|>><sp>;\n" 3 , found )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.