input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testRender ( ) { entryPointManager . register ( TestRequest . DEFAULT_SERVLET_PATH , org . eclipse . rap . rwt . internal . lifecycle . RWTLifeCycle_Test . TestEntryPoint . class , null ) ; org . eclipse . rap . rwt . internal . lifecycle . RWTLifeCycle lifeCycle = org . eclipse . rap . rwt . internal . lifecycle . RWTLifeCycle_Test . getLifeCycle ( ) ; lifeCycle . execute ( ) ; org . eclipse . rap . rwt . testfixture . internal . TestMessage message = org . eclipse . rap . rwt . testfixture . internal . Fixture . getProtocolMessage ( ) ; "<AssertPlaceHolder>" ; } getOperationCount ( ) { return getOperations ( ) . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( message . getOperationCount ( ) ) > 0 ) )
testNoOpMap ( ) { java . util . Map < java . lang . String , java . lang . String > noop = new OakFileDataStore . NoOpMap < java . lang . String , java . lang . String > ( ) ; noop . put ( "a" , "b" ) ; noop . remove ( "foo" ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( size ) == 0 ; }
org . junit . Assert . assertTrue ( noop . isEmpty ( ) )
shouldResetCreationTimeWithRunnerStatusIsDoneAndDescriptionIsNull ( ) { runner . setStatus ( Runner . Status . DONE ) ; runner . resetCreationTime ( ) ; "<AssertPlaceHolder>" ; } getCreationTime ( ) { return org . eclipse . che . ide . ext . runner . client . models . RunnerImpl . DATE_TIME_FORMAT . format ( new java . util . Date ( creationTime ) ) ; }
org . junit . Assert . assertThat ( runner . getCreationTime ( ) , org . hamcrest . CoreMatchers . equalTo ( org . eclipse . che . ide . ext . runner . client . models . RunnerImpl . DATE_TIME_FORMAT . format ( new java . util . Date ( java . lang . System . currentTimeMillis ( ) ) ) ) )
testSingleByte ( ) { java . io . InputStream in = new org . zeroturnaround . jf2012 . concurrency . cancel . io . InterruptibleInputStream ( new java . io . ByteArrayInputStream ( new byte [ ] { 100 } ) ) ; try { int b = in . read ( ) ; "<AssertPlaceHolder>" ; } finally { in . close ( ) ; } } read ( ) { while ( true ) { try { return buffer . take ( ) ; } catch ( java . lang . InterruptedException e ) { if ( interruptible ) throw new java . io . InterruptedIOException ( e . getMessage ( ) ) ; else java . lang . Thread . currentThread ( ) . interrupt ( ) ; } } }
org . junit . Assert . assertEquals ( 100 , b )
escapeJSON_noControlChars ( ) { java . lang . String input = "abcdefghijklmnopqrstuvwxyz1234567890.,?!%&$()=+*#':;@<>|-_~{}[]^" ; java . lang . String escaped = org . oscm . json . EscapeUtils . escapeJSON ( input ) ; "<AssertPlaceHolder>" ; } escapeJSON ( java . lang . String ) { if ( aText == null ) { return null ; } final java . lang . StringBuilder result = new java . lang . StringBuilder ( ) ; java . text . StringCharacterIterator iterator = new java . text . StringCharacterIterator ( aText ) ; char character = iterator . current ( ) ; while ( character != ( java . text . StringCharacterIterator . DONE ) ) { if ( character == '\"' ) { result . append ( "\\\"" ) ; } else if ( character == '\\' ) { result . append ( "\\\\" ) ; } else if ( character == '/' ) { result . append ( "\\/" ) ; } else if ( character == '\b' ) { result . append ( "\\b" ) ; } else if ( character == '\f' ) { result . append ( "\\f" ) ; } else if ( character == '\n' ) { result . append ( "\\n" ) ; } else if ( character == '\r' ) { result . append ( "\\r" ) ; } else if ( character == '\t' ) { result . append ( "\\t" ) ; } else { result . append ( character ) ; } character = iterator . next ( ) ; } return result . toString ( ) ; }
org . junit . Assert . assertEquals ( input , escaped )
shouldCreateIteratorOverValuesWhenSuppliedIteratorOfUnknownObjects ( ) { java . util . List < java . lang . String > values = new java . util . ArrayList < java . lang . String > ( ) ; for ( int i = 0 ; i != 10 ; ++ i ) { values . add ( ( "dna:something" + i ) ) ; } java . util . Iterator < org . modeshape . jcr . value . Name > iter = nameFactory . create ( values . iterator ( ) ) ; java . util . Iterator < java . lang . String > valueIter = values . iterator ( ) ; while ( iter . hasNext ( ) ) { "<AssertPlaceHolder>" ; } } next ( ) { return ( index ) < ( org . modeshape . schematic . internal . document . IndexSequence . MAXIMUM_KEY_COUNT ) ? org . modeshape . schematic . internal . document . IndexSequence . INDEX_VALUES [ ( ( index ) ++ ) ] : java . lang . String . valueOf ( ( ( index ) ++ ) ) ; }
org . junit . Assert . assertThat ( iter . next ( ) , org . hamcrest . core . Is . is ( nameFactory . create ( valueIter . next ( ) ) ) )
isDefinedInContextWhereDefinedForRelationAndContextIdMatchesPropertyContextButDifferentOriginShouldReturnFalse ( ) { java . lang . Integer propertyContextId = 1 ; ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . Origin loadedFor = ResourceEditProperty . Origin . RELATION ; ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . Origin origin = ResourceEditProperty . Origin . INSTANCE ; resourceEditProperty = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withLoadedFor ( loadedFor ) . withOrigin ( origin ) . withPropContextId ( propertyContextId ) . build ( ) ; resourceEditProperty . setDefinedOnSuperResourceType ( false ) ; boolean definedInContext = resourceEditProperty . isDefinedInContext ( propertyContextId ) ; "<AssertPlaceHolder>" ; } isDefinedInContext ( java . lang . Integer ) { if ( definedOnSuperResourceType ) { return false ; } switch ( loadedFor ) { case INSTANCE : case RELATION : return ( ( ( this . propContextId ) != null ) && ( this . propContextId . equals ( contextId ) ) ) && ( ( origin ) == ( loadedFor ) ) ; case TYPE : case TYPE_REL : return ( ( ( this . typeContextId ) != null ) && ( this . typeContextId . equals ( contextId ) ) ) && ( ( origin ) == ( loadedFor ) ) ; } return false ; }
org . junit . Assert . assertFalse ( definedInContext )
instantiation ( ) { com . github . seratch . taskun . scheduler . impl . TaskunImpl target = new com . github . seratch . taskun . scheduler . impl . TaskunImpl ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( target )
testLoggerRedirector ( ) { io . cdap . cdap . explore . service . HiveStreamRedirectorTest . CountingLogger logger = new io . cdap . cdap . explore . service . HiveStreamRedirectorTest . CountingLogger ( ) ; org . apache . hadoop . hive . ql . session . SessionState sessionState = new org . apache . hadoop . hive . ql . session . SessionState ( new org . apache . hadoop . hive . conf . HiveConf ( ) ) ; io . cdap . cdap . explore . service . HiveStreamRedirector . redirectToLogger ( sessionState , logger ) ; for ( int i = 0 ; i < 5 ; i ++ ) { sessionState . out . println ( ( "testInfoLog" + i ) ) ; } "<AssertPlaceHolder>" ; } getInfoLogs ( ) { return infoLogs ; }
org . junit . Assert . assertEquals ( 5 , logger . getInfoLogs ( ) )
testNonEqualCharset ( ) { org . apache . olingo . odata2 . core . commons . ContentType t1 = org . apache . olingo . odata2 . core . commons . ContentType . create ( "aaa/bbb;charset=c1" ) ; org . apache . olingo . odata2 . core . commons . ContentType t2 = org . apache . olingo . odata2 . core . commons . ContentType . create ( "aaa/bbb;charset=c2" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } org . apache . olingo . odata2 . api . exception . MessageReference other = ( ( org . apache . olingo . odata2 . api . exception . MessageReference ) ( obj ) ) ; if ( ( key ) == null ) { if ( ( other . key ) != null ) { return false ; } } else if ( ! ( key . equals ( other . key ) ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( t1 . equals ( t2 ) )
testUnsignedVariableBits33 ( ) { final long [ ] size = new long [ ] { 5 , 5 } ; final net . imglib2 . img . array . ArrayImg < net . imglib2 . type . numeric . integer . UnsignedVariableBitLengthType , net . imglib2 . img . basictypeaccess . array . LongArray > img = net . imglib2 . img . array . ArrayImgs . unsignedVariableBitLengths ( 33 , size ) ; long previous = 1 ; long current = 1 ; long next = 0 ; for ( final net . imglib2 . type . numeric . integer . UnsignedVariableBitLengthType t : img ) { t . set ( ( current % 8589934592L ) ) ; next = current + previous ; previous = current ; current = next ; } final long [ ] expected = new long [ ] { 17179869185L , 171798691852L , 1786706395264L , 18691697673536L , 195713069758208L , 2049489674321920L , 21462466975731712L , 224757768919629824L , 2353693755423850496L , 6201456688662577152L , - 135107970249785343L , - 8610882293050900467L , 2036636582034L } ; final long [ ] actual = img . update ( null ) . getCurrentStorageArray ( ) ; "<AssertPlaceHolder>" ; } getCurrentStorageArray ( ) { return data ; }
org . junit . Assert . assertArrayEquals ( expected , actual )
testGetName ( ) { org . eclipse . swt . browser . BrowserFunction function = new org . eclipse . swt . browser . BrowserFunction ( browser , org . eclipse . swt . browser . BrowserFunction_Test . FUNC ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( org . eclipse . swt . browser . BrowserFunction_Test . FUNC , function . getName ( ) )
testMappingTransform ( ) { org . hl7 . fhir . dstu3 . hapi . validation . Map < java . lang . String , org . hl7 . fhir . dstu3 . hapi . validation . StructureMap > maps = new org . hl7 . fhir . dstu3 . hapi . validation . HashMap < java . lang . String , org . hl7 . fhir . dstu3 . hapi . validation . StructureMap > ( ) ; this . validationSupport = new org . hl7 . fhir . dstu3 . hapi . validation . PrePopulatedValidationSupport ( ) ; for ( org . hl7 . fhir . dstu3 . hapi . validation . StructureDefinition sd : new org . hl7 . fhir . dstu3 . hapi . ctx . DefaultProfileValidationSupport ( ) . fetchAllStructureDefinitions ( this . context ) ) { this . validationSupport . addStructureDefinition ( sd ) ; } org . hl7 . fhir . dstu3 . hapi . validation . StructureDefinition sd1 = this . createTestStructure ( ) ; this . validationSupport . addStructureDefinition ( sd1 ) ; this . hapiContext = new org . hl7 . fhir . dstu3 . hapi . ctx . HapiWorkerContext ( this . context , this . validationSupport ) ; org . hl7 . fhir . dstu3 . hapi . validation . StructureMap map = this . createTestStructuremap ( ) ; maps . put ( map . getUrl ( ) , map ) ; org . hl7 . fhir . dstu3 . utils . StructureMapUtilities scu = new org . hl7 . fhir . dstu3 . utils . StructureMapUtilities ( hapiContext , maps , null , null ) ; org . hl7 . fhir . dstu3 . hapi . validation . List < org . hl7 . fhir . dstu3 . hapi . validation . StructureDefinition > result = scu . analyse ( null , map ) . getProfiles ( ) ; "<AssertPlaceHolder>" ; org . hl7 . fhir . dstu3 . hapi . validation . StructureMapTest . ourLog . info ( context . newXmlParser ( ) . setPrettyPrint ( true ) . encodeResourceToString ( result . get ( 0 ) ) ) ; } size ( ) { return myTagSet . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , result . size ( ) )
testBasicUpdateOfMessage ( ) { myValidatorManager . addRoot ( myShop , new com . rcpcompany . uibindings . validators . ConstraintValidatorAdapter ( ) ) ; myItem . setPrice ( 10.0F ) ; sleep ( ( 2 * ( com . rcpcompany . uibindings . internal . validators . BindingMessageCollectionTest . VD ) ) ) ; "<AssertPlaceHolder>" ; } getUnboundMessages ( ) { return myUnboundMessagesUnmodifiable ; }
org . junit . Assert . assertEquals ( 0 , myValidatorManager . getUnboundMessages ( ) . size ( ) )
all_by_excluding_where ( ) { "<AssertPlaceHolder>" ; } fetch ( ) { return innerList ( ) ; }
org . junit . Assert . assertEquals ( 4 , query . fetch ( ) . size ( ) )
singleByteReadWorksAsExpected ( ) { final java . io . File input = getFile ( "zstandard.testdata.zst" ) ; final java . io . File original = getFile ( "zstandard.testdata" ) ; final long originalFileLength = original . length ( ) ; byte [ ] originalFileContent = new byte [ ( ( int ) ( originalFileLength ) ) ] ; try ( java . io . InputStream ois = new java . io . FileInputStream ( original ) ) { ois . read ( originalFileContent ) ; } try ( java . io . InputStream is = new java . io . FileInputStream ( input ) ) { final org . apache . commons . compress . compressors . zstandard . ZstdCompressorInputStream in = new org . apache . commons . compress . compressors . zstandard . ZstdCompressorInputStream ( is ) ; "<AssertPlaceHolder>" ; in . close ( ) ; } } read ( ) { if ( ! ( buffer . available ( ) ) ) { fillBuffer ( ) ; } final int ret = buffer . get ( ) ; if ( ret > ( - 1 ) ) { ( uncompressedCount ) ++ ; } return ret ; }
org . junit . Assert . assertEquals ( originalFileContent [ 0 ] , in . read ( ) )
shouldNotRespondToPreBuildEvents ( ) { org . eclipse . core . resources . IResourceChangeEvent event = new org . eclipse . core . internal . events . ResourceChangeEvent ( this , org . eclipse . core . resources . IResourceChangeEvent . PRE_BUILD , org . eclipse . core . resources . IncrementalProjectBuilder . AUTO_BUILD , null ) ; "<AssertPlaceHolder>" ; } canProcessEvent ( org . eclipse . core . resources . IResourceChangeEvent ) { org . infinitest . eclipse . event . DeltaVisitor visitor = new org . infinitest . eclipse . event . DeltaVisitor ( ) ; try { event . getDelta ( ) . accept ( visitor , true ) ; } catch ( org . eclipse . core . runtime . CoreException e ) { throw new java . lang . RuntimeException ( e ) ; } return visitor . savedResourceFound ( ) ; }
org . junit . Assert . assertFalse ( processor . canProcessEvent ( event ) )
default_filter_does_allow_type_requests ( ) { com . flextrade . jfixture . utility . RequestFilter filter = com . flextrade . jfixture . utility . RequestFilter . onlyDefault ( ) ; boolean allow = filter . allow ( com . flextrade . jfixture . utility . SpecimenType . of ( java . lang . String . class ) ) ; "<AssertPlaceHolder>" ; } of ( java . lang . reflect . Type ) { return new com . flextrade . jfixture . utility . SpecimenType < java . lang . Object > ( type ) { } ; }
org . junit . Assert . assertTrue ( allow )
testSerialization ( ) { org . jfree . chart . annotations . XYBoxAnnotation a1 = new org . jfree . chart . annotations . XYBoxAnnotation ( 1.0 , 2.0 , 3.0 , 4.0 , new java . awt . BasicStroke ( 1.2F ) , java . awt . Color . RED , java . awt . Color . BLUE ) ; org . jfree . chart . annotations . XYBoxAnnotation a2 = ( ( org . jfree . chart . annotations . XYBoxAnnotation ) ( org . jfree . chart . TestUtils . serialised ( a1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( a1 , a2 )
testHeeftOfKrijgtNederlandseNationaliteit_eersteInschrijving_AlleenAndereNationaliteit ( ) { final nl . bzk . brp . bijhouding . bericht . model . ElementBuilder builder = new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder ( ) ; final int peilDatum = 20160101 ; final nl . bzk . brp . bijhouding . bericht . model . NationaliteitElement nationaliteitElement = builder . maakNationaliteitElement ( "nat3" , "0039" , null ) ; final nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . PersoonParameters persoonParams = new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . PersoonParameters ( ) ; persoonParams . nationaliteiten ( java . util . Collections . singletonList ( nationaliteitElement ) ) ; final nl . bzk . brp . bijhouding . bericht . model . PersoonElement persoonElement = builder . maakPersoonGegevensElement ( "persoon" , null , null , persoonParams ) ; final nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon bijhoudingPersoon = new nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon ( ) ; bijhoudingPersoon . registreerPersoonElement ( persoonElement ) ; "<AssertPlaceHolder>" ; } heeftNederlandseNationaliteitOfIndicatieBehandeldAlsNederlander ( java . lang . Integer ) { final boolean heeftNederlandseNationaliteit = getNationaliteitHelper ( ) . heeftNederlandseNationaliteit ( peilDatum ) ; final boolean eersteInschrijvingEnNietBeeindigeNLnationaliteit = ( isEersteInschrijving ) && heeftNederlandseNationaliteit ; return eersteInschrijvingEnNietBeeindigeNLnationaliteit || ( ( ! ( isEersteInschrijving ) ) && ( heeftNederlandseNationaliteit || ( heeftBehandeldAlsNederlanderIndicatieOpDatum ( peilDatum ) ) ) ) ; }
org . junit . Assert . assertFalse ( bijhoudingPersoon . heeftNederlandseNationaliteitOfIndicatieBehandeldAlsNederlander ( peilDatum ) )
testNumIdleUpdatedOnCheckIn ( ) { com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCache < com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCacheTest . Service > cache = newCache ( ) ; cache . checkIn ( cache . checkOut ( com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCacheTest . END_POINT ) ) ; "<AssertPlaceHolder>" ; } getNumIdleInstances ( com . bazaarvoice . ostrich . ServiceEndPoint ) { checkNotNull ( endPoint ) ; return _pool . getNumIdle ( endPoint ) ; }
org . junit . Assert . assertEquals ( 1 , cache . getNumIdleInstances ( com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCacheTest . END_POINT ) )
testEulerNumber_fullSquareC8 ( ) { ij . process . ImageProcessor image = new ij . process . ByteProcessor ( 6 , 6 ) ; for ( int i = 0 ; i < 6 ; i ++ ) { for ( int j = 0 ; j < 6 ; j ++ ) { image . set ( i , j , 255 ) ; } } int euler = inra . ijpb . measure . IntrinsicVolumes2D . eulerNumber ( image , 8 ) ; "<AssertPlaceHolder>" ; } eulerNumber ( ij . process . ImageProcessor , int ) { int [ ] lut = inra . ijpb . measure . region2d . IntrinsicVolumesAnalyzer2D . eulerNumberIntLut ( conn ) ; int [ ] histo = new inra . ijpb . measure . region2d . BinaryConfigurationsHistogram2D ( ) . process ( image ) ; return ( inra . ijpb . measure . region2d . BinaryConfigurationsHistogram2D . applyLut ( histo , lut ) ) / 4 ; }
org . junit . Assert . assertEquals ( 1 , euler )
testSize ( ) { org . apache . tajo . datum . Datum d = org . apache . tajo . datum . DatumFactory . createBlob ( "12345" . getBytes ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return casesMap . size ( ) ; }
org . junit . Assert . assertEquals ( 5 , d . size ( ) )
progressPriorTo20181018 ( ) { com . fasterxml . jackson . databind . ObjectMapper mapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; com . fasterxml . jackson . databind . node . ObjectNode root = mapper . createObjectNode ( ) ; root . set ( "status" , mapper . createObjectNode ( ) . put ( "@id" , ExecutionStatus . QUEUED . asStr ( ) ) ) ; java . lang . String pipeline = "http://pipeline" ; root . set ( "pipeline" , mapper . createObjectNode ( ) . put ( "@id" , pipeline ) ) ; java . util . Date start = new java . util . GregorianCalendar ( 2019 , 1 , 1 , 23 , 2 , 10 ) . getTime ( ) ; java . util . Date finished = new java . util . GregorianCalendar ( 2019 , 1 , 5 , 13 , 6 , 30 ) . getTime ( ) ; root . put ( "executionStarted" , dateFormat . format ( start ) ) ; root . put ( "executionFinished" , dateFormat . format ( finished ) ) ; root . put ( "http://execution" 1 , 1204 ) ; root . set ( "pipelineProgress" , mapper . createObjectNode ( ) . put ( "http://execution" 0 , 3 ) . put ( "total" , 10 ) ) ; java . util . Date lastChange = new java . util . GregorianCalendar ( 2016 , 1 , 5 , 13 , 6 , 30 ) . getTime ( ) ; root . put ( "http://execution" 2 , dateFormat . format ( lastChange ) ) ; com . linkedpipes . etl . executor . monitor . execution . Execution execution = org . mockito . Mockito . mock ( com . linkedpipes . etl . executor . monitor . execution . Execution . class ) ; java . lang . String graph = "http://graph" ; org . mockito . Mockito . when ( execution . getListGraph ( ) ) . thenReturn ( graph ) ; java . lang . String iri = "http://execution" ; org . mockito . Mockito . when ( execution . getIri ( ) ) . thenReturn ( iri ) ; com . linkedpipes . etl . rdf4j . Statements expected = com . linkedpipes . etl . rdf4j . Statements . arrayList ( ) ; expected . setDefaultGraph ( graph ) ; expected . addIri ( iri , RDF . TYPE , LP_EXEC . EXECUTION ) ; expected . addLong ( iri , LP_EXEC . HAS_SIZE , 1204L ) ; expected . addIri ( iri , LP_OVERVIEW . HAS_PIPELINE , pipeline ) ; expected . addDate ( iri , LP_OVERVIEW . HAS_START , start ) ; expected . addDate ( iri , LP_OVERVIEW . HAS_END , finished ) ; expected . addInt ( iri , LP_OVERVIEW . HAS_PROGRESS_CURRENT , 3 ) ; expected . addInt ( iri , LP_OVERVIEW . HAS_PROGRESS_TOTAL , 10 ) ; expected . addIri ( iri , LP_OVERVIEW . HAS_STATUS , ExecutionStatus . QUEUED . asStr ( ) ) ; com . linkedpipes . etl . rdf4j . Statements actual = this . toStatements . asStatements ( execution , root ) ; "<AssertPlaceHolder>" ; } containsAllLogMissing ( java . util . Collection ) { java . util . Set < org . eclipse . rdf4j . model . Statement > thisAsSet = new java . util . HashSet ( this . collection ) ; boolean containsAll = true ; for ( org . eclipse . rdf4j . model . Statement statement : statements ) { if ( thisAsSet . contains ( statement ) ) { continue ; } containsAll = false ; com . linkedpipes . etl . rdf4j . Statements . LOG . info ( "{}" , statement ) ; } return containsAll ; }
org . junit . Assert . assertTrue ( actual . containsAllLogMissing ( expected ) )
testPropertiesMarshallUnmarshall ( ) { org . eclipse . kura . internal . xml . marshaller . unmarshaller . XmlMarshallUnmarshallImpl xmlMarshallerImpl = new org . eclipse . kura . internal . xml . marshaller . unmarshaller . XmlMarshallUnmarshallImpl ( ) ; java . lang . String pid = "org.eclipse.kura.cloud.CloudService" ; org . eclipse . kura . core . configuration . metatype . Tocd definition = null ; java . util . Map < java . lang . String , java . lang . Object > properties = new java . util . HashMap ( ) ; properties . put ( "prop.string" , new java . lang . String ( "prop.value" ) ) ; properties . put ( "prop.long" , Long . MAX_VALUE ) ; properties . put ( "prop.double" , Double . MAX_VALUE ) ; properties . put ( "prop.float" , Float . MAX_VALUE ) ; properties . put ( "prop.integer" , Integer . MAX_VALUE ) ; properties . put ( "prop.byte" , Byte . MAX_VALUE ) ; properties . put ( "prop.character" , 'a' ) ; properties . put ( "prop.short" , Short . MAX_VALUE ) ; org . eclipse . kura . core . configuration . XmlComponentConfigurations xcc = new org . eclipse . kura . core . configuration . XmlComponentConfigurations ( ) ; java . util . List < org . eclipse . kura . configuration . ComponentConfiguration > ccis = new java . util . ArrayList ( ) ; org . eclipse . kura . core . configuration . ComponentConfigurationImpl config = new org . eclipse . kura . core . configuration . ComponentConfigurationImpl ( pid , definition , properties ) ; ccis . add ( config ) ; xcc . setConfigurations ( ccis ) ; java . lang . String s = xmlMarshallerImpl . marshal ( xcc ) ; org . eclipse . kura . internal . xml . marshaller . unmarshaller . test . XmlEncoderDecoderTest . logger . info ( s ) ; org . eclipse . kura . core . configuration . XmlComponentConfigurations config1 = xmlMarshallerImpl . unmarshal ( s , org . eclipse . kura . core . configuration . XmlComponentConfigurations . class ) ; java . lang . String s1 = xmlMarshallerImpl . marshal ( config1 ) ; org . eclipse . kura . internal . xml . marshaller . unmarshaller . test . XmlEncoderDecoderTest . logger . info ( s1 ) ; java . util . Map < java . lang . String , java . lang . Object > properties1 = config1 . getConfigurations ( ) . get ( 0 ) . getConfigurationProperties ( ) ; "<AssertPlaceHolder>" ; } getConfigurationProperties ( ) { return this . properties ; }
org . junit . Assert . assertEquals ( properties , properties1 )
testAppendPartialRowsHappy ( ) { org . sagebionetworks . repo . model . table . RowReferenceSet results = manager . appendPartialRows ( user , tableId , partialSet , mockProgressCallback , transactionId ) ; "<AssertPlaceHolder>" ; verify ( mockTableManagerSupport , times ( 1 ) ) . setTableToProcessingAndTriggerUpdate ( tableId ) ; verify ( mockTableManagerSupport ) . validateTableWriteAccess ( user , tableId ) ; } appendPartialRows ( org . sagebionetworks . repo . model . UserInfo , java . lang . String , org . sagebionetworks . repo . model . table . PartialRowSet , org . sagebionetworks . common . util . progress . ProgressCallback , long ) { org . sagebionetworks . manager . util . Validate . required ( user , "User" ) ; org . sagebionetworks . manager . util . Validate . required ( tableId , "TableId" ) ; org . sagebionetworks . manager . util . Validate . required ( partial , "RowsToAppendOrUpdate" ) ; java . util . List < org . sagebionetworks . repo . model . table . ColumnModel > currentSchema = columModelManager . getColumnModelsForTable ( user , tableId ) ; org . sagebionetworks . table . cluster . utils . TableModelUtils . validateRequestSize ( partial , maxBytesPerRequest ) ; org . sagebionetworks . table . cluster . utils . TableModelUtils . validatePartialRowSet ( partial , currentSchema ) ; org . sagebionetworks . repo . model . table . TableRowChange lastRowChange = tableRowTruthDao . getLastTableRowChange ( tableId , TableChangeType . ROW ) ; org . sagebionetworks . repo . model . table . SparseChangeSetDto dto = org . sagebionetworks . table . cluster . utils . TableModelUtils . createSparseChangeSetFromPartialRowSet ( lastRowChange , partial ) ; org . sagebionetworks . repo . model . table . RowReferenceSet results = new org . sagebionetworks . repo . model . table . RowReferenceSet ( ) ; appendRowsAsStream ( user , tableId , currentSchema , dto . getRows ( ) . iterator ( ) , results . getEtag ( ) , results , progressCallback , transactionId ) ; return results ; }
org . junit . Assert . assertNotNull ( results )
longestCommonSubstring ( ) { "<AssertPlaceHolder>" ; } longestCommonSubstring ( ) { org . junit . Assert . assertNotNull ( org . simmetrics . metrics . StringMetrics . longestCommonSubstring ( ) ) ; }
org . junit . Assert . assertNotNull ( org . simmetrics . metrics . StringMetrics . longestCommonSubstring ( ) )
simpleQueryParam_encoding_expectDecodedParam ( ) { com . amazonaws . serverless . proxy . model . AwsProxyRequest request = getRequestBuilder ( "/echo/decoded-param" , "GET" ) . queryString ( "param" , com . amazonaws . serverless . proxy . jersey . JerseyParamEncodingTest . SIMPLE_ENCODED_PARAM ) . build ( ) ; com . amazonaws . serverless . proxy . model . AwsProxyResponse resp = com . amazonaws . serverless . proxy . jersey . JerseyParamEncodingTest . handler . proxy ( request , com . amazonaws . serverless . proxy . jersey . JerseyParamEncodingTest . lambdaContext ) ; "<AssertPlaceHolder>" ; validateSingleValueModel ( resp , com . amazonaws . serverless . proxy . jersey . JerseyParamEncodingTest . SIMPLE_ENCODED_PARAM ) ; } getStatusCode ( ) { return statusCode ; }
org . junit . Assert . assertEquals ( 200 , resp . getStatusCode ( ) )
testSetCombinationFilterParentNull ( ) { java . lang . String combinationFilter = "filter" ; hudson . matrix . MatrixProject childProject1 = new hudson . matrix . MatrixProjectTest . MatrixProjectMock ( "child1" ) ; childProject1 . setCombinationFilter ( combinationFilter ) ; "<AssertPlaceHolder>" ; } getCombinationFilter ( ) { return hudson . util . CascadingUtil . getStringProjectProperty ( this , hudson . matrix . MatrixProject . COMBINATION_FILTER_PROPERTY_NAME ) . getValue ( ) ; }
org . junit . Assert . assertEquals ( childProject1 . getCombinationFilter ( ) , combinationFilter )
testGetMappingFromHiveColumn ( ) { java . util . List < java . lang . String > hiveColumns = java . util . Arrays . asList ( "rowid" , "col1" , "col2" , "col3" ) ; java . util . List < org . apache . hadoop . hive . serde2 . typeinfo . TypeInfo > columnTypes = java . util . Arrays . < org . apache . hadoop . hive . serde2 . typeinfo . TypeInfo > asList ( TypeInfoFactory . stringTypeInfo , TypeInfoFactory . stringTypeInfo , TypeInfoFactory . stringTypeInfo , TypeInfoFactory . stringTypeInfo ) ; java . util . List < java . lang . String > rawMappings = java . util . Arrays . asList ( AccumuloHiveConstants . ROWID , "cf:cq" , "cf:_" , "cf:qual" ) ; org . apache . hadoop . hive . accumulo . columns . ColumnMapper mapper = new org . apache . hadoop . hive . accumulo . columns . ColumnMapper ( com . google . common . base . Joiner . on ( AccumuloHiveConstants . COMMA ) . join ( rawMappings ) , null , hiveColumns , columnTypes ) ; for ( int i = 0 ; i < ( hiveColumns . size ( ) ) ; i ++ ) { java . lang . String hiveColumn = hiveColumns . get ( i ) ; java . lang . String accumuloMapping = rawMappings . get ( i ) ; org . apache . hadoop . hive . accumulo . columns . ColumnMapping mapping = mapper . getColumnMappingForHiveColumn ( hiveColumns , hiveColumn ) ; "<AssertPlaceHolder>" ; } } getMappingSpec ( ) { return mappingSpec ; }
org . junit . Assert . assertEquals ( accumuloMapping , mapping . getMappingSpec ( ) )
addVector3D ( ) { org . arakhne . afc . math . geometry . d3 . continuous . Vector3f v1 = new org . arakhne . afc . math . geometry . d3 . continuous . Vector3f ( this . random . nextDouble ( ) , this . random . nextDouble ( ) , this . random . nextDouble ( ) ) ; org . arakhne . afc . math . geometry . d3 . continuous . Vector3f v2 = new org . arakhne . afc . math . geometry . d3 . continuous . Vector3f ( this . random . nextDouble ( ) , this . random . nextDouble ( ) , this . random . nextDouble ( ) ) ; org . arakhne . afc . math . geometry . d3 . continuous . Vector3f sum = new org . arakhne . afc . math . geometry . d3 . continuous . Vector3f ( ( ( v1 . getX ( ) ) + ( v2 . getX ( ) ) ) , ( ( v1 . getY ( ) ) + ( v2 . getY ( ) ) ) , ( ( v1 . getZ ( ) ) + ( v2 . getZ ( ) ) ) ) ; v1 . add ( v2 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( object instanceof org . arakhne . afc . vmutil . MACNumber ) ) { return false ; } final byte [ ] bao = ( ( org . arakhne . afc . vmutil . MACNumber ) ( object ) ) . bytes ; if ( ( bao . length ) != ( this . bytes . length ) ) { return false ; } for ( int i = 0 ; i < ( bao . length ) ; ++ i ) { if ( ( bao [ i ] ) != ( this . bytes [ i ] ) ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( sum . equals ( v1 ) )
earliest_shouldGetAnEmptyResultGivenAnEmptyResult ( ) { org . openmrs . logic . result . Result parentResult = new org . openmrs . logic . result . EmptyResult ( ) ; "<AssertPlaceHolder>" ; } earliest ( ) { if ( isSingleResult ( ) ) { return this ; } org . openmrs . logic . result . Result first = org . openmrs . logic . result . Result . emptyResult ( ) ; if ( ( size ( ) ) > 0 ) { first = get ( 0 ) ; } for ( org . openmrs . logic . result . Result r : this ) { if ( ( ( r != null ) && ( ( r . getResultDate ( ) ) != null ) ) && ( ( ( first . getResultDate ( ) ) == null ) || ( r . getResultDate ( ) . before ( first . getResultDate ( ) ) ) ) ) { first = r ; } } return first ; }
org . junit . Assert . assertEquals ( new org . openmrs . logic . result . EmptyResult ( ) , parentResult . earliest ( ) )
testParseValueForDatabaseWrite ( ) { java . lang . Double expected = new java . lang . Double ( 123.456 ) ; java . lang . Object objectValue = parser . parseValueForDatabaseWrite ( "123.456" ) ; "<AssertPlaceHolder>" ; } parseValueForDatabaseWrite ( java . lang . String ) { if ( Boolean . TRUE . toString ( ) . equalsIgnoreCase ( value ) ) { return Boolean . TRUE ; } else if ( Boolean . FALSE . toString ( ) . equalsIgnoreCase ( value ) ) { return Boolean . FALSE ; } throw new java . lang . IllegalArgumentException ( ( "Not<sp>a<sp>boolean:<sp>" + value ) ) ; }
org . junit . Assert . assertEquals ( expected , objectValue )
testEqualsWithRelation ( ) { edu . ucla . sspace . dependency . SimpleDependencyTreeNode node1 = new edu . ucla . sspace . dependency . SimpleDependencyTreeNode ( "cat" , "n" , "c" , 0 ) ; edu . ucla . sspace . dependency . DependencyTreeNode node2 = new edu . ucla . sspace . dependency . SimpleDependencyTreeNode ( "cat" , "n" , "c" , 0 ) ; edu . ucla . sspace . dependency . DependencyRelation rel = new edu . ucla . sspace . dependency . SimpleDependencyRelation ( node1 , "c" , node2 ) ; node1 . addNeighbor ( rel ) ; "<AssertPlaceHolder>" ; } addNeighbor ( edu . ucla . sspace . dependency . DependencyRelation ) { neighbors . add ( relation ) ; }
org . junit . Assert . assertEquals ( node1 , node2 )
testGetTags ( ) { java . util . List < org . finra . herd . model . api . xml . TagChild > tagChildren = new java . util . ArrayList ( ) ; tagChildren . add ( new org . finra . herd . model . api . xml . TagChild ( new org . finra . herd . model . api . xml . TagKey ( TAG_TYPE , TAG_CODE ) , false ) ) ; tagChildren . add ( new org . finra . herd . model . api . xml . TagChild ( new org . finra . herd . model . api . xml . TagKey ( TAG_TYPE , TAG_CODE_2 ) , false ) ) ; org . finra . herd . model . api . xml . TagListResponse tagListResponse = new org . finra . herd . model . api . xml . TagListResponse ( ) ; tagListResponse . setTagChildren ( tagChildren ) ; when ( tagService . getTags ( org . finra . herd . rest . TAG_TYPE , org . finra . herd . rest . TAG_CODE ) ) . thenReturn ( tagListResponse ) ; org . finra . herd . model . api . xml . TagListResponse resultTagKeys = tagRestController . getTags ( org . finra . herd . rest . TAG_TYPE , org . finra . herd . rest . TAG_CODE ) ; verify ( tagService ) . getTags ( org . finra . herd . rest . TAG_TYPE , org . finra . herd . rest . TAG_CODE ) ; verifyNoMoreInteractions ( tagService ) ; "<AssertPlaceHolder>" ; } getTags ( java . lang . String , java . lang . String ) { java . lang . String tagTypeCodeLocal = alternateKeyHelper . validateStringParameter ( "tag<sp>type<sp>code" , tagTypeCode ) ; java . lang . String cleanTagCode = tagCode ; tagTypeDaoHelper . getTagTypeEntity ( new org . finra . herd . model . api . xml . TagTypeKey ( tagTypeCodeLocal ) ) ; org . finra . herd . model . api . xml . TagListResponse response = new org . finra . herd . model . api . xml . TagListResponse ( ) ; if ( tagCode != null ) { cleanTagCode = alternateKeyHelper . validateStringParameter ( "tag<sp>code" , tagCode ) ; org . finra . herd . model . api . xml . TagKey tagKey = new org . finra . herd . model . api . xml . TagKey ( tagTypeCodeLocal , cleanTagCode ) ; org . finra . herd . model . api . xml . Tag tag = getTag ( tagKey ) ; response . setTagKey ( tag . getTagKey ( ) ) ; response . setParentTagKey ( tag . getParentTagKey ( ) ) ; } java . util . List < org . finra . herd . model . api . xml . TagChild > tagChildren = tagDao . getTagsByTagTypeAndParentTagCode ( tagTypeCodeLocal , cleanTagCode ) ; response . setTagChildren ( tagChildren ) ; return response ; }
org . junit . Assert . assertEquals ( tagListResponse , resultTagKeys )
testSearchBadDN ( ) { javax . naming . ldap . LdapContext ctx = ( ( javax . naming . ldap . LdapContext ) ( getWiredContext ( getLdapServer ( ) ) . lookup ( org . apache . directory . server . operations . search . SearchIT . BASE ) ) ) ; javax . naming . directory . SearchControls controls = new javax . naming . directory . SearchControls ( ) ; controls . setSearchScope ( SearchControls . ONELEVEL_SCOPE ) ; try { ctx . search ( "cn=admin" , "(objectClass=*)" , controls ) ; } catch ( javax . naming . NameNotFoundException nnfe ) { "<AssertPlaceHolder>" ; } ctx . close ( ) ; } search ( org . apache . directory . api . ldap . model . name . Dn , java . lang . String , boolean ) { org . apache . directory . server . core . api . OperationManager operationManager = directoryService . getOperationManager ( ) ; org . apache . directory . api . ldap . model . filter . ExprNode filterNode = null ; try { filterNode = org . apache . directory . api . ldap . model . filter . FilterParser . parse ( directoryService . getSchemaManager ( ) , filter ) ; } catch ( java . text . ParseException pe ) { throw new org . apache . directory . api . ldap . model . exception . LdapInvalidSearchFilterException ( pe . getMessage ( ) ) ; } org . apache . directory . server . core . api . interceptor . context . SearchOperationContext searchContext = new org . apache . directory . server . core . api . interceptor . context . SearchOperationContext ( this , dn , org . apache . directory . api . ldap . model . message . SearchScope . OBJECT , filterNode , ( ( java . lang . String ) ( null ) ) ) ; searchContext . setAliasDerefMode ( AliasDerefMode . DEREF_ALWAYS ) ; setReferralHandling ( searchContext , ignoreReferrals ) ; return operationManager . search ( searchContext ) ; }
org . junit . Assert . assertTrue ( true )
testApply_Payload_ApplicableIndexButNoIndexFlagIsSet ( ) { org . lilyproject . util . repo . RecordEvent recordEvent = new org . lilyproject . util . repo . RecordEvent ( ) ; org . lilyproject . util . repo . RecordEvent . IndexRecordFilterData filterData = new org . lilyproject . util . repo . RecordEvent . IndexRecordFilterData ( ) ; filterData . setSubscriptionInclusions ( com . google . common . collect . ImmutableSet . of ( org . lilyproject . indexer . event . IndexerEditFilterTest . INDEX_NAME ) ) ; recordEvent . setIndexRecordFilterData ( filterData ) ; recordEvent . getAttributes ( ) . put ( IndexerEditFilter . NO_INDEX_FLAG , "false" ) ; org . apache . hadoop . hbase . regionserver . wal . WALEdit walEdit = new org . apache . hadoop . hbase . regionserver . wal . WALEdit ( ) ; walEdit . add ( new org . apache . hadoop . hbase . KeyValue ( org . apache . hadoop . hbase . util . Bytes . toBytes ( "row" ) , RecordCf . DATA . bytes , RecordColumn . PAYLOAD . bytes , recordEvent . toJsonBytes ( ) ) ) ; editFilter . apply ( walEdit ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , walEdit . size ( ) )
testMergeSingleStrings ( ) { final java . util . List < org . apache . commons . lang3 . tuple . Pair < java . lang . String , java . lang . String > > outputs = new java . util . ArrayList < org . apache . commons . lang3 . tuple . Pair < java . lang . String , java . lang . String > > ( ) ; uk . org . rbc1b . roms . db . common . MergeUtil . merge ( java . util . Arrays . asList ( "foo" ) , java . util . Arrays . asList ( "foo" ) , String . CASE_INSENSITIVE_ORDER , new MergeUtil . Callback < java . lang . String , java . lang . String > ( ) { @ java . lang . Override public void output ( java . lang . String leftValue , java . lang . String rightValue ) { outputs . add ( new ImmutablePair < java . lang . String , java . lang . String > ( leftValue , rightValue ) ) ; } } ) ; "<AssertPlaceHolder>" ; } output ( java . lang . String , uk . org . rbc1b . roms . db . common . Container ) { outputs . add ( new ImmutablePair < java . lang . String , uk . org . rbc1b . roms . db . common . Container > ( left , right ) ) ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( new org . apache . commons . lang3 . tuple . ImmutablePair < java . lang . String , java . lang . String > ( "foo" , "foo" ) ) , outputs )
execute_metacharacter_variables ( ) { java . io . File file = folder . newFile ( "$\"\'`\\=<sp>file" ) ; org . junit . Assume . assumeTrue ( file . delete ( ) ) ; java . io . File script = folder . newFile ( "script.sh" ) ; try ( java . io . PrintWriter writer = new java . io . PrintWriter ( script ) ) { writer . print ( "#!/bin/sh\n" , "1touch<sp>\"${file}\"\n" ) ; } script . setExecutable ( true ) ; java . util . Map < java . lang . String , java . lang . String > config = new java . util . HashMap ( ) ; config . put ( JschProcessExecutor . KEY_USER , java . lang . System . getProperty ( "user.name" ) ) ; config . put ( JschProcessExecutor . KEY_HOST , "localhost" ) ; config . put ( JschProcessExecutor . KEY_PRIVATE_KEY , privateKey . getAbsolutePath ( ) ) ; com . asakusafw . yaess . core . VariableResolver resolver = com . asakusafw . yaess . core . VariableResolver . system ( ) ; com . asakusafw . yaess . jsch . JschProcessExecutor extracted = com . asakusafw . yaess . jsch . JschProcessExecutor . extract ( "testing" , config , resolver ) ; try { java . util . Map < java . lang . String , java . lang . String > env = new java . util . HashMap ( ) ; env . put ( "file" , file . getAbsolutePath ( ) ) ; int exit = extracted . execute ( new com . asakusafw . yaess . core . ExecutionContext ( "b" , "f" , "e" , "0Test<sp>is<sp>skipped<sp>because<sp>SSH<sp>session<sp>was<sp>not<sp>available:<sp>variables/meta%n" ) ; e . printStackTrace ( ) ; org . junit . Assume . assumeNoException ( e ) ; } "<AssertPlaceHolder>" ; } exists ( ) { return new org . hamcrest . BaseMatcher < java . io . File > ( ) { @ com . asakusafw . operation . tools . directio . Override public boolean matches ( java . lang . Object item ) { return ( ( java . io . File ) ( item ) ) . exists ( ) ; } @ com . asakusafw . operation . tools . directio . Override public void describeTo ( org . hamcrest . Description description ) { description . appendText ( "exists" ) ; } } ; }
org . junit . Assert . assertThat ( file . exists ( ) , is ( true ) )
testTimestamp ( ) { org . apache . cxf . service . Service service = createService ( ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties inProperties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; java . util . List < org . apache . wss4j . stax . ext . WSSConstants . Action > actions = new java . util . ArrayList ( ) ; actions . add ( WSSConstants . TIMESTAMP ) ; inProperties . setActions ( actions ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor inhandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor ( inProperties ) ; service . getInInterceptors ( ) . add ( inhandler ) ; org . apache . cxf . ws . security . wss4j . Echo echo = createClientProxy ( ) ; org . apache . cxf . endpoint . Client client = org . apache . cxf . frontend . ClientProxy . getClient ( echo ) ; client . getInInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingInInterceptor ( ) ) ; client . getOutInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingOutInterceptor ( ) ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties properties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; actions = new java . util . ArrayList ( ) ; actions . add ( WSSConstants . TIMESTAMP ) ; properties . setActions ( actions ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ohandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ( properties ) ; client . getOutInterceptors ( ) . add ( ohandler ) ; "<AssertPlaceHolder>" ; } echo ( int ) { return i ; }
org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) )
charArrayCompare1 ( ) { java . lang . String src = "" ; int offset = 7 ; char [ ] dest = new char [ ] { '
org . junit . Assert . assertEquals ( false , retval )
testIterator ( ) { com . github . krukow . clj_lang . PersistentHashSet < java . lang . Integer > dsSet = com . github . krukow . clj_lang . PersistentHashSet . emptySet ( ) ; java . util . HashSet < java . lang . Integer > hs = null ; for ( int i = 0 ; i < 20000 ; i ++ ) { hs = new java . util . HashSet < java . lang . Integer > ( ) ; for ( java . lang . Integer o : dsSet ) { hs . add ( o ) ; } "<AssertPlaceHolder>" ; java . lang . Integer o = new java . lang . Integer ( i ) ; dsSet = ( ( com . github . krukow . clj_lang . PersistentHashSet < java . lang . Integer > ) ( dsSet . cons ( o ) ) ) ; } } size ( ) { return com . github . krukow . clj_lang . APersistentTrie . count ( ) ; }
org . junit . Assert . assertEquals ( i , hs . size ( ) )
testGetStringWithValidProperty ( ) { final edu . illinois . library . cantaloupe . config . Configuration instance = getInstance ( ) ; instance . setProperty ( "test1" , "cats" ) ; "<AssertPlaceHolder>" ; } getString ( java . lang . String ) { java . lang . Object value = configuration . get ( key ) ; if ( value != null ) { return value . toString ( ) ; } return null ; }
org . junit . Assert . assertEquals ( "cats" , instance . getString ( "test1" ) )
testReloadWithPasswordFile ( ) { java . security . KeyPair kp = org . apache . hadoop . security . ssl . KeyStoreTestUtil . generateKeyPair ( "RSA" ) ; cert1 = org . apache . hadoop . security . ssl . KeyStoreTestUtil . generateCertificate ( "/testreload.jks" 1 , kp , 30 , "SHA1withRSA" ) ; cert2 = org . apache . hadoop . security . ssl . KeyStoreTestUtil . generateCertificate ( "CN=Cert2" , kp , 30 , "SHA1withRSA" ) ; java . lang . String truststoreLocation = ( org . apache . hadoop . security . ssl . TestReloadingX509TrustManager . BASEDIR ) + "/testreload.jks" ; org . apache . hadoop . security . ssl . KeyStoreTestUtil . createTrustStore ( truststoreLocation , "password" , "cert1" , cert1 ) ; java . lang . String passwordFileLocation = java . nio . file . Paths . get ( org . apache . hadoop . security . ssl . TestReloadingX509TrustManager . BASEDIR , "password_file" ) . toString ( ) ; org . apache . commons . io . FileUtils . write ( new java . io . File ( passwordFileLocation ) , "password" ) ; final org . apache . hadoop . security . ssl . ReloadingX509TrustManager tm = new org . apache . hadoop . security . ssl . ReloadingX509TrustManager ( "jks" , truststoreLocation , "/testreload.jks" 0 , passwordFileLocation , 10 ) ; try { tm . init ( ) ; "<AssertPlaceHolder>" ; java . lang . Thread . sleep ( ( ( tm . getReloadInterval ( ) ) + 1000 ) ) ; java . util . Map < java . lang . String , java . security . cert . X509Certificate > certs = new java . util . HashMap < java . lang . String , java . security . cert . X509Certificate > ( ) ; certs . put ( "cert1" , cert1 ) ; certs . put ( "cert2" , cert2 ) ; org . apache . commons . io . FileUtils . write ( new java . io . File ( passwordFileLocation ) , "password1" ) ; org . apache . hadoop . security . ssl . KeyStoreTestUtil . createTrustStore ( truststoreLocation , "password1" , certs ) ; org . apache . hadoop . test . GenericTestUtils . waitFor ( new com . google . common . base . Supplier < java . lang . Boolean > ( ) { @ org . apache . hadoop . security . ssl . Override public org . apache . hadoop . security . ssl . Boolean get ( ) { return ( tm . getAcceptedIssuers ( ) . length ) == 2 ; } } , ( ( int ) ( tm . getReloadInterval ( ) ) ) , 10000 ) ; } finally { tm . destroy ( ) ; } } getAcceptedIssuers ( ) { return null ; }
org . junit . Assert . assertEquals ( 1 , tm . getAcceptedIssuers ( ) . length )
testSetAccelerator_OnSeparator ( ) { menuItem = new org . eclipse . swt . widgets . MenuItem ( menu , org . eclipse . swt . SWT . SEPARATOR ) ; menuItem . setAccelerator ( ( ( org . eclipse . swt . SWT . ALT ) | 'A' ) ) ; "<AssertPlaceHolder>" ; } getAccelerator ( ) { if ( enableAccelerator ) { return super . getAccelerator ( ) ; } return 0 ; }
org . junit . Assert . assertEquals ( ( ( org . eclipse . swt . SWT . ALT ) | 'A' ) , menuItem . getAccelerator ( ) )
testGeneratedId ( ) { org . springframework . data . mongodb . core . mapping . GeneratedId genId = new org . springframework . data . mongodb . core . mapping . GeneratedId ( "test" ) ; template . insert ( genId ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertNotNull ( genId . getId ( ) )
createAndGetNote ( ) { waitForNotesRegistration ( ) ; java . lang . Thread . sleep ( ( ( ( ocelliRefreshIntervalSeconds ) * 1000 ) + 1000L ) ) ; com . welflex . spring . web . notes . Note note = new com . welflex . spring . web . notes . Note ( "Test" ) ; java . lang . Long noteId = notesClient . createNote ( note ) ; "<AssertPlaceHolder>" ; } getNote ( java . lang . Long ) { return new com . welflex . notes . jaxb . Note ( "foo" , "some<sp>note" ) ; }
org . junit . Assert . assertEquals ( note , notesClient . getNote ( noteId ) )
test_RcWorkerKillOperation ( ) { com . hazelcast . simulator . coordinator . operations . RcWorkerKillOperation op = new com . hazelcast . simulator . coordinator . operations . RcWorkerKillOperation ( "bla" , mock ( com . hazelcast . simulator . coordinator . registry . WorkerQuery . class ) ) ; java . lang . String expected = "ok" ; when ( coordinator . workerKill ( op ) ) . thenReturn ( expected ) ; java . lang . String result = remote . execute ( op ) ; "<AssertPlaceHolder>" ; } execute ( java . lang . String ) { return new com . hazelcast . simulator . utils . BashCommand ( command ) . execute ( ) ; }
org . junit . Assert . assertSame ( expected , result )
testGetPrincipal ( ) { "<AssertPlaceHolder>" ; verify ( dlg , times ( 2 ) ) . getPrincipal ( ) ; verify ( autosaveMgr , never ( ) ) . autosave ( ) ; } getPrincipal ( ) { return principal ; }
org . junit . Assert . assertEquals ( dlg . getPrincipal ( ) , a . getPrincipal ( ) )
testAdjustTLSContext ( ) { de . rub . nds . tlsattacker . core . protocol . message . extension . ClientCertificateTypeExtensionMessage msg = new de . rub . nds . tlsattacker . core . protocol . message . extension . ClientCertificateTypeExtensionMessage ( ) ; msg . setCertificateTypes ( de . rub . nds . tlsattacker . core . constants . CertificateType . toByteArray ( certList ) ) ; handler . adjustTLSContext ( msg ) ; "<AssertPlaceHolder>" ; } getClientCertificateTypeDesiredTypes ( ) { return clientCertificateTypeDesiredTypes ; }
org . junit . Assert . assertThat ( certList , org . hamcrest . CoreMatchers . is ( context . getClientCertificateTypeDesiredTypes ( ) ) )
testDefaultSort01 ( ) { java . util . LinkedHashSet < org . apache . tomcat . util . net . jsse . openssl . Cipher > input = new java . util . LinkedHashSet ( ) ; input . add ( Cipher . TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 ) ; input . add ( Cipher . TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 ) ; input . add ( Cipher . TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 ) ; input . add ( Cipher . TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 ) ; java . util . LinkedHashSet < org . apache . tomcat . util . net . jsse . openssl . Cipher > result = org . apache . tomcat . util . net . jsse . openssl . OpenSSLCipherConfigurationParser . defaultSort ( input ) ; java . util . LinkedHashSet < org . apache . tomcat . util . net . jsse . openssl . Cipher > expected = new java . util . LinkedHashSet ( ) ; expected . add ( Cipher . TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 ) ; expected . add ( Cipher . TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 ) ; expected . add ( Cipher . TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 ) ; expected . add ( Cipher . TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuffer buf = new java . lang . StringBuffer ( org . apache . tomcat . jdbc . pool . interceptor . StatementDecoratorInterceptor . StatementProxy . class . getName ( ) ) ; buf . append ( "[Proxy=" ) ; buf . append ( java . lang . System . identityHashCode ( this ) ) ; buf . append ( ";<sp>Sql=" ) ; buf . append ( getSql ( ) ) ; buf . append ( ";<sp>Delegate=" ) ; buf . append ( getDelegate ( ) ) ; buf . append ( ";<sp>Connection=" ) ; buf . append ( getConnection ( ) ) ; buf . append ( "]" ) ; return buf . toString ( ) ; }
org . junit . Assert . assertEquals ( expected . toString ( ) , result . toString ( ) )
shouldGenerateAStringBetweenFromAndTo ( ) { int length = test ( 4 , 10 , 0 ) ; "<AssertPlaceHolder>" ; } test ( int , int , int ) { ch . nerdin . generators . testdata . framework . FieldProperty property = new ch . nerdin . generators . testdata . framework . FieldProperty ( ) ; if ( length != 0 ) { property . setMinLength ( length ) ; property . setMaxLength ( length ) ; } else { property . setMinLength ( min ) ; property . setMaxLength ( max ) ; } java . lang . StringBuilder result = stringGenerator . generate ( property ) ; org . junit . Assert . assertNotNull ( result ) ; System . out . println ( result ) ; return result . length ( ) ; }
org . junit . Assert . assertTrue ( ( ( length >= 4 ) && ( length <= 10 ) ) )
testElseNoBatch ( ) { final org . jboss . as . cli . CommandContext ctx = org . jboss . as . test . integration . management . util . CLITestUtil . getCommandContext ( cliOut ) ; try { ctx . connectController ( ) ; ctx . handle ( getAddPropertyReq ( "1" ) ) ; ctx . handle ( ( "if<sp>result.value==\"3\"<sp>of<sp>" + ( getReadPropertyReq ( ) ) ) ) ; ctx . handle ( "else" ) ; ctx . handle ( getWritePropertyReq ( "2" ) ) ; ctx . handle ( getReadNonexistingPropReq ( ) ) ; ctx . handle ( "end-if" ) ; org . junit . Assert . fail ( "expected<sp>exception" ) ; } catch ( org . jboss . as . cli . CommandLineException e ) { cliOut . reset ( ) ; ctx . handle ( getReadPropertyReq ( ) ) ; "<AssertPlaceHolder>" ; } finally { ctx . handleSafe ( getRemovePropertyReq ( ) ) ; ctx . terminateSession ( ) ; cliOut . reset ( ) ; } } getValue ( ) { return streamServer ; }
org . junit . Assert . assertEquals ( "2" , getValue ( ) )
decode ( ) { final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( encoded ) ; final com . flagstone . transform . coder . SWFDecoder decoder = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; final com . flagstone . transform . coder . Context context = new com . flagstone . transform . coder . Context ( ) ; fixture = new com . flagstone . transform . text . TextSpan ( decoder , context ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( fixture )
testFindCallOperation_withoutMatch ( ) { writer . appendCall ( "w2" , "method1" , null ) ; writer . appendCall ( "w1" , "method2" , null ) ; org . eclipse . rap . rwt . testfixture . internal . TestMessage message = getMessage ( ) ; "<AssertPlaceHolder>" ; } findCallOperation ( java . lang . String , java . lang . String ) { org . eclipse . rap . rwt . internal . protocol . Operation . CallOperation result = null ; java . util . List < org . eclipse . rap . rwt . internal . protocol . Operation > operations = getOperations ( ) ; for ( org . eclipse . rap . rwt . internal . protocol . Operation operation : operations ) { if ( ( operation . getTarget ( ) . equals ( target ) ) && ( operation instanceof org . eclipse . rap . rwt . internal . protocol . Operation . CallOperation ) ) { if ( method . equals ( ( ( org . eclipse . rap . rwt . internal . protocol . Operation . CallOperation ) ( operation ) ) . getMethodName ( ) ) ) { result = ( ( org . eclipse . rap . rwt . internal . protocol . Operation . CallOperation ) ( operation ) ) ; } } } return result ; }
org . junit . Assert . assertNull ( message . findCallOperation ( "w1" , "method1" ) )
shouldTreatAutoAndEmptyHostTheSameStreaming ( ) { org . apache . beam . runners . flink . FlinkPipelineOptions options = org . apache . beam . sdk . options . PipelineOptionsFactory . as ( org . apache . beam . runners . flink . FlinkPipelineOptions . class ) ; options . setRunner ( org . apache . beam . runners . flink . FlinkRunner . class ) ; org . apache . flink . streaming . api . environment . StreamExecutionEnvironment sev = org . apache . beam . runners . flink . FlinkExecutionEnvironments . createStreamExecutionEnvironment ( options , java . util . Collections . emptyList ( ) ) ; options . setFlinkMaster ( "[auto]" ) ; org . apache . flink . streaming . api . environment . StreamExecutionEnvironment sev2 = org . apache . beam . runners . flink . FlinkExecutionEnvironments . createStreamExecutionEnvironment ( options , java . util . Collections . emptyList ( ) ) ; "<AssertPlaceHolder>" ; } createStreamExecutionEnvironment ( org . apache . beam . runners . flink . FlinkPipelineOptions , java . util . List ) { return org . apache . beam . runners . flink . FlinkExecutionEnvironments . createStreamExecutionEnvironment ( options , filesToStage , null ) ; }
org . junit . Assert . assertEquals ( sev . getClass ( ) , sev2 . getClass ( ) )
testFragmentWithAction2 ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "R:<sp>\'kw1a\'<sp>f1=ID<sp>\'kw1b\'<sp>F;<sp>fragment<sp>F<sp>returns<sp>R:<sp>\'kw2a\'<sp>{A.prev=current}<sp>\'kw2b\'<sp>f2=ID<sp>\'kw2c\';" ) ; _builder . newLine ( ) ; final java . lang . String actual = this . toPda ( _builder ) ; org . eclipse . xtend2 . lib . StringConcatenation _builder_1 = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder_1 . append ( "R:" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( "start<sp>-><sp>f1=ID" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( "<<F<sp>-><sp>stop" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( ">>F<sp>-><sp>{A.prev=}" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( "f1=ID<sp>-><sp>>>F" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( "f2=ID<sp>-><sp><<F" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( "{A.prev=}<sp>-><sp>f2=ID" ) ; _builder_1 . newLine ( ) ; final java . lang . String expected = _builder_1 . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return com . google . common . base . Joiner . on ( "\n" ) . join ( getList ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldReturnNegativeNumber ( ) { int random = dataFactory . getNumberBetween ( Integer . MIN_VALUE , ( - 1 ) ) ; "<AssertPlaceHolder>" ; } getNumberBetween ( int , int ) { if ( max < min ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "Minimum<sp>must<sp>be<sp>less<sp>than<sp>minimum<sp>(min=%d,<sp>max=%d)" , min , max ) ) ; } if ( max == min ) { return min ; } return min + ( random . nextInt ( ( max - min ) ) ) ; }
org . junit . Assert . assertTrue ( ( random < 0 ) )
testGetConfigDataTwiceYieldsSameObj ( ) { final com . palominolabs . crm . sf . soap . BindingConfig data = this . bundle . getBindingConfig ( ) ; "<AssertPlaceHolder>" ; } getBindingConfig ( ) { return this . bindingConfig ; }
org . junit . Assert . assertSame ( data , this . bundle . getBindingConfig ( ) )
shouldSelectAClassByItself ( ) { com . facebook . buck . test . selectors . TestDescription description = new com . facebook . buck . test . selectors . TestDescription ( "com.example.clown.Car" , null ) ; com . facebook . buck . test . selectors . TestSelector selector = com . facebook . buck . test . selectors . PatternTestSelector . buildFromSelectorString ( "com.example.clown.Car" ) ; "<AssertPlaceHolder>" ; } matches ( com . facebook . buck . test . selectors . TestDescription ) { return ( matchesClassName ( description . getClassName ( ) ) ) && ( matchesMethodName ( description . getMethodName ( ) ) ) ; }
org . junit . Assert . assertTrue ( selector . matches ( description ) )
expectGram ( ) { double [ ] probabilities = com . optimaize . langdetect . NgramFrequencyDataTest . allThreeGrams . getProbabilities ( "dam" ) ; assert probabilities != null ; "<AssertPlaceHolder>" ; } getLanguageList ( ) { return langlist ; }
org . junit . Assert . assertTrue ( ( ( ( probabilities . length ) >= 5 ) && ( ( probabilities . length ) <= ( com . optimaize . langdetect . NgramFrequencyDataTest . allThreeGrams . getLanguageList ( ) . size ( ) ) ) ) )
iteratesStreamEventsFromStartToEndWithSmallBatchSize ( ) { final java . lang . String stream = generateStreamName ( ) ; eventstore . appendToStream ( stream , ExpectedVersion . NO_STREAM , newTestEvents ( 10 ) ) . join ( ) ; java . util . Iterator < com . github . msemys . esjc . ResolvedEvent > iterator = eventstore . iterateStreamEventsForward ( stream , StreamPosition . START , 2 , false ) ; "<AssertPlaceHolder>" ; } hasSize ( int ) { return new com . github . msemys . esjc . matcher . IteratorSizeMatcher ( size ) ; }
org . junit . Assert . assertThat ( iterator , hasSize ( 10 ) )
testURI ( ) { java . net . URI baseURI = java . net . URI . create ( "https://go.urbanairship.com" ) ; java . net . URI expectedUri = java . net . URI . create ( ( "https://go.urbanairship.com" + ( com . urbanairship . api . staticlists . StaticListDeleteRequestTest . STATIC_LIST_DELETE_PATH ) ) ) ; "<AssertPlaceHolder>" ; } getUri ( java . net . URI ) { java . net . URI uri ; org . apache . http . client . utils . URIBuilder builder = new org . apache . http . client . utils . URIBuilder ( com . urbanairship . api . client . RequestUtils . resolveURI ( baseUri , path ) ) ; if ( ! ( nextPageRequest ) ) { com . google . common . base . Preconditions . checkNotNull ( start , "start<sp>cannot<sp>be<sp>null" ) ; com . google . common . base . Preconditions . checkNotNull ( end , "end<sp>cannot<sp>be<sp>null" ) ; com . google . common . base . Preconditions . checkNotNull ( precision , "precision<sp>cannot<sp>be<sp>null" ) ; com . google . common . base . Preconditions . checkArgument ( end . isAfter ( start ) , "end<sp>date<sp>must<sp>occur<sp>after<sp>start<sp>date" ) ; builder . addParameter ( "start" , this . start . toString ( DateFormats . DATE_FORMATTER ) ) ; builder . addParameter ( "end" , this . end . toString ( DateFormats . DATE_FORMATTER ) ) ; builder . addParameter ( "precision" , this . precision . toString ( ) ) ; } try { uri = builder . build ( ) ; } catch ( java . net . URISyntaxException e ) { throw new java . lang . RuntimeException ( e ) ; } return uri ; }
org . junit . Assert . assertEquals ( request . getUri ( baseURI ) , expectedUri )
testGetAllKnownProductIds ( ) { this . setupDBForProductIdTests ( ) ; java . util . Set < java . lang . String > expected = new java . util . HashSet ( ) ; expected . add ( "dpp-a-1" 5 ) ; expected . add ( "p2" ) ; expected . add ( "dp1" ) ; expected . add ( "dp2" ) ; expected . add ( "pp-a-0" ) ; expected . add ( "dpp-a-1" 1 ) ; expected . add ( "dpp-a-1" 0 ) ; expected . add ( "pp-b-0" ) ; expected . add ( "dpp-a-1" 3 ) ; expected . add ( "dpp-a-1" 2 ) ; expected . add ( "dpp-a-1" 4 ) ; expected . add ( "dpp-a-1" ) ; expected . add ( "dpp-a-2" ) ; expected . add ( "dpp-b-0" ) ; expected . add ( "dpp-b-1" ) ; expected . add ( "dpp-b-2" ) ; expected . add ( product . getId ( ) ) ; expected . add ( providedProduct . getId ( ) ) ; expected . add ( derivedProduct . getId ( ) ) ; expected . add ( derivedProvidedProduct . getId ( ) ) ; java . util . Set < java . lang . String > result = this . poolCurator . getAllKnownProductIds ( ) ; "<AssertPlaceHolder>" ; } getAllKnownProductIds ( ) { java . util . Set < java . lang . String > result = new java . util . HashSet ( ) ; org . hibernate . query . Query query = this . currentSession ( ) . createQuery ( ( "SELECT<sp>DISTINCT<sp>P.product.id<sp>" + ( "FROM<sp>Pool<sp>P<sp>" + "WHERE<sp>NULLIF(P.product.id,<sp>'')<sp>IS<sp>NOT<sp>NULL" ) ) ) ; result . addAll ( query . list ( ) ) ; query = this . currentSession ( ) . createQuery ( ( "SELECT<sp>DISTINCT<sp>P.derivedProduct.id<sp>" + ( "FROM<sp>Pool<sp>P<sp>" + "WHERE<sp>NULLIF(P.derivedProduct.id,<sp>'')<sp>IS<sp>NOT<sp>NULL" ) ) ) ; result . addAll ( query . list ( ) ) ; query = this . currentSession ( ) . createQuery ( ( "SELECT<sp>DISTINCT<sp>PP.id<sp>" + ( "FROM<sp>Pool<sp>P<sp>INNER<sp>JOIN<sp>P.providedProducts<sp>AS<sp>PP<sp>" + "WHERE<sp>NULLIF(PP.id,<sp>'')<sp>IS<sp>NOT<sp>NULL" ) ) ) ; result . addAll ( query . list ( ) ) ; query = this . currentSession ( ) . createQuery ( ( "FROM<sp>Pool<sp>P<sp>" 0 + ( "FROM<sp>Pool<sp>P<sp>INNER<sp>JOIN<sp>P.derivedProvidedProducts<sp>AS<sp>DPP<sp>" + "WHERE<sp>NULLIF(DPP.id,<sp>'')<sp>IS<sp>NOT<sp>NULL" ) ) ) ; result . addAll ( query . list ( ) ) ; return result ; }
org . junit . Assert . assertEquals ( expected , result )
default_filter_does_not_allow_seeded_requests ( ) { com . flextrade . jfixture . utility . RequestFilter filter = com . flextrade . jfixture . utility . RequestFilter . onlyDefault ( ) ; boolean allow = filter . allow ( new com . flextrade . jfixture . requests . SeededRequest ( null , null ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertFalse ( allow )
expected_collection_and_database_collection_with_same_content_should_be_equals ( ) { addCollectionWithData ( getMongoDB ( ) , "col1" , "name" , "Alex" ) ; boolean isEquals = com . lordofthejars . nosqlunit . mongodb . integration . WhenExpectedDataShouldBeCompared . mongoOperation . databaseIs ( new java . io . ByteArrayInputStream ( "{\"col1\":[{\"name\":\"Alex\"}]}" . getBytes ( "UTF-8" ) ) ) ; "<AssertPlaceHolder>" ; } databaseIs ( java . io . InputStream ) { return compareData ( contentStream ) ; }
org . junit . Assert . assertThat ( isEquals , org . hamcrest . CoreMatchers . is ( true ) )
whenOneCapIsLessThanAnother_itShouldReturnCorrectBoolean_v3 ( ) { com . graphhopper . jsprit . core . problem . Capacity cap1 = Capacity . Builder . newInstance ( ) . addDimension ( 0 , 2 ) . addDimension ( 1 , 3 ) . addDimension ( 2 , 4 ) . build ( ) ; com . graphhopper . jsprit . core . problem . Capacity cap2 = Capacity . Builder . newInstance ( ) . addDimension ( 0 , 2 ) . addDimension ( 1 , 3 ) . addDimension ( 2 , 4 ) . build ( ) ; "<AssertPlaceHolder>" ; } isLessOrEqual ( com . graphhopper . jsprit . core . problem . Capacity ) { if ( toCompare == null ) throw new java . lang . NullPointerException ( ) ; for ( int i = 0 ; i < ( this . getNuOfDimensions ( ) ) ; i ++ ) { if ( ( this . get ( i ) ) > ( toCompare . get ( i ) ) ) return false ; } return true ; }
org . junit . Assert . assertTrue ( cap1 . isLessOrEqual ( cap2 ) )
testHashcode ( ) { "<AssertPlaceHolder>" ; } generateFieldsSet ( ) { java . util . Set < io . cdap . cdap . spi . data . table . field . Field < ? > > fields = new java . util . HashSet ( ) ; fields . add ( io . cdap . cdap . spi . data . table . field . Fields . bytesField ( "bytes" , io . cdap . cdap . api . common . Bytes . toBytes ( "bytesval" ) ) ) ; fields . add ( io . cdap . cdap . spi . data . table . field . Fields . stringField ( "string" , "strval" ) ) ; fields . add ( io . cdap . cdap . spi . data . table . field . Fields . doubleField ( "double" , 100.0 ) ) ; fields . add ( io . cdap . cdap . spi . data . table . field . Fields . intField ( "int" , 30 ) ) ; fields . add ( io . cdap . cdap . spi . data . table . field . Fields . bytesField ( "double-bytes" , io . cdap . cdap . api . common . Bytes . toBytes ( 100.0 ) ) ) ; fields . add ( io . cdap . cdap . spi . data . table . field . Fields . bytesField ( "long-bytes" , io . cdap . cdap . api . common . Bytes . toBytes ( 600L ) ) ) ; return fields ; }
org . junit . Assert . assertEquals ( generateFieldsSet ( ) , generateFieldsSet ( ) )
shouldNotValidateInstallmentScheduleForValidTotalAmount ( ) { org . mifos . accounts . loan . util . helpers . RepaymentScheduleInstallment installment = installmentBuilder . withInstallment ( 3 ) . withDueDate ( "30-Nov-2010" ) . withPrincipal ( new org . mifos . framework . util . helpers . Money ( rupeeCurrency , "499.9" ) ) . withInterest ( new org . mifos . framework . util . helpers . Money ( rupeeCurrency , "22.1" ) ) . withFees ( new org . mifos . framework . util . helpers . Money ( rupeeCurrency , "0.0" ) ) . withTotal ( "499.9" ) . build ( ) ; java . util . List < org . mifos . platform . validations . ErrorEntry > errorEntries = installmentFormatValidator . validateTotalAmountFormat ( installment ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( org . apache . commons . lang . StringUtils . isBlank ( loanAmount ) ) && ( org . apache . commons . lang . StringUtils . isBlank ( businessActivity ) ) ; }
org . junit . Assert . assertThat ( errorEntries . isEmpty ( ) , org . hamcrest . core . Is . is ( true ) )
testPlain ( ) { org . robolectric . Robolectric . getFakeHttpLayer ( ) . interceptHttpRequests ( false ) ; java . lang . String subpath = "/raw" ; java . lang . String body = "SAO<sp>Nerve<sp>Gear" ; stubFor ( get ( urlEqualTo ( subpath ) ) . willReturn ( aResponse ( ) . withBody ( body ) ) ) ; java . lang . String responseContent = deserializerEndpoint . plain ( ) ; verify ( getRequestedFor ( urlEqualTo ( subpath ) ) ) ; "<AssertPlaceHolder>" ; } get ( org . apache . http . HttpEntity ) { if ( entity == null ) { return null ; } org . apache . http . Header header = entity . getContentType ( ) ; if ( header != null ) { org . apache . http . HeaderElement [ ] elements = header . getElements ( ) ; if ( ( elements . length ) > 0 ) { return org . apache . http42 . entity . ContentType . create ( elements [ 0 ] ) ; } } return null ; }
org . junit . Assert . assertEquals ( body , responseContent )
shouldEchoTextFrameWithPayloadLength65535 ( ) { org . kaazing . netx . URLConnectionHelper helper = org . kaazing . netx . URLConnectionHelper . newInstance ( ) ; java . net . URI location = java . net . URI . create ( "ws://localhost:8080/path" ) ; org . kaazing . netx . ws . WsURLConnection connection = ( ( org . kaazing . netx . ws . WsURLConnection ) ( helper . openConnection ( location ) ) ) ; connection . setMaxFramePayloadLength ( 65536 ) ; java . io . Writer writer = connection . getWriter ( ) ; java . io . Reader reader = connection . getReader ( ) ; java . lang . String writeString = new org . kaazing . netx . ws . specification . BaseFramingIT . RandomString ( 65535 ) . nextString ( ) ; writer . write ( writeString . toCharArray ( ) ) ; char [ ] cbuf = new char [ writeString . toCharArray ( ) . length ] ; int offset = 0 ; int length = cbuf . length ; int charsRead = 0 ; while ( ( charsRead != ( - 1 ) ) && ( length > 0 ) ) { charsRead = reader . read ( cbuf , offset , length ) ; if ( charsRead != ( - 1 ) ) { offset += charsRead ; length -= charsRead ; } } java . lang . String readString = java . lang . String . valueOf ( cbuf ) ; k3po . finish ( ) ; "<AssertPlaceHolder>" ; } read ( char [ ] , int , int ) { if ( ( ( offset < 0 ) || ( ( offset + length ) > ( cbuf . length ) ) ) || ( length < 0 ) ) { int len = offset + length ; throw new java . lang . IndexOutOfBoundsException ( java . lang . String . format ( org . kaazing . netx . ws . internal . io . WsReader . MSG_INDEX_OUT_OF_BOUNDS , offset , len , cbuf . length ) ) ; } if ( stateLock . tryLock ( ) ) { try { if ( ( applicationBufferReadOffset ) < ( applicationBufferWriteOffset ) ) { return copyCharsFromApplicationBuffer ( cbuf , offset , length ) ; } if ( ( applicationBufferReadOffset ) == ( applicationBufferWriteOffset ) ) { applicationBufferReadOffset = 0 ; applicationBufferWriteOffset = 0 ; } if ( ( networkBufferWriteOffset ) > ( networkBufferReadOffset ) ) { int leftOverBytes = ( networkBufferWriteOffset ) - ( networkBufferReadOffset ) ; java . lang . System . arraycopy ( networkBuffer , networkBufferReadOffset , networkBuffer , 0 , leftOverBytes ) ; networkBufferReadOffset = 0 ; networkBufferWriteOffset = leftOverBytes ; } while ( true ) { if ( ( networkBufferReadOffset ) == ( networkBufferWriteOffset ) ) { networkBufferReadOffset = 0 ; networkBufferWriteOffset = 0 ; int remainingLength = ( networkBuffer . length ) - ( networkBufferWriteOffset ) ; int bytesRead = 0 ; try { bytesRead = in . read ( networkBuffer , networkBufferWriteOffset , remainingLength ) ; if ( bytesRead == ( - 1 ) ) { return - 1 ; } } catch ( java . net . SocketException ex ) { return - 1 ; } networkBufferReadOffset = 0 ; networkBufferWriteOffset = bytesRead ; } int numBytes = ensureFrameMetadata ( ) ; if ( numBytes == ( - 1 ) ) { return - 1 ; } incomingFrame . wrap ( heapBuffer , networkBufferReadOffset ) ; int payloadLength = incomingFrame . payloadLength ( ) ; if ( ( ( incomingFrame . offset ( ) ) + payloadLength ) > ( networkBufferWriteOffset ) ) { if ( payloadLength > ( networkBuffer . length ) ) { int maxPayloadLength = connection . getMaxFramePayloadLength ( ) ; throw new java . io . IOException ( java . lang . String . format ( org . kaazing . netx . ws . internal . io . WsReader . MSG_MAX_MESSAGE_LENGTH , payloadLength , maxPayloadLength ) ) ; } else { if ( ( ( incomingFrame . offset ( ) ) + payloadLength ) > ( networkBuffer . length ) ) { int len = ( networkBufferWriteOffset ) - ( networkBufferReadOffset ) ; java . lang . System . arraycopy ( networkBuffer , networkBufferReadOffset , networkBuffer , 0 , len ) ; networkBufferReadOffset = 0 ; networkBufferWriteOffset = len ; } } int frameLength = connection . getFrameLength ( false , payloadLength ) ; int remainingBytes = ( ( networkBufferReadOffset ) + frameLength ) - ( networkBufferWriteOffset ) ; while ( remainingBytes > 0 ) { int bytesRead = in . read ( networkBuffer , networkBufferWriteOffset , remainingBytes ) ; if ( bytesRead == ( - 1 ) ) { return - 1 ; } remainingBytes -= bytesRead ; networkBufferWriteOffset += bytesRead ; } incomingFrame . wrap ( heapBuffer , networkBufferReadOffset ) ; } validateOpcode ( ) ; org . kaazing . netx . ws . internal . DefaultWebSocketContext context = connection . getIncomingContext ( ) ; org . kaazing . netx . ws . internal . io . IncomingSentinelExtension sentinel = ( ( org . kaazing . netx . ws . internal . io . IncomingSentinelExtension ) ( context . getSentinelExtension ( ) ) ) ; sentinel . setTerminalConsumer ( terminalFrameConsumer , incomingFrame . opcode ( ) ) ; connection . processIncomingFrame ( incomingFrameRO . wrap ( heapBufferRO , networkBufferReadOffset ) ) ; networkBufferReadOffset += incomingFrame . length ( ) ; if ( ! ( isControlFrame ( ) ) ) { break ; } } assert ( applicationBufferReadOffset ) < ( applicationBufferWriteOffset ) ; return copyCharsFromApplicationBuffer ( cbuf , offset , length ) ; } finally { stateLock . unlock ( ) ; } } return 0 ; }
org . junit . Assert . assertEquals ( writeString , readString )
testIsPurposeFor_g1 ( ) { java . util . HashMap < java . lang . String , java . lang . Object > tokenVals = new java . util . HashMap ( ) ; tokenVals . put ( SamlConstants . TARGET_API_LEVEL , NhincConstants . GATEWAY_API_LEVEL . LEVEL_g1 ) ; tokenVals . put ( NhincConstants . WS_SOAP_TARGET_HOME_COMMUNITY_ID , "1.1" ) ; tokenVals . put ( SamlConstants . ACTION_PROP , NhincConstants . PATIENT_DISCOVERY_SERVICE_NAME ) ; gov . hhs . fha . nhinc . callback . opensaml . CallbackProperties properties = new gov . hhs . fha . nhinc . callback . opensaml . CallbackMapProperties ( tokenVals ) ; gov . hhs . fha . nhinc . callback . PurposeOfForDecider decider = new gov . hhs . fha . nhinc . callback . PurposeOfForDecider ( ) ; "<AssertPlaceHolder>" ; } isPurposeFor ( gov . hhs . fha . nhinc . callback . opensaml . CallbackProperties ) { gov . hhs . fha . nhinc . nhinclib . NhincConstants . NHIN_SERVICE_NAMES serviceName ; boolean purposeFor = false ; java . lang . String action = properties . getAction ( ) ; serviceName = gov . hhs . fha . nhinc . nhinclib . NhincConstants . NHIN_SERVICE_NAMES . fromValueString ( action ) ; if ( null == serviceName ) { gov . hhs . fha . nhinc . callback . PurposeOfForDecider . LOG . warn ( "Could<sp>not<sp>read<sp>purpose<sp>of<sp>/<sp>for<sp>action:<sp>service<sp>name<sp>is<sp>null<sp>for<sp>action<sp>{}" , action ) ; return purposeFor ; } gov . hhs . fha . nhinc . nhinclib . NhincConstants . GATEWAY_API_LEVEL apiLevel = properties . getTargetApiLevel ( ) ; java . lang . String hcid = properties . getTargetHomeCommunityId ( ) ; if ( hcid . startsWith ( NhincConstants . HCID_PREFIX ) ) { hcid = hcid . replace ( NhincConstants . HCID_PREFIX , "" ) ; } if ( ( apiLevel == null ) && ( hcid != null ) ) { gov . hhs . fha . nhinc . connectmgr . NhinEndpointManager nem = getNhinEndpointManager ( ) ; apiLevel = nem . getApiVersion ( hcid , serviceName ) ; } if ( ( gov . hhs . fha . nhinc . nhinclib . NhincConstants . GATEWAY_API_LEVEL . LEVEL_g0 ) == apiLevel ) { gov . hhs . fha . nhinc . callback . purposeuse . PurposeUseProxy purposeUse = getPurposeUseProxyObjectFactory ( ) ; purposeFor = purposeUse . isPurposeForUseEnabled ( properties ) ; } if ( gov . hhs . fha . nhinc . callback . PurposeOfForDecider . LOG . isDebugEnabled ( ) ) { logPurposeDecision ( purposeFor , hcid , serviceName . getUDDIServiceName ( ) ) ; } return purposeFor ; }
org . junit . Assert . assertTrue ( ( ! ( decider . isPurposeFor ( properties ) ) ) )
testOffsettedFileChannel ( ) { java . lang . String fileName = "target/var/neostore.nodestore.db" ; org . neo4j . kernel . impl . AbstractNeo4jTestCase . deleteFileOrDirectory ( fileName ) ; org . neo4j . kernel . impl . nioneo . store . FileSystemAbstraction offsettedFileSystem = new org . neo4j . kernel . impl . core . JumpingFileSystemAbstraction ( 10 ) ; org . neo4j . kernel . impl . nioneo . store . IdGenerator idGenerator = new org . neo4j . kernel . impl . core . JumpingIdGeneratorFactory ( 10 ) . get ( IdType . NODE ) ; org . neo4j . kernel . impl . core . JumpingFileSystemAbstraction . JumpingFileChannel channel = ( ( org . neo4j . kernel . impl . core . JumpingFileSystemAbstraction . JumpingFileChannel ) ( offsettedFileSystem . open ( fileName , "rw" ) ) ) ; for ( int i = 0 ; i < 16 ; i ++ ) { writeSomethingLikeNodeRecord ( channel , idGenerator . nextId ( ) , i ) ; } channel . close ( ) ; channel = ( ( org . neo4j . kernel . impl . core . JumpingFileSystemAbstraction . JumpingFileChannel ) ( offsettedFileSystem . open ( fileName , "rw" ) ) ) ; idGenerator = new org . neo4j . kernel . impl . core . JumpingIdGeneratorFactory ( 10 ) . get ( IdType . NODE ) ; for ( int i = 0 ; i < 16 ; i ++ ) { "<AssertPlaceHolder>" ; } channel . close ( ) ; } readSomethingLikeNodeRecord ( org . neo4j . kernel . impl . core . JumpingFileSystemAbstraction . JumpingFileChannel , long ) { java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 9 ) ; channel . position ( ( id * 9 ) ) ; channel . read ( buffer ) ; buffer . flip ( ) ; buffer . getLong ( ) ; return buffer . get ( ) ; }
org . junit . Assert . assertEquals ( i , readSomethingLikeNodeRecord ( channel , idGenerator . nextId ( ) ) )
testEquals3 ( ) { org . jfree . data . time . TimeSeries s1 = new org . jfree . data . time . TimeSeries ( "Series" , org . jfree . data . time . Day . class ) ; org . jfree . data . time . TimeSeries s2 = new org . jfree . data . time . TimeSeries ( "Series" , org . jfree . data . time . Month . class ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof org . jfree . base . modules . PackageState ) ) { return false ; } final org . jfree . base . modules . PackageState packageState = ( ( org . jfree . base . modules . PackageState ) ( o ) ) ; if ( ! ( this . module . getModuleClass ( ) . equals ( packageState . module . getModuleClass ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( s1 . equals ( s2 ) )
shouldReturnSameList ( ) { java . util . Set < java . lang . Integer > set = new java . util . HashSet ( java . util . Arrays . asList ( 123 , 456 , 789 , 12 , 3 , 45 , 66 , 78 ) ) ; java . lang . Class < ? > rawType = java . util . Set . class ; java . lang . Object result = ch . jalu . injector . utils . ReflectionUtils . toSuitableCollectionType ( rawType , set ) ; "<AssertPlaceHolder>" ; } toSuitableCollectionType ( java . lang . Class , java . util . Set ) { if ( rawType . isArray ( ) ) { @ ch . jalu . injector . utils . SuppressWarnings ( "unchecked" ) java . lang . Class < T [ ] > arrayClass = ( ( java . lang . Class < T [ ] > ) ( rawType ) ) ; return java . util . Arrays . copyOf ( result . toArray ( ) , result . size ( ) , arrayClass ) ; } else if ( rawType . isAssignableFrom ( java . util . Set . class ) ) { return result ; } else if ( rawType . isAssignableFrom ( java . util . List . class ) ) { return new java . util . ArrayList ( result ) ; } throw new ch . jalu . injector . exceptions . InjectorException ( ( ( ( "Cannot<sp>convert<sp>@AllTypes<sp>result<sp>to<sp>'" + rawType ) + "'.<sp>" ) + "Supported:<sp>Set,<sp>List,<sp>or<sp>any<sp>supertype<sp>thereof,<sp>and<sp>array" ) ) ; }
org . junit . Assert . assertThat ( ( result == set ) , org . hamcrest . Matchers . equalTo ( true ) )
testSetICode_String ( ) { org . openscience . cdk . interfaces . IPDBMonomer monomer = ( ( org . openscience . cdk . interfaces . IPDBMonomer ) ( newChemObject ( ) ) ) ; monomer . setICode ( null ) ; "<AssertPlaceHolder>" ; } getICode ( ) { return iCode ; }
org . junit . Assert . assertNull ( monomer . getICode ( ) )
testIsUserWritable ( ) { "<AssertPlaceHolder>" ; } isWriteable ( java . lang . Class , java . lang . reflect . Type , java . lang . annotation . Annotation [ ] , javax . ws . rs . core . MediaType ) { if ( ! ( java . util . List . class . isAssignableFrom ( type ) ) ) { return false ; } if ( genericType instanceof java . lang . reflect . ParameterizedType ) { java . lang . reflect . Type [ ] arguments = ( ( java . lang . reflect . ParameterizedType ) ( genericType ) ) . getActualTypeArguments ( ) ; return ( ( arguments . length ) == 1 ) && ( arguments [ 0 ] . equals ( svanimpe . reminders . domain . Reminder . class ) ) ; } else { return false ; } }
org . junit . Assert . assertTrue ( writer . isWriteable ( svanimpe . reminders . domain . User . class , null , null , null ) )
testFlowWithUnreachableSteps ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/unreachable_steps.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . fromFile ( resource ) ) ; "<AssertPlaceHolder>" ; exception . expect ( io . cloudslang . lang . compiler . RuntimeException . class ) ; exception . expectMessage ( "Step<sp>'print_message2'<sp>is<sp>unreachable." ) ; throw result . getErrors ( ) . get ( 0 ) ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) )
testCreateGroupFromIdPrincipalAndPath ( ) { java . security . Principal principal = new org . apache . jackrabbit . oak . spi . security . principal . PrincipalImpl ( "g" ) ; autosaveMgr . createGroup ( "g" , principal , "rel/path" ) ; "<AssertPlaceHolder>" ; verify ( mgrDlg , times ( 1 ) ) . createGroup ( "g" , principal , "rel/path" ) ; verify ( autosaveMgr , times ( 1 ) ) . autosave ( ) ; } hasPendingChanges ( ) { return base . hasPendingChanges ( ) ; }
org . junit . Assert . assertFalse ( root . hasPendingChanges ( ) )
onSave_shouldReturnTrueIfDateCreatedWasNull ( ) { org . openmrs . api . db . hibernate . AuditableInterceptor interceptor = new org . openmrs . api . db . hibernate . AuditableInterceptor ( ) ; org . openmrs . User u = new org . openmrs . User ( ) ; java . lang . String [ ] propertyNames = new java . lang . String [ ] { "creator" , "dateCreated" } ; java . lang . Object [ ] currentState = new java . lang . Object [ ] { 0 , null } ; boolean result = interceptor . onSave ( u , 0 , currentState , propertyNames , null ) ; "<AssertPlaceHolder>" ; } onSave ( java . lang . Object , java . io . Serializable , java . lang . Object [ ] , java . lang . String [ ] , org . hibernate . type . Type [ ] ) { return removeMillisecondsFromDateFields ( state ) ; }
org . junit . Assert . assertTrue ( result )
testEnumValueOf ( ) { try { org . odftoolkit . simple . TextDocument tdoc = org . odftoolkit . simple . TextDocument . loadDocument ( org . odftoolkit . simple . utils . ResourceUtilities . getAbsolutePath ( "headerFooterHidden.odt" ) ) ; java . lang . String title = "title_name" ; java . lang . String [ ] labels = new java . lang . String [ ] { "hello" , "hi" , "hello" 0 } ; java . lang . String [ ] legends = new java . lang . String [ ] { "hello1" , "hi1" , "odf1" } ; double [ ] [ ] data = new double [ ] [ ] { new double [ ] { 1.11 , 43.23 } , new double [ ] { 3.22 , 4.0 , 5.43 } , new double [ ] { 121.99 , 123.1 , 423.0 } } ; org . odftoolkit . simple . chart . DataSet dataset = new org . odftoolkit . simple . chart . DataSet ( labels , legends , data ) ; java . awt . Rectangle rect = new java . awt . Rectangle ( ) ; org . odftoolkit . simple . chart . Chart chart = tdoc . createChart ( title , dataset , rect ) ; chart . setChartType ( ChartType . AREA ) ; java . lang . String ctype = chart . getChartType ( ) . toString ( ) ; org . odftoolkit . simple . chart . ChartType chartType = org . odftoolkit . simple . chart . ChartType . enumValueOf ( ctype ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { java . util . logging . Logger . getLogger ( org . odftoolkit . simple . chart . ChartTypeTest . class . getName ( ) ) . log ( Level . SEVERE , null , e ) ; org . junit . Assert . fail ( ( ( ( ( "Failed<sp>with<sp>" + ( e . getClass ( ) . getName ( ) ) ) + ":<sp>'" ) + ( e . getMessage ( ) ) ) + "'" ) ) ; } } enumValueOf ( java . lang . String ) { for ( org . odftoolkit . simple . chart . ChartType aIter : org . odftoolkit . simple . chart . ChartType . values ( ) ) { if ( mString . equals ( aIter . toString ( ) ) ) { return aIter ; } } return null ; }
org . junit . Assert . assertEquals ( chartType , ChartType . AREA )
testGetNextDpdkPortExistingDpdkPorts ( ) { org . mockito . Mockito . when ( com . cloud . utils . script . Script . runSimpleBashScript ( org . mockito . Matchers . anyString ( ) ) ) . thenReturn ( ( ( OvsVifDriver . DPDK_PORT_PREFIX ) + ( java . lang . String . valueOf ( com . cloud . hypervisor . kvm . resource . OvsVifDriverTest . dpdkPortNumber ) ) ) ) ; java . lang . String expectedPortName = ( OvsVifDriver . DPDK_PORT_PREFIX ) + ( java . lang . String . valueOf ( ( ( com . cloud . hypervisor . kvm . resource . OvsVifDriverTest . dpdkPortNumber ) + 1 ) ) ) ; "<AssertPlaceHolder>" ; } getNextDpdkPort ( ) { int portNumber = getDpdkLatestPortNumberUsed ( ) ; return ( com . cloud . hypervisor . kvm . resource . OvsVifDriver . DPDK_PORT_PREFIX ) + ( java . lang . String . valueOf ( ( portNumber + 1 ) ) ) ; }
org . junit . Assert . assertEquals ( expectedPortName , driver . getNextDpdkPort ( ) )
testHasConditionAndBackwards ( ) { ca . uhn . fhir . jpa . dao . r4 . Patient patient = new ca . uhn . fhir . jpa . dao . r4 . Patient ( ) ; java . lang . String patientId = myPatientDao . create ( patient ) . getId ( ) . toUnqualifiedVersionless ( ) . getValue ( ) ; ca . uhn . fhir . jpa . dao . r4 . Condition conditionS = new ca . uhn . fhir . jpa . dao . r4 . Condition ( ) ; conditionS . getCode ( ) . addCoding ( ) . setSystem ( "http://snomed.info/sct" ) . setCode ( "55822004" ) ; conditionS . getSubject ( ) . setReference ( patientId ) ; myConditionDao . create ( conditionS ) ; ca . uhn . fhir . jpa . dao . r4 . Condition conditionA = new ca . uhn . fhir . jpa . dao . r4 . Condition ( ) ; conditionA . getCode ( ) . addCoding ( ) . setSystem ( "http://snomed.info/sct" ) . setCode ( "55822005" ) ; conditionA . getAsserter ( ) . setReference ( patientId ) ; myConditionDao . create ( conditionA ) ; java . lang . String criteria = "_has:Condition:subject:code=http://snomed.info/sct|55822003,http://snomed.info/sct|55822005&" + "_has:Condition:asserter:code=http://snomed.info/sct|55822003,http://snomed.info/sct|55822004" ; ca . uhn . fhir . jpa . searchparam . SearchParameterMap map = myMatchUrlService . translateMatchUrl ( criteria , myFhirCtx . getResourceDefinition ( ca . uhn . fhir . jpa . dao . r4 . Patient . class ) ) ; map . setLoadSynchronous ( true ) ; ca . uhn . fhir . rest . api . server . IBundleProvider results = myPatientDao . search ( map ) ; ca . uhn . fhir . jpa . dao . r4 . List < java . lang . String > ids = toUnqualifiedVersionlessIdValues ( results ) ; "<AssertPlaceHolder>" ; } size ( ) { return myTagSet . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , ids . size ( ) )
testFromCommonsLang ( ) { final fr . inria . testrunner . ClassWithVisibility style = new fr . inria . testrunner . ClassWithVisibility ( ) ; style . setSummaryObjectStartText ( null ) ; "<AssertPlaceHolder>" ; } getSummaryObjectStartText ( ) { return summaryObjectStartText ; }
org . junit . Assert . assertEquals ( "" , style . getSummaryObjectStartText ( ) )
testExtractDayDate ( ) { java . lang . String sqlText = ( "select<sp>d,<sp>EXTRACT(DAY<sp>FROM<sp>d)<sp>as<sp>\"DAY\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>d" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ) { java . lang . String expected = "D<sp>|<sp>DAY<sp>|\n" + ( ( ( ( ( ( "------------------\n" + "2009-01-02<sp>|<sp>2<sp>|\n" ) + "2009-07-02<sp>|<sp>2<sp>|\n" ) + "D<sp>|<sp>DAY<sp>|\n" 0 ) + "2012-12-31<sp>|<sp>31<sp>|\n" ) + "2012-12-31<sp>|<sp>31<sp>|\n" ) + "2013-12-31<sp>|<sp>31<sp>|" ) ; "<AssertPlaceHolder>" ; } } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
testOpen ( ) { org . osgi . framework . BundleContext context = mock ( org . osgi . framework . BundleContext . class ) ; when ( context . getProperty ( org . osgi . framework . Constants . FRAMEWORK_UUID ) ) . thenReturn ( "some-uuid" ) ; org . apache . aries . jmx . Logger logger = mock ( org . apache . aries . jmx . Logger . class ) ; org . osgi . framework . Bundle mockSystemBundle = mock ( org . osgi . framework . Bundle . class ) ; when ( mockSystemBundle . getSymbolicName ( ) ) . thenReturn ( "the.sytem.bundle" ) ; when ( context . getBundle ( 0 ) ) . thenReturn ( mockSystemBundle ) ; org . apache . aries . jmx . agent . JMXAgent agent = mock ( org . apache . aries . jmx . agent . JMXAgent . class ) ; org . apache . aries . jmx . agent . JMXAgentContext agentContext = new org . apache . aries . jmx . agent . JMXAgentContext ( context , agent , logger ) ; org . apache . aries . jmx . framework . ServiceStateMBeanHandler handler = new org . apache . aries . jmx . framework . ServiceStateMBeanHandler ( agentContext , new org . apache . aries . jmx . framework . StateConfig ( ) ) ; handler . open ( ) ; "<AssertPlaceHolder>" ; } getMbean ( ) { return mbean ; }
org . junit . Assert . assertNotNull ( handler . getMbean ( ) )
testNietLeverenObvAfnemerindicatiefilter ( ) { final nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst persoonA = nl . bzk . brp . domain . leveringmodel . helper . TestBuilders . maakPersoonMetHandelingen ( 1 ) ; final nl . bzk . brp . domain . algemeen . Autorisatiebundel autorisatiebundel = maakAutorisatiebundel ( ) ; final java . util . HashMap < nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst , nl . bzk . brp . domain . algemeen . Populatie > mogelijkTeLeverenPersonen = com . google . common . collect . Maps . newHashMap ( ) ; final nl . bzk . brp . domain . algemeen . Populatie populatie = nl . bzk . brp . domain . algemeen . Populatie . BUITEN ; mogelijkTeLeverenPersonen . put ( persoonA , populatie ) ; org . mockito . Mockito . when ( persoonPopulatieFilter . magLeveren ( persoonA , populatie , autorisatiebundel ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( persoonAfnemerindicatieFilter . magLeveren ( persoonA , populatie , autorisatiebundel ) ) . thenReturn ( false ) ; final java . util . Set < nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst > set = service . bepaalTeLeverenPersonen ( autorisatiebundel , mogelijkTeLeverenPersonen ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( persoonPopulatieFilter , org . mockito . Mockito . only ( ) ) . magLeveren ( persoonA , populatie , autorisatiebundel ) ; org . mockito . Mockito . verify ( persoonAfnemerindicatieFilter , org . mockito . Mockito . only ( ) ) . magLeveren ( persoonA , populatie , autorisatiebundel ) ; org . mockito . Mockito . verify ( persoonAttenderingFilter , org . mockito . Mockito . never ( ) ) . magLeveren ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . any ( ) , org . mockito . Mockito . any ( ) ) ; } contains ( java . lang . Object ) { return geefEerste ( ) . contains ( o ) ; }
org . junit . Assert . assertFalse ( set . contains ( persoonA ) )
flipTestBigA ( ) { final int numCases = 1000 ; final java . util . BitSet bs = new java . util . BitSet ( ) ; final java . util . Random r = new java . util . Random ( 3333 ) ; int checkTime = 2 ; org . roaringbitmap . RoaringBitmap rb1 = new org . roaringbitmap . RoaringBitmap ( ) ; org . roaringbitmap . RoaringBitmap rb2 = null ; for ( int i = 0 ; i < numCases ; ++ i ) { final int start = r . nextInt ( ( 65536 * 20 ) ) ; int end = r . nextInt ( ( 65536 * 20 ) ) ; if ( ( r . nextDouble ( ) ) < 0.1 ) { end = start + ( r . nextInt ( 100 ) ) ; } if ( ( i & 1 ) == 0 ) { rb2 = org . roaringbitmap . RoaringBitmap . flip ( rb1 , ( ( long ) ( start ) ) , ( ( long ) ( end ) ) ) ; long r1 = r . nextInt ( ( 65536 * 20 ) ) ; long r2 = r . nextInt ( ( 65536 * 20 ) ) ; rb1 . flip ( r1 , r2 ) ; } else { rb1 = org . roaringbitmap . RoaringBitmap . flip ( rb2 , ( ( long ) ( start ) ) , ( ( long ) ( end ) ) ) ; long r1 = r . nextInt ( ( 65536 * 20 ) ) ; long r2 = r . nextInt ( ( 65536 * 20 ) ) ; rb2 . flip ( r1 , r2 ) ; } if ( start < end ) { bs . flip ( start , end ) ; } if ( ( ( r . nextDouble ( ) ) < 0.2 ) && ( ( i & 1 ) == 0 ) ) { final org . roaringbitmap . RoaringBitmap mask = new org . roaringbitmap . RoaringBitmap ( ) ; final java . util . BitSet mask1 = new java . util . BitSet ( ) ; final int startM = r . nextInt ( ( 65536 * 20 ) ) ; final int endM = startM + 100000 ; mask . flip ( ( ( long ) ( startM ) ) , ( ( long ) ( endM ) ) ) ; mask1 . flip ( startM , endM ) ; mask . flip ( 0L , ( ( 65536L * 20 ) + 100000 ) ) ; mask1 . flip ( 0 , ( ( 65536 * 20 ) + 100000 ) ) ; rb2 . and ( mask ) ; bs . and ( mask1 ) ; } if ( i > checkTime ) { final org . roaringbitmap . RoaringBitmap rb = ( ( i & 1 ) == 0 ) ? rb2 : rb1 ; final boolean status = org . roaringbitmap . TestRoaringBitmap . equals ( bs , rb ) ; "<AssertPlaceHolder>" ; checkTime *= 1.5 ; } } } equals ( java . util . BitSet , org . roaringbitmap . RoaringBitmap ) { final int [ ] a = new int [ bs . cardinality ( ) ] ; int pos = 0 ; for ( int x = bs . nextSetBit ( 0 ) ; x >= 0 ; x = bs . nextSetBit ( ( x + 1 ) ) ) { a [ ( pos ++ ) ] = x ; } return java . util . Arrays . equals ( rr . toArray ( ) , a ) ; }
org . junit . Assert . assertTrue ( status )
testGetAllGroups ( ) { java . util . List < com . thinkbiganalytics . datalake . authorization . model . HadoopAuthorizationGroup > groups = rangerAuthorizationService . getAllGroups ( ) ; "<AssertPlaceHolder>" ; } getAllGroups ( ) { java . util . List < com . thinkbiganalytics . datalake . authorization . model . HadoopAuthorizationGroup > sentryHadoopAuthorizationGroups = new java . util . ArrayList ( ) ; com . thinkbiganalytics . datalake . authorization . model . SentryGroup hadoopAuthorizationGroup = new com . thinkbiganalytics . datalake . authorization . model . SentryGroup ( ) ; java . lang . String authorizationSentryGroupFetchType = this . clientConfig . getAuthorizationGroupType ( ) ; if ( "static" . equalsIgnoreCase ( authorizationSentryGroupFetchType ) ) { com . thinkbiganalytics . datalake . authorization . groups . ldap . LdapGroupList ldapGroup = new com . thinkbiganalytics . datalake . authorization . groups . ldap . LdapGroupList ( ) ; sentryHadoopAuthorizationGroups = ldapGroup . getHadoopAuthorizationList ( this . clientConfig , this . ldapTemplate ) ; } return sentryHadoopAuthorizationGroups ; }
org . junit . Assert . assertNotNull ( groups )
testCreate ( ) { org . oscarehr . common . model . ConsultResponseDoc entity = new org . oscarehr . common . model . ConsultResponseDoc ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
org . junit . Assert . assertNotNull ( entity . getId ( ) )
testBasics ( ) { java . io . Reader r = new java . io . StringReader ( "1781<sp>\"hond,<sp>a.u.b.:<sp>bél(len);<sp>\t<sp>[pre]cursor<sp>\t\nzo\'n<sp>\'Hij<sp>zij\'<sp>ex-man<sp>-" ) ; try ( nl . inl . blacklab . analysis . BLDutchAnalyzer analyzer = new nl . inl . blacklab . analysis . BLDutchAnalyzer ( ) ) { try ( org . apache . lucene . analysis . TokenStream ts = analyzer . tokenStream ( "contents" , r ) ) { ts . reset ( ) ; org . apache . lucene . analysis . tokenattributes . CharTermAttribute ta = ts . addAttribute ( org . apache . lucene . analysis . tokenattributes . CharTermAttribute . class ) ; org . junit . Assert . assertTrue ( ts . incrementToken ( ) ) ; org . junit . Assert . assertEquals ( "1781" , new java . lang . String ( ta . buffer ( ) , 0 , ta . length ( ) ) ) ; org . junit . Assert . assertTrue ( ts . incrementToken ( ) ) ; org . junit . Assert . assertEquals ( "hond" , new java . lang . String ( ta . buffer ( ) , 0 , ta . length ( ) ) ) ; org . junit . Assert . assertTrue ( ts . incrementToken ( ) ) ; org . junit . Assert . assertEquals ( "aub" , new java . lang . String ( ta . buffer ( ) , 0 , ta . length ( ) ) ) ; org . junit . Assert . assertTrue ( ts . incrementToken ( ) ) ; org . junit . Assert . assertEquals ( "bellen" , new java . lang . String ( ta . buffer ( ) , 0 , ta . length ( ) ) ) ; org . junit . Assert . assertTrue ( ts . incrementToken ( ) ) ; org . junit . Assert . assertEquals ( "precursor" , new java . lang . String ( ta . buffer ( ) , 0 , ta . length ( ) ) ) ; org . junit . Assert . assertTrue ( ts . incrementToken ( ) ) ; org . junit . Assert . assertEquals ( "zo'n" , new java . lang . String ( ta . buffer ( ) , 0 , ta . length ( ) ) ) ; org . junit . Assert . assertTrue ( ts . incrementToken ( ) ) ; org . junit . Assert . assertEquals ( "hij" , new java . lang . String ( ta . buffer ( ) , 0 , ta . length ( ) ) ) ; org . junit . Assert . assertTrue ( ts . incrementToken ( ) ) ; org . junit . Assert . assertEquals ( "zij" , new java . lang . String ( ta . buffer ( ) , 0 , ta . length ( ) ) ) ; org . junit . Assert . assertTrue ( ts . incrementToken ( ) ) ; org . junit . Assert . assertEquals ( "ex-man" , new java . lang . String ( ta . buffer ( ) , 0 , ta . length ( ) ) ) ; "<AssertPlaceHolder>" ; } } } incrementToken ( ) { if ( iterator . hasNext ( ) ) { java . lang . String term = iterator . next ( ) ; termAttr . copyBuffer ( term . toCharArray ( ) , 0 , term . length ( ) ) ; positionIncrementAttr . setPositionIncrement ( incrementIt . next ( ) ) ; offsetAttr . setOffset ( startCharIt . next ( ) , endCharIt . next ( ) ) ; return true ; } return false ; }
org . junit . Assert . assertFalse ( ts . incrementToken ( ) )
testGetMean ( ) { final double [ ] mu = new double [ ] { - 1.5 , 2 } ; final double [ ] [ ] sigma = new double [ ] [ ] { new double [ ] { 2 , - 1.1 } , new double [ ] { - 1.1 , 2 } } ; final org . apache . commons . math4 . distribution . MultivariateNormalDistribution d = new org . apache . commons . math4 . distribution . MultivariateNormalDistribution ( mu , sigma ) ; final double [ ] m = d . getMeans ( ) ; for ( int i = 0 ; i < ( m . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } getMeans ( ) { return org . apache . commons . math4 . util . MathArrays . copyOf ( means ) ; }
org . junit . Assert . assertEquals ( mu [ i ] , m [ i ] , 0 )
testGetAllNonPrivateMethods ( ) { java . util . List < java . lang . reflect . Method > nonPrivateMethods = org . apache . webbeans . util . ClassUtil . getNonPrivateMethods ( org . apache . webbeans . test . util . SpecificClass . class , false ) ; nonPrivateMethods . removeAll ( java . util . Arrays . asList ( java . lang . Object . class . getDeclaredMethods ( ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return 1 ; }
org . junit . Assert . assertEquals ( 1 , nonPrivateMethods . size ( ) )
getFieldTest ( ) { java . lang . reflect . Field privateField = cn . hutool . core . util . ReflectUtil . getField ( cn . hutool . core . util . ClassUtilTest . TestSubClass . class , "privateField" ) ; "<AssertPlaceHolder>" ; } getField ( java . lang . Class , java . lang . String ) { final java . lang . reflect . Field [ ] fields = cn . hutool . core . util . ReflectUtil . getFields ( beanClass ) ; if ( cn . hutool . core . util . ArrayUtil . isNotEmpty ( fields ) ) { for ( java . lang . reflect . Field field : fields ) { if ( name . equals ( field . getName ( ) ) ) { return field ; } } } return null ; }
org . junit . Assert . assertNotNull ( privateField )
testWriteByteArrayOffsetOutOfBounds ( ) { java . io . OutputStream os = makeObject ( ) ; try { os . write ( new byte [ 5 ] , 5 , 1 ) ; org . junit . Assert . fail ( "Should<sp>not<sp>accept<sp>offset<sp>out<sp>of<sp>bounds" ) ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( ( "Should<sp>not<sp>throw<sp>IOException<sp>offset<sp>out<sp>of<sp>bounds:<sp>" + ( e . getMessage ( ) ) ) ) ; } catch ( java . lang . IndexOutOfBoundsException e ) { "<AssertPlaceHolder>" ; } catch ( java . lang . RuntimeException e ) { org . junit . Assert . fail ( ( ( ( "Should<sp>only<sp>throw<sp>IndexOutOfBoundsException:<sp>" + ( e . getClass ( ) ) ) + ":<sp>" ) + ( e . getMessage ( ) ) ) ) ; } } write ( byte [ ] , int , int ) { out . write ( pBytes , pOffset , pLength ) ; bytesWritten += pLength ; }
org . junit . Assert . assertNotNull ( e )
testCreateCase ( ) { java . util . Random _rand = new java . util . Random ( ) ; java . util . List < java . lang . Long > _tempHitList = new java . util . ArrayList ( ) ; _tempHitList . add ( new java . lang . Long ( 1L ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testInvokePostConstruct ( ) { com . googlecode . mycontainer . jsfprovider . MyContainerInjectionProviderTest . ManagedBean mb = new com . googlecode . mycontainer . jsfprovider . MyContainerInjectionProviderTest . ManagedBean ( ) ; provider . invokePostConstruct ( mb ) ; "<AssertPlaceHolder>" ; } invokePostConstruct ( java . lang . Object ) { java . lang . reflect . Method postConstruct = com . googlecode . mycontainer . jsfprovider . AnnotationUtils . findPostConstruct ( instance ) ; if ( postConstruct != null ) { invokeMethod ( instance , postConstruct ) ; } }
org . junit . Assert . assertTrue ( postConstruct )
read_emptyLine ( ) { byte [ ] emptyCsv = bytes ( "\n\n" ) ; reader = new org . oscm . identityservice . bean . BulkUserImportReader ( emptyCsv ) ; "<AssertPlaceHolder>" ; } iterator ( ) { return new java . util . Iterator < org . oscm . identityservice . bean . BulkUserImportReader . Row > ( ) { java . util . Iterator < org . apache . commons . csv . CSVRecord > i = csvParser . iterator ( ) ; @ org . oscm . identityservice . bean . Override public boolean hasNext ( ) { return i . hasNext ( ) ; } @ org . oscm . identityservice . bean . Override public org . oscm . identityservice . bean . BulkUserImportReader . Row next ( ) { org . apache . commons . csv . CSVRecord record = i . next ( ) ; return new org . oscm . identityservice . bean . BulkUserImportReader . Row ( record ) ; } @ org . oscm . identityservice . bean . Override public void remove ( ) { i . remove ( ) ; } } ; }
org . junit . Assert . assertFalse ( reader . iterator ( ) . hasNext ( ) )
testNoError ( ) { boolean result = checkNoError ( "Social_Communities_Get_My_Communities" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )
robustnessMap ( ) { boolean exceptionCaught = false ; try { new greycat . internal . task . CoreTask ( ) . pipe ( null ) . execute ( _graph , null ) ; } catch ( java . lang . RuntimeException e ) { exceptionCaught = true ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( "Unexpected<sp>exception<sp>thrown" ) ; } "<AssertPlaceHolder>" ; } execute ( greycat . internal . task . Graph , greycat . internal . task . Callback ) { executeWith ( graph , null , callback ) ; }
org . junit . Assert . assertEquals ( true , exceptionCaught )