input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
saleVisaReceivesNetworkTransactionIdentifier ( ) { com . braintreegateway . integrationtest . TransactionRequest request = new com . braintreegateway . integrationtest . TransactionRequest ( ) . amount ( new java . math . BigDecimal ( "10.00" ) ) . creditCard ( ) . number ( CreditCardNumber . VISA . number ) . expirationDate ( "05/2009" ) . done ( ) ; com . braintreegateway . integrationtest . Result < com . braintreegateway . integrationtest . Transaction > result = gateway . transaction ( ) . sale ( request ) ; com . braintreegateway . integrationtest . Transaction transaction = result . getTarget ( ) ; "<AssertPlaceHolder>" ; } getNetworkTransactionId ( ) { return networkTransactionId ; }
org . junit . Assert . assertTrue ( ( ( transaction . getNetworkTransactionId ( ) . length ( ) ) > 0 ) )
fillOpacitySetWithNoneFillRGBA ( ) { com . itextpdf . svg . renderers . impl . AbstractSvgNodeRenderer renderer = new com . itextpdf . svg . renderers . impl . CircleSvgNodeRenderer ( ) ; renderer . setAttribute ( SvgConstants . Attributes . FILL_OPACITY , "0.75" ) ; renderer . setAttribute ( SvgConstants . Attributes . FILL , SvgConstants . Values . NONE ) ; renderer . draw ( sdc ) ; com . itextpdf . kernel . pdf . PdfResources resources = cv . getResources ( ) ; "<AssertPlaceHolder>" ; } getResourceNames ( ) { java . util . Set < com . itextpdf . kernel . pdf . PdfName > names = new java . util . TreeSet ( ) ; for ( com . itextpdf . kernel . pdf . PdfName resType : getPdfObject ( ) . keySet ( ) ) { names . addAll ( getResourceNames ( resType ) ) ; } return names ; }
org . junit . Assert . assertTrue ( resources . getResourceNames ( ) . isEmpty ( ) )
testDefaultTemplate ( ) { org . revapi . reporter . text . TextReporter reporter = new org . revapi . reporter . text . TextReporter ( ) ; org . revapi . Revapi r = new org . revapi . Revapi ( org . revapi . PipelineConfiguration . builder ( ) . withReporters ( org . revapi . reporter . text . TextReporter . class ) . build ( ) ) ; org . revapi . AnalysisContext ctx = org . revapi . AnalysisContext . builder ( r ) . withOldAPI ( org . revapi . API . of ( new org . revapi . simple . FileArchive ( new java . io . File ( "Analysis<sp>results\n" 4 ) ) ) . build ( ) ) . withNewAPI ( org . revapi . API . of ( new org . revapi . simple . FileArchive ( new java . io . File ( "new-dummy.archive" ) ) ) . build ( ) ) . build ( ) ; org . revapi . AnalysisContext reporterCtx = r . prepareAnalysis ( ctx ) . getFirstConfigurationOrNull ( org . revapi . reporter . text . TextReporter . class ) ; reporter . initialize ( reporterCtx ) ; buildReports ( ) . forEach ( reporter :: report ) ; java . io . StringWriter out = new java . io . StringWriter ( ) ; java . io . PrintWriter wrt = new java . io . PrintWriter ( out ) ; reporter . setOutput ( wrt ) ; reporter . close ( ) ; java . lang . String expected = "Analysis<sp>results\n" + ( ( ( ( ( ( ( ( ( ( ( ( "----------------\n" + "Analysis<sp>results\n" 1 ) + "Analysis<sp>results\n" 3 ) + "New<sp>API:<sp>new-dummy.archive\n" ) + "old:<sp>old1\n" ) + "new:<sp>new1\n" ) + "code1:<sp>descr1\n" ) + "Analysis<sp>results\n" 0 ) + "Analysis<sp>results\n" 1 ) + "Analysis<sp>results\n" 2 ) + "new:<sp>new2\n" ) + "code2:<sp>descr2\n" ) + "BINARY:<sp>BREAKING\n\n" ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder bld = new java . lang . StringBuilder ( "API[archives=" ) ; org . revapi . API . addArchivesToString ( bld , archives ) ; bld . append ( ",<sp>supplementary=" ) ; org . revapi . API . addArchivesToString ( bld , supplementaryArchives ) ; bld . append ( "]" ) ; return bld . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , out . toString ( ) )
testListResourcesCostCategoryAssignments ( ) { int previous = resourcesCostCategoryAssignmentDAO . list ( org . libreplan . business . costcategories . entities . ResourcesCostCategoryAssignment . class ) . size ( ) ; org . libreplan . business . costcategories . entities . ResourcesCostCategoryAssignment assignment = createValidResourcesCostCategoryAssignment ( ) ; resourcesCostCategoryAssignmentDAO . save ( assignment ) ; java . util . List < org . libreplan . business . costcategories . entities . ResourcesCostCategoryAssignment > list = resourcesCostCategoryAssignmentDAO . list ( org . libreplan . business . costcategories . entities . ResourcesCostCategoryAssignment . class ) ; "<AssertPlaceHolder>" ; } list ( java . lang . Class ) { return getSession ( ) . createCriteria ( klass ) . list ( ) ; }
org . junit . Assert . assertEquals ( ( previous + 1 ) , list . size ( ) )
getMountTable ( ) { java . util . Map < java . lang . String , alluxio . master . file . meta . options . MountInfo > mountTable = new java . util . HashMap ( 2 ) ; mountTable . put ( "/mnt/foo" , new alluxio . master . file . meta . options . MountInfo ( new alluxio . AlluxioURI ( "/mnt/foo" ) , new alluxio . AlluxioURI ( "hdfs://localhost:5678/foo" ) , 2L , alluxio . master . file . contexts . MountContext . defaults ( ) . getOptions ( ) . build ( ) ) ) ; mountTable . put ( "/mnt/bar" , new alluxio . master . file . meta . options . MountInfo ( new alluxio . AlluxioURI ( "/mnt/bar" ) , new alluxio . AlluxioURI ( "hdfs://localhost:5678/bar" ) , 3L , alluxio . master . file . contexts . MountContext . defaults ( ) . getOptions ( ) . build ( ) ) ) ; alluxio . AlluxioURI masterAddr = new alluxio . AlluxioURI ( "alluxio://localhost:1234" ) ; for ( Map . Entry < java . lang . String , alluxio . master . file . meta . options . MountInfo > mountPoint : mountTable . entrySet ( ) ) { alluxio . master . file . meta . options . MountInfo mountInfo = mountPoint . getValue ( ) ; mMountTable . add ( NoopJournalContext . INSTANCE , masterAddr . join ( mountPoint . getKey ( ) ) , mountInfo . getUfsUri ( ) , mountInfo . getMountId ( ) , mountInfo . getOptions ( ) ) ; } mountTable . put ( "/" , new alluxio . master . file . meta . options . MountInfo ( new alluxio . AlluxioURI ( "/" ) , new alluxio . AlluxioURI ( "s3a://bucket/" ) , alluxio . util . IdUtils . ROOT_MOUNT_ID , alluxio . master . file . contexts . MountContext . defaults ( ) . getOptions ( ) . build ( ) ) ) ; "<AssertPlaceHolder>" ; } getMountTable ( ) { return retryRPC ( ( ) -> { Map < java . lang . String , alluxio . wire . MountPointInfo > mountTableWire = new alluxio . client . file . HashMap < > ( ) ; for ( Map . Entry < java . lang . String , alluxio . grpc . MountPointInfo > entry : mClient . getMountTable ( alluxio . grpc . GetMountTablePRequest . newBuilder ( ) . build ( ) ) . getMountPointsMap ( ) . entrySet ( ) ) { mountTableWire . put ( entry . getKey ( ) , alluxio . grpc . GrpcUtils . fromProto ( entry . getValue ( ) ) ) ; } return mountTableWire ; } , "GetMountTable" ) ; }
org . junit . Assert . assertEquals ( mountTable , mMountTable . getMountTable ( ) )
testMetaOp4 ( ) { org . nd4j . linalg . api . ndarray . INDArray array1 = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 1.0F , 1.0F , 1.0F , 1.0F , 1.0F , 1.0F , 1.0F } ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 2.0F , 2.0F , 2.0F , 2.0F , 2.0F , 2.0F , 2.0F } ) ; org . nd4j . linalg . api . ndarray . INDArray res = array1 . dup ( ) . divi ( 0.5F ) ; "<AssertPlaceHolder>" ; } divi ( java . lang . Number ) { return divi ( org . nd4j . linalg . factory . Nd4j . complexScalar ( n ) ) ; }
org . junit . Assert . assertEquals ( exp , res )
emptyInputShouldNotPass ( ) { eu . inmite . android . lib . validations . FormsValidatorWithConditionTest . ModelWithPassingConditionValidation model = new eu . inmite . android . lib . validations . FormsValidatorWithConditionTest . ModelWithPassingConditionValidation ( org . robolectric . Robolectric . application ) ; model . txtNumber . setText ( "" ) ; model . editMessage . setText ( "" ) ; boolean result = eu . inmite . android . lib . validations . form . FormValidator . validate ( Robolectric . application , model , null ) ; "<AssertPlaceHolder>" ; } validate ( android . content . Context , java . lang . Object , eu . inmite . android . lib . validations . form . iface . IValidationCallback ) { if ( context == null ) { throw new java . lang . IllegalArgumentException ( "context<sp>cannot<sp>ben<sp>null" ) ; } if ( target == null ) { throw new java . lang . IllegalArgumentException ( "target<sp>cannot<sp>be<sp>null" ) ; } final java . util . List < eu . inmite . android . lib . validations . form . FormValidator . ValidationFail > failedValidations = new java . util . ArrayList ( ) ; final java . util . List < android . view . View > passedValidations = new java . util . ArrayList ( ) ; boolean result = true ; final java . util . Map < android . view . View , eu . inmite . android . lib . validations . form . FormValidator . FieldInfo > infoMap = eu . inmite . android . lib . validations . form . FieldFinder . getFieldsForTarget ( target ) ; for ( Map . Entry < android . view . View , eu . inmite . android . lib . validations . form . FormValidator . FieldInfo > entry : infoMap . entrySet ( ) ) { final eu . inmite . android . lib . validations . form . FormValidator . FieldInfo fieldInfo = entry . getValue ( ) ; final android . view . View view = entry . getKey ( ) ; if ( ( ( view . getVisibility ( ) ) == ( android . view . View . GONE ) ) || ( ( view . getVisibility ( ) ) == ( android . view . View . INVISIBLE ) ) ) { continue ; } eu . inmite . android . lib . validations . form . FormValidator . ValidationFail fieldResult = eu . inmite . android . lib . validations . form . FormValidator . performFieldValidations ( context , fieldInfo , view ) ; if ( fieldResult != null ) { failedValidations . add ( fieldResult ) ; result = false ; } else { passedValidations . add ( view ) ; } } if ( callback != null ) { java . util . Collections . sort ( failedValidations , new java . util . Comparator < eu . inmite . android . lib . validations . form . FormValidator . ValidationFail > ( ) { @ eu . inmite . android . lib . validations . form . Override public int compare ( eu . inmite . android . lib . validations . form . FormValidator . ValidationFail lhs , eu . inmite . android . lib . validations . form . FormValidator . ValidationFail rhs ) { return ( lhs . order ) < ( rhs . order ) ? - 1 : ( lhs . order ) == ( rhs . order ) ? 0 : 1 ; } } ) ; callback . validationComplete ( result , java . util . Collections . unmodifiableList ( failedValidations ) , java . util . Collections . unmodifiableList ( passedValidations ) ) ; } return result ; }
org . junit . Assert . assertFalse ( result )
test_ancestor_count ( ) { java . util . Map < org . openrdf . model . URI , java . lang . Integer > nbAncestors = engine . getAllNbAncestorsInc ( ) ; for ( org . openrdf . model . URI v : graph . getV ( ) ) { java . util . Set < org . openrdf . model . URI > ancestorsURIsExpected = ancestors . get ( v ) ; System . out . println ( v ) ; System . out . println ( ( ( ( "Exp<sp>" + ( ancestorsURIsExpected . size ( ) ) ) + "<sp>==<sp>" ) + ( nbAncestors . get ( v ) ) ) ) ; "<AssertPlaceHolder>" ; } } size ( ) { return size ; }
org . junit . Assert . assertTrue ( ( ( ancestorsURIsExpected . size ( ) ) == ( nbAncestors . get ( v ) ) ) )
testShouldCallAConstructorTakingACapabilitiesArgInPreferenceToANoArgOne ( ) { org . openqa . selenium . Capabilities caps = new org . openqa . selenium . ImmutableCapabilities ( org . openqa . selenium . remote . CapabilityType . BROWSER_NAME , "example" ) ; factory . registerDriverProvider ( new org . openqa . selenium . remote . server . DefaultDriverProvider ( caps , org . openqa . selenium . remote . server . DriverFactoryTest . CapabilitiesDriver . class ) ) ; org . openqa . selenium . remote . server . DriverFactoryTest . CapabilitiesDriver driver = ( ( org . openqa . selenium . remote . server . DriverFactoryTest . CapabilitiesDriver ) ( factory . newInstance ( caps ) ) ) ; "<AssertPlaceHolder>" ; } getCapabilities ( ) { org . openqa . selenium . WebDriver driver = getWrappedDriver ( ) ; if ( driver instanceof org . openqa . selenium . HasCapabilities ) { return ( ( org . openqa . selenium . HasCapabilities ) ( driver ) ) . getCapabilities ( ) ; } return null ; }
org . junit . Assert . assertEquals ( caps , driver . getCapabilities ( ) )
getJoinedFolderFileAndDeeperRightFolder ( ) { java . io . File folder = org . apache . maven . shared . project . utils . ProjectUtilsTest . ROOT_FOLDER ; java . io . File lhsFolder = new java . io . File ( folder , "pom.xml" ) ; java . io . File rhsFolder = new java . io . File ( folder , "src" ) ; "<AssertPlaceHolder>" ; } getJoinedFolder ( java . io . File , org . apache . maven . model . Model ) { java . io . File joinedFolder = baseDirectory ; for ( java . lang . String module : org . apache . maven . shared . project . utils . ProjectUtils . getAllModules ( model ) . keySet ( ) ) { java . io . File moduleFile = org . apache . maven . shared . project . utils . ProjectUtils . getModuleFile ( baseDirectory , module ) ; org . apache . maven . model . Model submodel = org . apache . maven . shared . project . utils . ProjectUtils . readModel ( moduleFile ) ; java . io . File modulesJoinedFolder = org . apache . maven . shared . project . utils . ProjectUtils . getJoinedFolder ( moduleFile . getParentFile ( ) , submodel ) ; joinedFolder = org . apache . maven . shared . project . utils . ProjectUtils . getJoinedFolder ( joinedFolder , modulesJoinedFolder ) ; } return joinedFolder ; }
org . junit . Assert . assertEquals ( folder , org . apache . maven . shared . project . utils . ProjectUtils . getJoinedFolder ( lhsFolder , rhsFolder ) )
exhaustive ( ) { int size = 8 ; java . util . List < au . edu . wehi . idsv . graph . RectangleGraphNode > nodes = new java . util . ArrayList < au . edu . wehi . idsv . graph . RectangleGraphNode > ( ) ; for ( int startx = 0 ; startx < size ; startx ++ ) { for ( int endx = startx ; endx < size ; endx ++ ) { for ( int starty = 0 ; starty < size ; starty ++ ) { for ( int endy = starty ; endy < size ; endy ++ ) { nodes . add ( new au . edu . wehi . idsv . graph . RectangleGraphNode ( startx , endx , starty , endy , 1 ) ) ; } } } } au . edu . wehi . idsv . graph . RectangleGraphNode [ ] cliques = getCliques ( nodes . toArray ( new au . edu . wehi . idsv . graph . RectangleGraphNode [ nodes . size ( ) ] ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return kmers . size ( ) ; }
org . junit . Assert . assertEquals ( ( size * size ) , cliques . length )
serialize_shouldReturnTheUuidOfTheObject ( ) { org . openmrs . OpenmrsObject location = new org . openmrs . Location ( ) ; java . lang . String expectedUuid = "some<sp>uuid" ; location . setUuid ( expectedUuid ) ; org . openmrs . customdatatype . datatype . BaseOpenmrsDatatype datatype = new org . openmrs . customdatatype . datatype . MockLocationDatatype ( ) ; "<AssertPlaceHolder>" ; } serialize ( java . lang . Float ) { if ( typedValue == null ) { return null ; } return typedValue . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedUuid , datatype . serialize ( location ) )
isJMockitMockableType_A$String_true ( ) { org . junithelper . core . meta . ClassMeta classMeta = new org . junithelper . core . meta . ClassMeta ( ) ; classMeta . importedList . add ( "java.io.InputStream" ) ; org . junithelper . core . extractor . AvailableTypeDetector target = new org . junithelper . core . extractor . AvailableTypeDetector ( classMeta ) ; java . lang . String typeName = "InputStream" ; boolean actual = target . isJMockitMockableType ( typeName ) ; boolean expected = true ; "<AssertPlaceHolder>" ; } isJMockitMockableType ( java . lang . String ) { if ( typeName == null ) { return false ; } if ( ( org . junithelper . core . util . PrimitiveTypeUtil . isPrimitive ( typeName ) ) || ( typeName . matches ( ".+?\\[\\]$" ) ) ) { return false ; } try { java . lang . Class < ? > clazz = java . lang . Class . forName ( ( "java.lang." + typeName ) ) ; return java . lang . reflect . Modifier . isFinal ( clazz . getModifiers ( ) ) ? false : true ; } catch ( java . lang . Exception ignore ) { for ( java . lang . String importedPackage : classMeta . importedList ) { importedPackage = importedPackage . replaceAll ( "//" , StringValue . Empty ) ; if ( importedPackage . matches ( ( ( ".+?\\." + typeName ) + "$" ) ) ) { return true ; } } if ( typeName . matches ( ".+?\\..+" ) ) { try { java . lang . Class < ? > clazz = java . lang . Class . forName ( typeName ) ; return ! ( java . lang . reflect . Modifier . isFinal ( clazz . getModifiers ( ) ) ) ; } catch ( java . lang . Exception e ) { return false ; } } } return false ; }
org . junit . Assert . assertEquals ( expected , actual )
testHashBaseForItemAnswersIncludesAnswerOptionsRichTextInsteadOfAnswerOptionLabelsForExtendedMatchingItems ( ) { final org . sakaiproject . tool . assessment . data . dao . assessment . ItemData item = newExtendedMatchingItem ( ) ; item . setAnswerOptionsSimpleOrRich ( ItemDataIfc . ANSWER_OPTIONS_RICH ) ; expectServerUrlLookup ( ) ; java . util . stream . IntStream . rangeClosed ( 0 , 18 ) . forEach ( ( i ) -> expectResourceLookupUnchecked ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ i ] ) ) ; java . util . ArrayList < java . lang . String [ ] > contentResourceDefs1 = new java . util . ArrayList ( ) ; contentResourceDefs1 . add ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 14 ] ) ; contentResourceDefs1 . add ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 13 ] ) ; java . util . ArrayList < java . lang . String [ ] > contentResourceDefs2 = new java . util . ArrayList ( ) ; contentResourceDefs2 . add ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 16 ] ) ; contentResourceDefs2 . add ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 17 ] ) ; final java . lang . StringBuilder expectedHashBase = new java . lang . StringBuilder ( ) . append ( labeled ( "EmiAnswerOptionsRichText" , resourceDocTemplate1 ( expectedContentResourceHash1 ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 11 ] ) ) ) ) . append ( labeled ( "EmiCorrectOptionLabels" , "Answer<sp>Label<sp>3Answer<sp>Label<sp>5" ) ) . append ( labeled ( "EmiSequence" , ( "" + ( Long . MAX_VALUE ) ) ) ) . append ( labeled ( "EmiText" , resourceDocTemplate1 ( expectedContentResourceHash1 ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 12 ] ) ) ) ) . append ( expectedContentResourceHashAttachments ( contentResourceDefs1 ) ) . append ( labeled ( "EmiCorrectOptionLabels" , "Answer<sp>Label<sp>6Answer<sp>Label<sp>8" ) ) . append ( labeled ( "EmiSequence" , ( "" + ( Long . MAX_VALUE ) ) ) ) . append ( labeled ( "EmiText" , resourceDocTemplate1 ( expectedContentResourceHash1 ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 15 ] ) ) ) ) . append ( expectedContentResourceHashAttachments ( contentResourceDefs2 ) ) ; java . lang . StringBuilder actualHashBase = new java . lang . StringBuilder ( ) ; itemHashUtil . hashBaseForItemAnswers ( item , actualHashBase ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( name ( ) . equals ( "sessionId" ) ) { return "session-id" ; } else { return name ( ) ; } }
org . junit . Assert . assertThat ( actualHashBase . toString ( ) , org . hamcrest . CoreMatchers . equalTo ( expectedHashBase . toString ( ) ) )
testNullCacheGetCacheReult ( ) { com . ewcms . common . query . Resultable result = query . setRow ( 20 ) . setPage ( 3 ) . queryCacheResult ( "testCacheKey" ) ; "<AssertPlaceHolder>" ; } getResultList ( ) { return resultList ; }
org . junit . Assert . assertEquals ( 20 , result . getResultList ( ) . size ( ) )
testGetInfo ( ) { final edu . illinois . library . cantaloupe . image . Identifier identifier = new edu . illinois . library . cantaloupe . image . Identifier ( "jpg" ) ; java . util . Optional < edu . illinois . library . cantaloupe . image . Info > expected = edu . illinois . library . cantaloupe . cache . InfoService . getInstance ( ) . getInfo ( identifier ) ; java . util . Optional < edu . illinois . library . cantaloupe . image . Info > actual = instance . getInfo ( identifier ) ; "<AssertPlaceHolder>" ; } getInfo ( edu . illinois . library . cantaloupe . image . Identifier ) { edu . illinois . library . cantaloupe . cache . HeapCache . Item item = get ( itemKey ( identifier ) ) ; if ( item != null ) { edu . illinois . library . cantaloupe . cache . HeapCache . LOGGER . debug ( "getInfo():<sp>hit<sp>for<sp>{}" , identifier ) ; edu . illinois . library . cantaloupe . image . Info info = edu . illinois . library . cantaloupe . image . Info . fromJSON ( new java . lang . String ( item . getData ( ) , java . nio . charset . StandardCharsets . UTF_8 ) ) ; return java . util . Optional . of ( info ) ; } return java . util . Optional . empty ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testIsIncludePlaceGroups ( ) { System . out . println ( "isIncludePlaceGroups" ) ; mudmap2 . backend . legend . Legend instance = new mudmap2 . backend . legend . Legend ( layer , Legend . Orientation . HORIZONTAL , 500 ) ; "<AssertPlaceHolder>" ; } isIncludePlaceGroups ( ) { return includePlaceGroups ; }
org . junit . Assert . assertFalse ( instance . isIncludePlaceGroups ( ) )
testGenerateAnyFromDynAny ( ) { java . lang . String msg ; org . omg . CORBA . Any any = null ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynSequence dynAny = null ; org . omg . DynamicAny . DynSequence dynAny2 = null ; tc = org . jacorb . test . BoundedDataHelper . type ( ) ; dynAny = createDynAnyFromTypeCode ( tc ) ; any = orb . create_any ( ) ; any = dynAny . to_any ( ) ; dynAny2 = createDynAnyFromAny ( any ) ; msg = "The<sp>DynAny::to_any<sp>operation<sp>failed<sp>to<sp>create<sp>an<sp>Any<sp>" ; msg += "object<sp>with<sp>the<sp>same<sp>value<sp>as<sp>the<sp>DynAny<sp>object" ; "<AssertPlaceHolder>" ; } equal ( java . lang . Object ) { if ( ( obj1 == null ) || ( ( current ) == null ) ) { throw new org . jacorb . collection . util . ObjectInvalid ( ) ; } check_object ( obj1 ) ; return ops . equal ( current , ( ( org . omg . CORBA . Any ) ( obj1 ) ) ) ; }
org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) )
generateTrajectory_CorrectNumberOfSteps ( ) { double [ ] size = new double [ ] { 512 , 512 } ; de . biomedical_imaging . traJ . simulation . AnomalousDiffusionScene scene = new de . biomedical_imaging . traJ . simulation . AnomalousDiffusionScene ( size , 2 ) ; double diffusioncoefficient = 1 ; double timelag = 1 ; int dimension = 2 ; int numberOfSteps = 10 ; de . biomedical_imaging . traJ . simulation . AnomalousDiffusionSimulator sim = new de . biomedical_imaging . traJ . simulation . AnomalousDiffusionSimulator ( diffusioncoefficient , timelag , dimension , numberOfSteps , scene ) ; de . biomedical_imaging . traJ . Trajectory t = sim . generateTrajectory ( ) ; "<AssertPlaceHolder>" ; } generateTrajectory ( ) { de . biomedical_imaging . traJ . Trajectory t = new de . biomedical_imaging . traJ . Trajectory ( dimension ) ; t . add ( new org . scijava . vecmath . Point3d ( 0 , 0 , 0 ) ) ; de . biomedical_imaging . traJ . simulation . CentralRandomNumberGenerator r = de . biomedical_imaging . traJ . simulation . CentralRandomNumberGenerator . getInstance ( ) ; double startBeta = direction ; double transportStepLength = ( timelag ) * ( velocity ) ; double angularChangePerStep = ( angularVelocity ) * ( timelag ) ; double currentBeta = startBeta ; org . scijava . vecmath . Point3d lastPos ; org . scijava . vecmath . Point3d newPos ; switch ( dimension ) { case 1 : lastPos = t . get ( 0 ) ; for ( int i = 0 ; i < ( numberOfSteps ) ; i ++ ) { newPos = new org . scijava . vecmath . Point3d ( ( ( lastPos . x ) + ( ( java . lang . Math . signum ( java . lang . Math . sin ( currentBeta ) ) ) * transportStepLength ) ) , 0 , 0 ) ; t . add ( newPos ) ; lastPos = newPos ; currentBeta = currentBeta + ( ( r . randomSign ( ) ) * angularChangePerStep ) ; } break ; case 2 : for ( int i = 0 ; i < ( numberOfSteps ) ; i ++ ) { lastPos = t . get ( i ) ; newPos = new org . scijava . vecmath . Point3d ( ( ( lastPos . x ) + ( ( java . lang . Math . cos ( currentBeta ) ) * transportStepLength ) ) , ( ( lastPos . y ) + ( ( java . lang . Math . sin ( currentBeta ) ) * transportStepLength ) ) , 0 ) ; currentBeta = currentBeta + ( ( r . randomSign ( ) ) * angularChangePerStep ) ; t . add ( newPos ) ; } break ; case 3 : double theta = startBeta ; double phi = startBeta ; for ( int i = 0 ; i < ( numberOfSteps ) ; i ++ ) { lastPos = t . get ( i ) ; newPos = new org . scijava . vecmath . Point3d ( ( ( lastPos . x ) + ( ( transportStepLength * ( java . lang . Math . cos ( theta ) ) ) * ( java . lang . Math . sin ( phi ) ) ) ) , ( ( lastPos . y ) + ( ( transportStepLength * ( java . lang . Math . sin ( theta ) ) ) * ( java . lang . Math . sin ( phi ) ) ) ) , ( ( lastPos . z ) + ( transportStepLength * ( java . lang . Math . cos ( phi ) ) ) ) ) ; t . add ( newPos ) ; theta = theta + ( ( r . randomSign ( ) ) * angularChangePerStep ) ; double dPhi = ( r . randomSign ( ) ) * angularChangePerStep ; phi = phi + dPhi ; } break ; default : break ; } return t ; }
org . junit . Assert . assertEquals ( numberOfSteps , ( ( t . size ( ) ) - 1 ) )
trimsAccessTokenWhenSettingIt ( ) { java . lang . String accessTokenWithoutWhitespace = "wuryew2347234987" ; profile . setAccessToken ( ( ( "\t" + accessTokenWithoutWhitespace ) + "<sp>\n" ) ) ; "<AssertPlaceHolder>" ; } getAccessToken ( ) { return configuration . getAccessToken ( ) ; }
org . junit . Assert . assertThat ( profile . getAccessToken ( ) , org . hamcrest . core . Is . is ( accessTokenWithoutWhitespace ) )
testBuild ( ) { org . lnu . is . domain . department . name . DepartmentName context = new org . lnu . is . domain . department . name . DepartmentName ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>DepartmentName<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . department . name . DepartmentName > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testDeletePipelineConfirmYesAndFailed ( ) { preparePipelineDelete ( ) ; org . guvnor . ala . ui . model . PipelineExecutionTraceKey currentKey = trace . getKey ( ) ; doThrow ( new java . lang . RuntimeException ( org . guvnor . ala . ui . client . provider . status . runtime . RuntimePresenterActionsTest . ERROR_MESSAGE ) ) . when ( runtimeService ) . deletePipelineExecution ( currentKey ) ; yesCommandCaptor . getValue ( ) . execute ( ) ; verify ( runtimeService , times ( 1 ) ) . deletePipelineExecution ( currentKey ) ; verify ( defaultErrorCallback , times ( 1 ) ) . error ( any ( org . jboss . errai . bus . client . api . messaging . Message . class ) , exceptionCaptor . capture ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return rootPath ; }
org . junit . Assert . assertEquals ( org . guvnor . ala . ui . client . provider . status . runtime . RuntimePresenterActionsTest . ERROR_MESSAGE , exceptionCaptor . getValue ( ) . getMessage ( ) )
testFunctionWithDefaultAndRestMetadata ( ) { java . lang . String script = "remote<sp>User<sp>function<sp>getUser(numeric<sp>userid=\"default\"<sp>restargsource=\"Path\")<sp>httpmethod=\"GET\"<sp>restpath=\"{userid}\"<sp>{}" ; cfml . CFSCRIPTParser . ScriptBlockContext scriptStatement = parseScript ( script ) ; if ( ( fCfmlParser . getMessages ( ) . size ( ) ) > 0 ) { org . junit . Assert . fail ( ( "whoops!<sp>" + ( fCfmlParser . getMessages ( ) ) ) ) ; } "<AssertPlaceHolder>" ; } getMessages ( ) { return messages ; }
org . junit . Assert . assertNotNull ( scriptStatement )
dereference_completed ( ) { final java . util . concurrent . CompletionStage < java . lang . String > future = completedFuture ( "hello" ) ; final java . util . concurrent . CompletionStage < java . lang . String > dereferenced = com . spotify . futures . CompletableFutures . dereference ( completedFuture ( future ) ) ; "<AssertPlaceHolder>" ; } completesTo ( T ) { return com . spotify . futures . CompletableFuturesTest . completesTo ( org . hamcrest . core . Is . is ( expected ) ) ; }
org . junit . Assert . assertThat ( dereferenced , com . spotify . futures . CompletableFuturesTest . completesTo ( "hello" ) )
testLambdaAsFunction05 ( ) { javax . el . ELProcessor processor = new javax . el . ELProcessor ( ) ; java . lang . Object result = processor . getValue ( "v<sp>=<sp>(()->y->()->x->x-y);<sp>v()(1)()(2)" , org . apache . el . parser . Integer . class ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { return org . apache . tomcat . util . net . jsse . openssl . Cipher . idMap . get ( java . lang . Integer . valueOf ( cipherId ) ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , result )
testHeaderAcceptLanguage ( ) { request . setHeaderAcceptLanguage ( "language" ) ; "<AssertPlaceHolder>" ; } getHeaderAcceptLanguage ( ) { return ( ( java . lang . String ) ( getParameter ( org . piwik . java . tracking . PiwikRequest . HEADER_ACCEPT_LANGUAGE ) ) ) ; }
org . junit . Assert . assertEquals ( "language" , request . getHeaderAcceptLanguage ( ) )
testGeenWijzigingen ( ) { nl . bzk . brp . levering . lo3 . conversie . mutatie . MutatieCategorie01IntegratieTest . LOG . info ( "testGeenWijzigingen" ) ; final nl . bzk . brp . domain . leveringmodel . MetaObject persoonMetaObject = maakBasisPersoon ( 5001 ) ; final nl . bzk . brp . domain . leveringmodel . AdministratieveHandeling administratieveHandeling = getBijhoudingsAdministratieveHandeling ( ) ; final java . util . Set < nl . bzk . brp . domain . leveringmodel . AdministratieveHandeling > administratieveHandelingen = new java . util . HashSet ( ) ; administratieveHandelingen . add ( basisAdministratieveHandeling ) ; administratieveHandelingen . add ( administratieveHandeling ) ; final nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst persoon = new nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst ( persoonMetaObject , 0L ) ; final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . syntax . Lo3CategorieWaarde > resultaat = subject . converteer ( persoon , null , administratieveHandeling , null , new nl . bzk . brp . levering . lo3 . conversie . ConversieCache ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) )
testVertexIterator ( ) { org . apache . tinkerpop . gremlin . structure . Vertex a = this . sqlgGraph . addVertex ( ) ; org . apache . tinkerpop . gremlin . structure . Vertex b = this . sqlgGraph . addVertex ( ) ; org . apache . tinkerpop . gremlin . structure . Vertex c = this . sqlgGraph . addVertex ( ) ; org . apache . tinkerpop . gremlin . structure . Vertex d = this . sqlgGraph . addVertex ( ) ; a . addEdge ( "aaa" , b ) ; b . addEdge ( "aaa" , b ) ; c . addEdge ( "aaa" , b ) ; d . addEdge ( "aaa" , b ) ; this . sqlgGraph . tx ( ) . commit ( ) ; java . util . List < org . apache . tinkerpop . gremlin . structure . Vertex > vertexes = this . sqlgGraph . traversal ( ) . V ( ) . both ( ) . toList ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cache . size ( ) ; }
org . junit . Assert . assertEquals ( 8 , vertexes . size ( ) )
flatMap_A$Function1 ( ) { com . m3 . scalaflavor4j . None < java . lang . String > target = new com . m3 . scalaflavor4j . None < java . lang . String > ( ) ; com . m3 . scalaflavor4j . F1 < java . lang . String , com . m3 . scalaflavor4j . Option < java . lang . Integer > > f = new com . m3 . scalaflavor4j . F1 < java . lang . String , com . m3 . scalaflavor4j . Option < java . lang . Integer > > ( ) { @ com . m3 . scalaflavor4j . Override public com . m3 . scalaflavor4j . Option < java . lang . Integer > apply ( java . lang . String v1 ) { return com . m3 . scalaflavor4j . Option . apply ( v1 . length ( ) ) ; } } ; com . m3 . scalaflavor4j . Option < java . lang . Integer > actual = target . flatMap ( f ) ; "<AssertPlaceHolder>" ; } getOrNull ( ) { return null ; }
org . junit . Assert . assertNull ( actual . getOrNull ( ) )
hasStreamInherited ( ) { org . apache . olingo . commons . api . edm . provider . CsdlEdmProvider provider = mock ( org . apache . olingo . commons . api . edm . provider . CsdlEdmProvider . class ) ; org . apache . olingo . commons . core . edm . EdmProviderImpl edm = new org . apache . olingo . commons . core . edm . EdmProviderImpl ( provider ) ; org . apache . olingo . commons . api . edm . FullQualifiedName baseName = new org . apache . olingo . commons . api . edm . FullQualifiedName ( "namespace" , "BaseTypeName" ) ; org . apache . olingo . commons . api . edm . provider . CsdlEntityType baseType = new org . apache . olingo . commons . api . edm . provider . CsdlEntityType ( ) ; baseType . setHasStream ( true ) ; when ( provider . getEntityType ( baseName ) ) . thenReturn ( baseType ) ; org . apache . olingo . commons . api . edm . FullQualifiedName typeName = new org . apache . olingo . commons . api . edm . FullQualifiedName ( "namespace" , "typeName" ) ; org . apache . olingo . commons . api . edm . provider . CsdlEntityType type = new org . apache . olingo . commons . api . edm . provider . CsdlEntityType ( ) ; type . setBaseType ( baseName ) ; org . apache . olingo . commons . api . edm . EdmEntityType typeWithBaseTypeWithStream = new org . apache . olingo . commons . core . edm . EdmEntityTypeImpl ( edm , typeName , type ) ; when ( provider . getEntityType ( typeName ) ) . thenReturn ( type ) ; "<AssertPlaceHolder>" ; } hasStream ( ) { checkBaseType ( ) ; if ( ( hasStream ) || ( ( ( entityBaseType ) != null ) && ( entityBaseType . hasStream ( ) ) ) ) { return true ; } return false ; }
org . junit . Assert . assertTrue ( typeWithBaseTypeWithStream . hasStream ( ) )
testMonitoringSourceRestore ( ) { java . io . File testFolder = org . apache . flink . hdfstests . ContinuousFileProcessingMigrationTest . tempFolder . newFolder ( ) ; org . apache . flink . api . java . io . TextInputFormat format = new org . apache . flink . api . java . io . TextInputFormat ( new org . apache . flink . core . fs . Path ( testFolder . getAbsolutePath ( ) ) ) ; final org . apache . flink . streaming . api . functions . source . ContinuousFileMonitoringFunction < java . lang . String > monitoringFunction = new org . apache . flink . streaming . api . functions . source . ContinuousFileMonitoringFunction ( format , org . apache . flink . streaming . api . functions . source . FileProcessingMode . PROCESS_CONTINUOUSLY , 1 , org . apache . flink . hdfstests . ContinuousFileProcessingMigrationTest . INTERVAL ) ; org . apache . flink . streaming . api . operators . StreamSource < org . apache . flink . streaming . api . functions . source . TimestampedFileInputSplit , org . apache . flink . streaming . api . functions . source . ContinuousFileMonitoringFunction < java . lang . String > > src = new org . apache . flink . streaming . api . operators . StreamSource ( monitoringFunction ) ; final org . apache . flink . streaming . util . AbstractStreamOperatorTestHarness < org . apache . flink . streaming . api . functions . source . TimestampedFileInputSplit > testHarness = new org . apache . flink . streaming . util . AbstractStreamOperatorTestHarness ( src , 1 , 1 , 0 ) ; testHarness . setup ( ) ; testHarness . initializeState ( org . apache . flink . streaming . util . OperatorSnapshotUtil . getResourceFilename ( ( ( ( ( "monitoring-function-migration-test-" + ( expectedModTime ) ) + "-flink" ) + ( testMigrateVersion ) ) + "-snapshot" ) ) ) ; testHarness . open ( ) ; "<AssertPlaceHolder>" ; } getGlobalModificationTime ( ) { return this . globalModificationTime ; }
org . junit . Assert . assertEquals ( ( ( long ) ( expectedModTime ) ) , monitoringFunction . getGlobalModificationTime ( ) )
getLongRunningTasksWrappedFutureTest ( ) { final org . threadly . concurrent . statistics . NoThreadSchedulerStatisticTracker scheduler = new org . threadly . concurrent . statistics . NoThreadSchedulerStatisticTracker ( ) ; scheduler . submit ( new org . threadly . concurrent . statistics . ClockUpdateRunnable ( ) { @ org . threadly . concurrent . statistics . Override public void handleRunStart ( ) { "<AssertPlaceHolder>" ; } } ) ; scheduler . tick ( null ) ; } getLongRunningTasks ( long ) { java . util . List < org . threadly . util . Pair < java . lang . Runnable , java . lang . StackTraceElement [ ] > > result = new java . util . ArrayList ( ) ; if ( statsContainer . accurateTime ) { org . threadly . util . Clock . accurateForwardProgressingMillis ( ) ; } for ( Map . Entry < org . threadly . util . Pair < java . lang . Thread , java . lang . Runnable > , java . lang . Long > e : statsContainer . runningTasks . entrySet ( ) ) { if ( ( ( org . threadly . util . Clock . lastKnownForwardProgressingMillis ( ) ) - ( e . getValue ( ) ) ) > durationLimitMillis ) { java . lang . Runnable task = e . getKey ( ) . getRight ( ) ; if ( task instanceof org . threadly . concurrent . future . ListenableFutureTask ) { org . threadly . concurrent . future . ListenableFutureTask < ? > lft = ( ( org . threadly . concurrent . future . ListenableFutureTask < ? > ) ( task ) ) ; if ( ( lft . getContainedCallable ( ) ) instanceof org . threadly . concurrent . RunnableCallableAdapter ) { org . threadly . concurrent . RunnableCallableAdapter < ? > rca = ( ( org . threadly . concurrent . RunnableCallableAdapter < ? > ) ( lft . getContainedCallable ( ) ) ) ; task = rca . getContainedRunnable ( ) ; } } java . lang . StackTraceElement [ ] stack = e . getKey ( ) . getLeft ( ) . getStackTrace ( ) ; if ( statsContainer . runningTasks . containsKey ( e . getKey ( ) ) ) { result . add ( new org . threadly . util . Pair ( task , stack ) ) ; } } } return result ; }
org . junit . Assert . assertTrue ( ( ( scheduler . getLongRunningTasks ( ( - 1 ) ) . get ( 0 ) . getLeft ( ) ) == ( this ) ) )
testCreateFieldByType ( ) { final org . kie . workbench . common . dmn . client . property . dmn . QNameFieldDefinition definition1 = provider . createFieldByType ( typeInfo ) ; final org . kie . workbench . common . dmn . client . property . dmn . QNameFieldDefinition definition2 = provider . createFieldByType ( typeInfo ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof org . kie . workbench . common . dmn . api . definition . v1_1 . UnaryTests ) ) { return false ; } final org . kie . workbench . common . dmn . api . definition . v1_1 . UnaryTests that = ( ( org . kie . workbench . common . dmn . api . definition . v1_1 . UnaryTests ) ( o ) ) ; if ( ( id ) != null ? ! ( id . equals ( that . id ) ) : ( that . id ) != null ) { return false ; } if ( ( description ) != null ? ! ( description . equals ( that . description ) ) : ( that . description ) != null ) { return false ; } if ( ( text ) != null ? ! ( text . equals ( that . text ) ) : ( that . text ) != null ) { return false ; } return ( expressionLanguage ) != null ? expressionLanguage . equals ( that . expressionLanguage ) : ( that . expressionLanguage ) == null ; }
org . junit . Assert . assertFalse ( definition1 . equals ( definition2 ) )
complementIfPastWindow ( ) { net . time4j . range . IntervalCollection < net . time4j . PlainDate > coll = net . time4j . range . IntervalCollection . onDateAxis ( ) . plus ( net . time4j . range . DateInterval . parseISO ( "2011-01-01/2013-12-31" ) ) . plus ( net . time4j . range . DateInterval . parseISO ( "2014-06-30/2014-08-01" ) ) . plus ( net . time4j . range . DateInterval . parseISO ( "2014-09-01/2015-09-30" ) ) ; net . time4j . range . ChronoInterval < net . time4j . PlainDate > window = net . time4j . range . DateInterval . until ( net . time4j . PlainDate . of ( 2015 , 12 , 31 ) ) ; net . time4j . range . IntervalCollection < net . time4j . PlainDate > expected = net . time4j . range . IntervalCollection . onDateAxis ( ) . plus ( net . time4j . range . DateInterval . until ( net . time4j . PlainDate . of ( 2010 , 12 , 31 ) ) ) . plus ( net . time4j . range . DateInterval . parseISO ( "2014-01-01/2014-06-29" ) ) . plus ( net . time4j . range . DateInterval . parseISO ( "2014-08-02/2014-08-31" ) ) . plus ( net . time4j . range . DateInterval . parseISO ( "2015-10-01/2015-12-31" ) ) ; "<AssertPlaceHolder>" ; } withComplement ( net . time4j . range . ChronoInterval ) { if ( timeWindow . isEmpty ( ) ) { java . util . List < net . time4j . range . ChronoInterval < T > > zero = java . util . Collections . emptyList ( ) ; return this . create ( zero ) ; } net . time4j . range . ChronoInterval < T > window = this . adjust ( timeWindow ) ; net . time4j . range . IntervalCollection < T > coll = this . withFilter ( window ) ; if ( coll . isEmpty ( ) ) { return this . create ( java . util . Collections . singletonList ( window ) ) ; } net . time4j . range . Boundary < T > lower = window . getStart ( ) ; net . time4j . range . Boundary < T > upper = window . getEnd ( ) ; java . util . List < net . time4j . range . ChronoInterval < T > > gaps = new java . util . ArrayList ( ) ; T min = coll . getMinimum ( ) ; if ( min != null ) { if ( lower . isInfinite ( ) ) { this . addLeft ( gaps , min ) ; } else { T s = lower . getTemporal ( ) ; if ( lower . isOpen ( ) ) { s = this . getTimeLine ( ) . stepBackwards ( s ) ; if ( s == null ) { this . addLeft ( gaps , min ) ; } else { this . addLeft ( gaps , s , min ) ; } } else { this . addLeft ( gaps , s , min ) ; } } } gaps . addAll ( coll . withGaps ( ) . getIntervals ( ) ) ; T max = coll . getMaximum ( ) ; if ( max != null ) { T s = this . getTimeLine ( ) . stepForward ( max ) ; if ( s != null ) { net . time4j . range . Boundary < T > bs = net . time4j . range . Boundary . ofClosed ( s ) ; net . time4j . range . Boundary < T > be ; if ( upper . isInfinite ( ) ) { be = upper ; gaps . add ( this . newInterval ( bs , be ) ) ; } else if ( this . isCalendrical ( ) ) { if ( upper . isClosed ( ) ) { be = upper ; } else { T e = upper . getTemporal ( ) ; e = this . getTimeLine ( ) . stepBackwards ( e ) ; be = net . time4j . range . Boundary . ofClosed ( e ) ; } if ( ! ( this . isAfter ( s , be . getTemporal ( ) ) ) ) { gaps . add ( this . newInterval ( bs , be ) ) ; } } else { if ( upper . isOpen ( ) ) { be = upper ; } else { T e = upper . getTemporal ( ) ; e = this . getTimeLine ( ) . stepForward ( e ) ; if ( e == null ) { be = net . time4j . range . Boundary . infiniteFuture ( ) ; } else { be = net . time4j . range . Boundary . ofOpen ( e ) ; } } if ( this . isBefore ( s , be . getTemporal ( ) ) ) { gaps . add ( this . newInterval ( bs , be ) ) ; } } } } return this . create ( gaps ) ; }
org . junit . Assert . assertThat ( coll . withComplement ( window ) , org . hamcrest . CoreMatchers . is ( expected ) )
testUndirected ( ) { org . gradoop . flink . util . FlinkAsciiGraphLoader loader = new org . gradoop . flink . util . FlinkAsciiGraphLoader ( getConfig ( ) ) ; loader . initDatabaseFromFile ( getFilePath ( "/data/gdl/cam_test.gdl" ) ) ; org . gradoop . flink . model . impl . epgm . GraphCollection g = loader . getGraphCollection ( ) ; org . gradoop . flink . model . impl . operators . tostring . CanonicalAdjacencyMatrixBuilder cam = new org . gradoop . flink . model . impl . operators . tostring . CanonicalAdjacencyMatrixBuilder ( new org . gradoop . flink . model . impl . operators . tostring . functions . GraphHeadToDataString ( ) , new org . gradoop . flink . model . impl . operators . tostring . functions . VertexToDataString ( ) , new org . gradoop . flink . model . impl . operators . tostring . functions . EdgeToDataString ( ) , false ) ; java . lang . String result = cam . execute ( g ) . collect ( ) . get ( 0 ) ; java . lang . String expectation = org . apache . commons . io . FileUtils . readFileToString ( org . apache . commons . io . FileUtils . getFile ( getFilePath ( "/data/expected/cam_test_undirected" ) ) ) ; "<AssertPlaceHolder>" ; } getFilePath ( java . lang . String ) { return java . net . URLDecoder . decode ( getClass ( ) . getResource ( relPath ) . getFile ( ) , StandardCharsets . UTF_8 . name ( ) ) ; }
org . junit . Assert . assertEquals ( expectation , result )
testParentColumnNames ( ) { try { java . lang . String [ ] columnNames = getAllColumnNames ( com . ctrip . platform . dal . dao . helper . EntityManagerTest . Entity . Inheritance . Parent . class ) ; java . util . List < java . lang . String > actualColumnNames = java . util . Arrays . asList ( columnNames ) ; java . util . Collections . sort ( actualColumnNames ) ; java . util . List < java . lang . String > expectedColumnNames = getExpectedColumnNamesOfParent ( ) ; java . util . Collections . sort ( expectedColumnNames ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ) ; } } getExpectedColumnNamesOfParent ( ) { java . util . List < java . lang . String > expectedNames = new java . util . ArrayList ( ) ; expectedNames . addAll ( getExpectedColumnNamesOfGrandParent ( ) ) ; expectedNames . add ( "parentId" ) ; expectedNames . add ( "parentName" ) ; return expectedNames ; }
org . junit . Assert . assertEquals ( actualColumnNames , expectedColumnNames )
testAromatizeMolecule ( ) { java . lang . String rawMolSmiles = "C1=CC2=C(C=C1)C=CC=C2" ; org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer mol = sp . parseSmiles ( rawMolSmiles ) ; org . openscience . cdk . smsd . tools . ExtAtomContainerManipulator . aromatizeMolecule ( mol ) ; int count = 0 ; for ( org . openscience . cdk . interfaces . IBond b : mol . bonds ( ) ) { if ( ( b . getFlag ( CDKConstants . ISAROMATIC ) ) && ( b . getOrder ( ) . equals ( IBond . Order . DOUBLE ) ) ) { count ++ ; } } "<AssertPlaceHolder>" ; } equals ( org . openscience . cdk . graph . invariant . GIMatrix ) { if ( ( ( height ( ) ) != ( matrix . height ( ) ) ) || ( ( width ( ) ) != ( matrix . width ( ) ) ) ) throw new org . openscience . cdk . graph . invariant . exception . BadMatrixFormatException ( ) ; double [ ] [ ] temp = matrix . getArrayValue ( ) ; for ( int i = 0 ; i < ( m ) ; i ++ ) for ( int j = 0 ; j < ( n ) ; j ++ ) if ( ! ( ( array [ i ] [ j ] ) == ( temp [ i ] [ j ] ) ) ) return false ; return true ; }
org . junit . Assert . assertEquals ( 5 , count )
testGetColumnName ( ) { java . util . List positions = mockPositions ( org . pentaho . platform . plugin . services . connections . mondrian . MDXMetaDataTest . COLUMN_SIZE , org . pentaho . platform . plugin . services . connections . mondrian . MDXMetaDataTest . ROW_SIZE ) ; mondrian . olap . Axis axColumn = mockAxis ( positions ) ; mondrian . olap . Axis axRow = mockAxis ( positions ) ; mondrian . olap . Axis [ ] axes = new mondrian . olap . Axis [ ] { axColumn , axRow } ; mondrian . olap . Result nativeResultSet = mock ( mondrian . olap . Result . class ) ; when ( nativeResultSet . getAxes ( ) ) . thenReturn ( axes ) ; org . pentaho . platform . plugin . services . connections . mondrian . MDXMetaData metadata = new org . pentaho . platform . plugin . services . connections . mondrian . MDXMetaData ( nativeResultSet ) ; java . lang . String columnName = metadata . getColumnName ( 0 ) ; "<AssertPlaceHolder>" ; } getRowHeaderNames ( ) { return columnNames ; }
org . junit . Assert . assertEquals ( metadata . getRowHeaderNames ( ) [ 0 ] , columnName )
testIndicatieStaatLoosAlAanwezigMaarDagErvoor ( ) { final nl . bzk . brp . bijhouding . bericht . model . RegistratieNationaliteitActieElement actieElement = getRegistratieNationaliteitActieElement ( 19900101 , null , true ) ; final java . util . List < nl . bzk . brp . bijhouding . bericht . model . MeldingElement > meldingElements = actieElement . valideerSpecifiekeInhoud ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , meldingElements . size ( ) )
kapuaUnmatchedChannelGetterSetters ( ) { org . eclipse . kapua . message . device . lifecycle . KapuaUnmatchedChannel kapuaUnmatchedChannel = new org . eclipse . kapua . message . internal . device . lifecycle . KapuaUnmatchedChannelImpl ( ) ; kapuaUnmatchedChannel . setClientId ( "clientId-1" ) ; "<AssertPlaceHolder>" ; } getClientId ( ) { return get ( "clientId" ) ; }
org . junit . Assert . assertEquals ( "clientId-1" , kapuaUnmatchedChannel . getClientId ( ) )
testFloatCollectSet ( ) { io . cdap . cdap . api . data . schema . Schema schema = io . cdap . cdap . api . data . schema . Schema . recordOf ( "test" , Schema . Field . of ( "x" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . FLOAT ) ) ) ; io . cdap . plugin . batch . aggregator . function . CollectSet collectSet = new io . cdap . plugin . batch . aggregator . function . CollectSet ( "x" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . FLOAT ) ) ; collectSet . beginFunction ( ) ; collectSet . operateOn ( io . cdap . cdap . api . data . format . StructuredRecord . builder ( schema ) . set ( "x" , 1.0F ) . build ( ) ) ; collectSet . operateOn ( io . cdap . cdap . api . data . format . StructuredRecord . builder ( schema ) . set ( "x" , 2.0F ) . build ( ) ) ; collectSet . operateOn ( io . cdap . cdap . api . data . format . StructuredRecord . builder ( schema ) . set ( "x" , 1.0F ) . build ( ) ) ; java . util . Set set = collectSet . getAggregate ( ) ; java . util . Set < java . lang . Float > expectedSet = com . google . common . collect . ImmutableSet . of ( 1.0F , 2.0F ) ; "<AssertPlaceHolder>" ; } getAggregate ( ) { return first ; }
org . junit . Assert . assertEquals ( expectedSet , set )
certV1Creation ( ) { java . security . KeyPair keyPair = org . ebayopensource . fido . uaf . crypto . KeyCodec . generate ( ) ; java . security . cert . X509Certificate x509Certificate = org . ebayopensource . fido . uaf . crypto . X509 . generateV1Cert ( keyPair ) ; "<AssertPlaceHolder>" ; logger . info ( ( "V1<sp>:<sp>" + ( x509Certificate . toString ( ) ) ) ) ; logger . info ( ( "Base64<sp>of<sp>DER<sp>encoding<sp>:<sp>" + ( org . apache . commons . codec . binary . Base64 . encodeBase64URLSafeString ( x509Certificate . getEncoded ( ) ) ) ) ) ; logger . info ( ( "Pub<sp>:<sp>" + ( org . apache . commons . codec . binary . Base64 . encodeBase64URLSafeString ( keyPair . getPublic ( ) . getEncoded ( ) ) ) ) ) ; logger . info ( ( "Priv<sp>:<sp>" + ( org . apache . commons . codec . binary . Base64 . encodeBase64URLSafeString ( keyPair . getPrivate ( ) . getEncoded ( ) ) ) ) ) ; }
org . junit . Assert . assertNotNull ( x509Certificate )
testPerson_When_ReadLimitedToken_EmptyElement ( ) { org . orcid . core . utils . SecurityContextTestUtils . setUpSecurityContext ( org . orcid . core . manager . ORCID_1 , org . orcid . core . manager . CLIENT_1 , ScopePathType . PERSON_READ_LIMITED ) ; org . orcid . jaxb . model . record_v2 . Person p = new org . orcid . jaxb . model . record_v2 . Person ( ) ; orcidSecurityManager . checkAndFilter ( org . orcid . core . manager . ORCID_1 , p ) ; "<AssertPlaceHolder>" ; } checkAndFilter ( java . lang . String , org . orcid . jaxb . model . v3 . release . record . Record ) { if ( record == null ) { return ; } isMyToken ( orcid ) ; if ( ( record . getActivitiesSummary ( ) ) != null ) { checkAndFilter ( orcid , record . getActivitiesSummary ( ) ) ; } if ( ( record . getPerson ( ) ) != null ) { checkAndFilter ( orcid , record . getPerson ( ) ) ; } }
org . junit . Assert . assertNotNull ( p )
loadStreamConfNullOverrides ( ) { org . apache . distributedlog . DistributedLogConfiguration conf = new org . apache . distributedlog . DistributedLogConfiguration ( ) ; org . apache . distributedlog . DistributedLogConfiguration confClone = new org . apache . distributedlog . DistributedLogConfiguration ( ) ; com . google . common . base . Optional < org . apache . distributedlog . DistributedLogConfiguration > streamConfiguration = com . google . common . base . Optional . absent ( ) ; conf . loadStreamConf ( streamConfiguration ) ; org . apache . commons . configuration . StrictConfigurationComparator comp = new org . apache . commons . configuration . StrictConfigurationComparator ( ) ; "<AssertPlaceHolder>" ; } compare ( java . lang . String , java . lang . String ) { int l1 = org . apache . distributedlog . lock . ZKSessionLock . parseMemberID ( o1 ) ; int l2 = org . apache . distributedlog . lock . ZKSessionLock . parseMemberID ( o2 ) ; return l1 - l2 ; }
org . junit . Assert . assertTrue ( comp . compare ( conf , confClone ) )
testARinheritance3HomozygousOnly ( ) { java . util . ArrayList < jannovar . exome . Variant > lst = new java . util . ArrayList < jannovar . exome . Variant > ( ) ; jannovar . exome . Variant mg1 = constructGenotypeCall ( Genotype . HETEROZYGOUS , Genotype . HETEROZYGOUS , Genotype . HETEROZYGOUS , Genotype . HETEROZYGOUS , Genotype . HETEROZYGOUS , Genotype . HETEROZYGOUS ) ; jannovar . exome . Variant mg2 = constructGenotypeCall ( Genotype . HETEROZYGOUS , Genotype . HETEROZYGOUS , Genotype . HETEROZYGOUS , Genotype . HETEROZYGOUS , Genotype . HETEROZYGOUS , Genotype . HOMOZYGOUS_ALT ) ; jannovar . exome . Variant mg3 = constructGenotypeCall ( Genotype . HETEROZYGOUS , Genotype . HETEROZYGOUS , Genotype . HOMOZYGOUS_ALT , Genotype . HETEROZYGOUS , Genotype . HOMOZYGOUS_ALT , Genotype . HOMOZYGOUS_REF ) ; lst . add ( mg1 ) ; lst . add ( mg2 ) ; lst . add ( mg3 ) ; boolean b = jannovar . pedigree . PedigreeARTest . pedigree . isCompatibleWithAutosomalRecessiveHomozygous ( lst ) ; "<AssertPlaceHolder>" ; } isCompatibleWithAutosomalRecessiveHomozygous ( java . util . ArrayList ) { if ( this . isSingleSample ) { for ( jannovar . exome . Variant v : varList ) { jannovar . genotype . GenotypeCall gc = v . getGenotype ( ) ; jannovar . common . Genotype g = gc . getGenotypeInIndividualN ( 0 ) ; if ( g == ( jannovar . common . Genotype . HOMOZYGOUS_ALT ) ) return true ; } return false ; return true ; } } return false ; }
org . junit . Assert . assertEquals ( true , b )
generateNewTeradataQuery ( ) { connection = ConnectionFactory . eINSTANCE . createConnection ( ) ; node = org . mockito . Mockito . mock ( org . talend . core . model . process . INode . class ) ; connection . setContextMode ( true ) ; org . talend . cwm . relational . TdTable table = RelationalFactory . eINSTANCE . createTdTable ( ) ; table . setName ( "tableName" ) ; table . setLabel ( "tableLabel" ) ; org . talend . cwm . relational . TdColumn column1 = RelationalFactory . eINSTANCE . createTdColumn ( ) ; column1 . setName ( "id" ) ; org . talend . cwm . relational . TdColumn column2 = RelationalFactory . eINSTANCE . createTdColumn ( ) ; column2 . setName ( "name" ) ; table . getColumns ( ) . add ( column1 ) ; table . getColumns ( ) . add ( column2 ) ; metadataTable = org . talend . core . model . metadata . builder . ConvertionHelper . convert ( table ) ; org . talend . designer . core . model . components . ElementParameter parameter = new org . talend . designer . core . model . components . ElementParameter ( node ) ; parameter . setName ( "tableLabel" 0 ) ; parameter . setValue ( table . getName ( ) ) ; org . mockito . Mockito . when ( node . getPropertyValue ( EParameterName . PROPERTY_TYPE . getName ( ) ) ) . thenReturn ( "REPOSITORY" ) ; org . mockito . Mockito . when ( node . getElementParameterFromField ( EParameterFieldType . DBTABLE ) ) . thenReturn ( parameter ) ; java . lang . String schema = "myschema" ; java . lang . String dbType = EDatabaseTypeName . TERADATA . getDisplayName ( ) ; java . lang . String expectedQuery = "\"SELECT<sp>myschema.tableName.\\\"id\\\",<sp>myschema.tableName.name<sp>FROM<sp>myschema.tableName\"" ; org . talend . designer . core . ui . editor . cmd . QueryGuessCommand command = new org . talend . designer . core . ui . editor . cmd . QueryGuessCommand ( node , metadataTable , schema , dbType , connection ) ; java . lang . reflect . Method method = command . getClass ( ) . getDeclaredMethod ( "generateNewQuery" ) ; method . setAccessible ( true ) ; java . lang . String queryString = ( ( java . lang . String ) ( method . invoke ( command ) ) ) ; "<AssertPlaceHolder>" ; } invoke ( org . apache . axis2 . context . MessageContext ) { org . apache . axiom . soap . SOAPHeader header = msgContext . getEnvelope ( ) . getHeader ( ) ; if ( header != null ) { java . util . Iterator < ? > blocks = header . examineAllHeaderBlocks ( ) ; while ( blocks . hasNext ( ) ) { org . apache . axiom . soap . SOAPHeaderBlock block = ( ( org . apache . axiom . soap . SOAPHeaderBlock ) ( blocks . next ( ) ) ) ; if ( block != null ) { if ( block . getLocalName ( ) . equals ( "Security" ) ) { block . setProcessed ( ) ; } } } } return InvocationResponse . CONTINUE ; }
org . junit . Assert . assertEquals ( expectedQuery , queryString )
createEventBusMonitor ( ) { org . axonframework . monitoring . MessageMonitor < ? super org . axonframework . eventhandling . EventMessage < ? > > monitor = subject . registerEventBus ( "eventBus" ) ; monitor . onMessageIngested ( asEventMessage ( "test" ) ) . reportSuccess ( ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; com . codahale . metrics . ConsoleReporter . forRegistry ( dropWizardRegistry ) . outputTo ( new java . io . PrintStream ( out ) ) . build ( ) . report ( ) ; java . lang . String output = new java . lang . String ( out . toByteArray ( ) ) ; "<AssertPlaceHolder>" ; } contains ( org . axonframework . modelling . saga . AssociationValue ) { return values . contains ( associationValue ) ; }
org . junit . Assert . assertTrue ( output . contains ( "eventBus" ) )
testRemoveBindingNotFoundReadNext ( ) { com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . store . setBinding ( txn , "b" , 200 ) ; newTransaction ( ) ; com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . store . getBinding ( txn , "b" ) ; com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . Runner runner = new com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . Runner ( new com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . RemoveBinding ( "a" ) ) ; "<AssertPlaceHolder>" ; } getResult ( ) { if ( ! ( done ) ) { throw new java . lang . IllegalStateException ( "not<sp>done" ) ; } return result ; }
org . junit . Assert . assertFalse ( ( ( java . lang . Boolean ) ( runner . getResult ( ) ) ) )
testListbyNameNone ( ) { java . util . List < uk . ac . bbsrc . tgac . miso . core . data . InstrumentModel > platforms = dao . listByPlatformType ( "Futurism" ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , platforms . size ( ) )
testUpdateConfigsWithModifyOperation ( ) { expect ( mockK8sApiConfigAdminService . apiConfig ( anyString ( ) ) ) . andReturn ( k8sApiConfig ) . once ( ) ; mockK8sApiConfigAdminService . updateApiConfig ( anyObject ( ) ) ; replay ( mockK8sApiConfigAdminService ) ; final javax . ws . rs . client . WebTarget wt = target ( ) ; java . io . InputStream jsonStream = org . onosproject . k8snode . web . K8sNodeWebResourceTest . class . getResourceAsStream ( "k8s-api-config.json" ) ; javax . ws . rs . core . Response response = wt . path ( org . onosproject . k8snode . web . K8sNodeWebResourceTest . API_PATH ) . request ( MediaType . APPLICATION_JSON_TYPE ) . put ( javax . ws . rs . client . Entity . json ( jsonStream ) ) ; final int status = response . getStatus ( ) ; "<AssertPlaceHolder>" ; verify ( mockK8sApiConfigAdminService ) ; } is ( java . lang . Class ) { return true ; }
org . junit . Assert . assertThat ( status , org . hamcrest . Matchers . is ( 200 ) )
testValidateAssignmentWithFunctionOnParameter_InServer ( ) { java . lang . String sql = "EXEC<sp>pm1.vsp36(5)" ; org . teiid . query . metadata . QueryMetadataInterface metadata = org . teiid . query . unittest . RealMetadataFactory . example1Cached ( ) ; org . teiid . query . sql . lang . Command command = new org . teiid . query . parser . QueryParser ( ) . parseCommand ( sql ) ; org . teiid . query . resolver . QueryResolver . resolveCommand ( command , metadata ) ; org . teiid . query . validator . ValidatorReport report = org . teiid . query . validator . Validator . validate ( command , metadata ) ; "<AssertPlaceHolder>" ; } getItems ( ) { return items ; }
org . junit . Assert . assertEquals ( 0 , report . getItems ( ) . size ( ) )
get_NotExisting ( ) { java . lang . Long existingKey = java . lang . System . currentTimeMillis ( ) ; java . lang . String existingValue = "value" + existingKey ; cache . put ( existingKey , existingValue ) ; java . lang . Long key1 = existingKey + 1 ; "<AssertPlaceHolder>" ; } get ( K ) { return writtenKeys . get ( key ) ; }
org . junit . Assert . assertNull ( cache . get ( key1 ) )
AccessClassVariableConstant ( ) { java . lang . String fromClass = "Domain.Direct.Violating.AccessClassVariableConstant" ; java . lang . String toClass = "Technology.Direct.Dao.UserDAO" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typesToFind . add ( "Access" ) ; "<AssertPlaceHolder>" ; } areDependencyTypesDetected ( java . lang . String , java . lang . String , java . util . ArrayList , boolean ) { return areDependencyTypesDetected ( classFrom , classTo , dependencyTypes , "" , isIndirect ) ; }
org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) )
testDateRangeQuery1 ( ) { lemongrenade . core . database . mongo . Calendar calStart = lemongrenade . core . database . mongo . GregorianCalendar . getInstance ( ) ; calStart . add ( Calendar . DAY_OF_YEAR , ( - 26 ) ) ; lemongrenade . core . database . mongo . Calendar calEnd = lemongrenade . core . database . mongo . GregorianCalendar . getInstance ( ) ; calEnd . add ( Calendar . DAY_OF_YEAR , ( - 30 ) ) ; lemongrenade . core . database . mongo . Date startUtc = new org . apache . storm . shade . org . joda . time . DateTime ( calStart . getTimeInMillis ( ) , org . apache . storm . shade . org . joda . time . DateTimeZone . UTC ) . toDate ( ) ; lemongrenade . core . database . mongo . Date endUtc = new org . apache . storm . shade . org . joda . time . DateTime ( calEnd . getTimeInMillis ( ) , org . apache . storm . shade . org . joda . time . DateTimeZone . UTC ) . toDate ( ) ; System . out . println ( ( "<sp>***<sp>" + ( startUtc . toString ( ) ) ) ) ; System . out . println ( ( "<sp>***<sp>" + ( endUtc . toString ( ) ) ) ) ; lemongrenade . core . database . mongo . List < lemongrenade . core . models . LGJob > jobs1 = lemongrenade . core . database . mongo . LGJobDAOImplTest . dao . getAllByDateRange ( startUtc , endUtc ) ; System . out . println ( ( "Number<sp>of<sp>Jobs<sp>returned<sp>" + ( jobs1 . size ( ) ) ) ) ; for ( lemongrenade . core . models . LGJob job : jobs1 ) { System . out . println ( ( "<sp>:" + ( job . getCreateDate ( ) ) ) ) ; } "<AssertPlaceHolder>" ; } lookInList ( lemongrenade . core . database . mongo . List , java . lang . String ) { for ( lemongrenade . core . models . LGJob job : jobs ) { if ( job . getJobId ( ) . equals ( jobId ) ) { return true ; } } return false ; }
org . junit . Assert . assertFalse ( lookInList ( jobs1 , j . getJobId ( ) ) )
testIncludedDataEnabledTroughSettings ( ) { converter . disableSerializationOption ( SerializationFeature . INCLUDE_RELATIONSHIP_ATTRIBUTES ) ; com . github . jasminb . jsonapi . JSONAPIDocument < com . github . jasminb . jsonapi . models . User > document = createDocument ( createUser ( ) ) ; com . github . jasminb . jsonapi . SerializationSettings serializationSettings = new com . github . jasminb . jsonapi . SerializationSettings . Builder ( ) . includeRelationship ( "statuses" ) . build ( ) ; com . github . jasminb . jsonapi . JSONAPIDocument < com . github . jasminb . jsonapi . models . User > convertedBack = converter . readDocument ( converter . writeDocument ( document , serializationSettings ) , com . github . jasminb . jsonapi . models . User . class ) ; com . github . jasminb . jsonapi . models . Status status = convertedBack . get ( ) . getStatuses ( ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } getContent ( ) { return content ; }
org . junit . Assert . assertNotNull ( status . getContent ( ) )
shouldConcatNoneAndNoneToNone ( ) { "<AssertPlaceHolder>" ; } none ( ) { return org . dcache . pool . assumption . Assumptions . UNRESTRICTED ; }
org . junit . Assert . assertThat ( org . dcache . pool . assumption . Assumptions . none ( ) . and ( org . dcache . pool . assumption . Assumptions . none ( ) ) , org . hamcrest . CoreMatchers . is ( org . dcache . pool . assumption . Assumptions . none ( ) ) )
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . wiki . model . WikiPage . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "pageId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "pageId" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
testCheckDirString ( ) { java . lang . String ret = datawave . common . io . Files . checkDir ( "file" ) ; "<AssertPlaceHolder>" ; } checkDir ( java . lang . String ) { return datawave . common . io . Files . checkDir ( dir , false ) ; }
org . junit . Assert . assertNull ( ret )
testComp_VEVENT ( ) { try { com . github . caldav4j . util . GenerateQueryTest . log . info ( "Comp:<sp>VEVENT" ) ; com . github . caldav4j . util . GenerateQuery gq = new com . github . caldav4j . util . GenerateQuery ( ) ; gq . setComponent ( Component . VEVENT ) ; com . github . caldav4j . util . GenerateQueryTest . log . info ( ( "Set<sp>component:\n" + ( printQuery ( gq . generate ( ) ) ) ) ) ; final java . lang . String VEVENT_PROPERTIES_BY_TIMERANGE_F = "20060105T235900Z" 1 ; final java . lang . String VEVENT_PROPERTIES_BY_TIMERANGE_C = "VEVENT<sp>:<sp>SUMMARY,UID,DTSTART,DTEND,RRULE,RDATE,DURATION,EXRULE,EXDATE,RECURRENCE-ID" ; gq = new com . github . caldav4j . util . GenerateQuery ( VEVENT_PROPERTIES_BY_TIMERANGE_C , VEVENT_PROPERTIES_BY_TIMERANGE_F ) ; com . github . caldav4j . util . GenerateQueryTest . log . info ( ( "Constructor:\n" + ( printQuery ( gq . generate ( ) ) ) ) ) ; com . github . caldav4j . util . CalendarQuery query = gq . generate ( ) ; com . github . caldav4j . util . Comp compVtimezone = new com . github . caldav4j . util . Comp ( ) ; compVtimezone . setName ( Component . VTIMEZONE ) ; query . getCalendarDataProp ( ) . getComp ( ) . getComps ( ) . add ( compVtimezone ) ; com . github . caldav4j . util . GenerateQueryTest . log . info ( ( "20060105T235900Z" 0 + ( printQuery ( query ) ) ) ) ; gq . setNoCalendarData ( true ) ; com . github . caldav4j . util . GenerateQueryTest . log . info ( ( "no<sp>calendar-data:\n" + ( printQuery ( gq . generate ( ) ) ) ) ) ; gq . setNoCalendarData ( false ) ; gq . setRecurrenceSet ( "20060101T170000Z" , "20060105T235900Z" , CalendarData . EXPAND ) ; com . github . caldav4j . util . GenerateQueryTest . log . info ( ( "limit-recurrence-set:\n" + ( printQuery ( gq . generate ( ) ) ) ) ) ; } catch ( com . github . caldav4j . exceptions . CalDAV4JException e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } } generate ( ) { com . github . caldav4j . util . CalendarQuery query = new com . github . caldav4j . util . CalendarQuery ( ) ; query . addProperty ( CalDAVConstants . DNAME_GETETAG ) ; if ( allProp ) { query . addProperty ( CalDAVConstants . DNAME_ALLPROP ) ; } if ( ! ( noCalendarData ) ) { com . github . caldav4j . util . CalendarData calendarData = new com . github . caldav4j . util . CalendarData ( ) ; if ( ( ( recurrenceSetEnd ) != null ) || ( ( recurrenceSetStart ) != null ) ) { calendarData . setExpandOrLimitRecurrenceSet ( expandOrLimit ) ; calendarData . setRecurrenceSetStart ( recurrenceSetStart ) ; calendarData . setRecurrenceSetEnd ( recurrenceSetEnd ) ; } calendarData . setComp ( getComp ( ) ) ; query . setCalendarDataProp ( calendarData ) ; } else { if ( ( ( this . recurrenceSetEnd ) != null ) || ( ( this . recurrenceSetStart ) != null ) ) { throw new com . github . caldav4j . exceptions . CalDAV4JProtocolException ( "Bad<sp>query:<sp>you<sp>set<sp>noCalendarData<sp>but<sp>you<sp>have<sp>limit-recurrence-set" ) ; } } query . setCompFilter ( getFilter ( ) ) ; query . validate ( ) ; return query ; }
org . junit . Assert . assertTrue ( false )
findOldestUserAssignmentForPeriod_NoAssignment ( ) { java . util . List < org . oscm . billingservice . business . calculation . revenue . model . UserAssignment > userAssignments = new java . util . ArrayList < org . oscm . billingservice . business . calculation . revenue . model . UserAssignment > ( ) ; org . oscm . billingservice . business . calculation . revenue . model . UserAssignment result = calculator . findOldestUserAssignmentForPeriod ( userAssignments , org . oscm . test . DateTimeHandling . calculateMillis ( "2013-04-05<sp>00:00:00" ) , org . oscm . test . DateTimeHandling . calculateMillis ( "2013-04-10<sp>00:00:00" ) ) ; "<AssertPlaceHolder>" ; } calculateMillis ( java . lang . String ) { return org . oscm . test . DateTimeHandling . parseToCalendar ( dateSource ) . getTimeInMillis ( ) ; }
org . junit . Assert . assertNull ( result )
writesStreamingOutputToOutputStream ( ) { javax . ws . rs . core . StreamingOutput streamingOutput = mock ( javax . ws . rs . core . StreamingOutput . class ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; byte [ ] streamingOutputContent = "streaming<sp>output" . getBytes ( ) ; doAnswer ( ( invocation ) -> { out . write ( streamingOutputContent ) ; return null ; } ) . when ( streamingOutput ) . write ( out ) ; streamOutputEntityProvider . writeTo ( streamingOutput , java . lang . String . class , null , null , null , new javax . ws . rs . core . MultivaluedHashMap ( ) , out ) ; "<AssertPlaceHolder>" ; } toByteArray ( ) { byte [ ] newBuf = new byte [ count ] ; java . lang . System . arraycopy ( buf , 0 , newBuf , 0 , count ) ; return newBuf ; }
org . junit . Assert . assertArrayEquals ( streamingOutputContent , out . toByteArray ( ) )
shouldAddTermsFromRedisOnZrevrangebyscoreCommandWithCustomRange ( ) { when ( localParamsMock . get ( "command" ) ) . thenReturn ( "command" 0 ) ; when ( localParamsMock . get ( "key" ) ) . thenReturn ( "simpleKey" ) ; when ( localParamsMock . get ( "min" ) ) . thenReturn ( "1" ) ; when ( localParamsMock . get ( "max" ) ) . thenReturn ( "100" ) ; when ( localParamsMock . get ( QueryParsing . V ) ) . thenReturn ( "string_field" ) ; when ( jedisMock . zrevrangeByScoreWithScores ( anyString ( ) , anyString ( ) , anyString ( ) ) ) . thenReturn ( new com . sematext . solr . redis . HashSet ( com . sematext . solr . redis . Arrays . asList ( new redis . clients . jedis . Tuple ( "123" , ( ( double ) ( 1.0F ) ) ) , new redis . clients . jedis . Tuple ( "321" , ( ( double ) ( 1.0F ) ) ) ) ) ) ; when ( requestMock . getSchema ( ) ) . thenReturn ( schema ) ; when ( schema . getQueryAnalyzer ( ) ) . thenReturn ( new org . apache . lucene . analysis . standard . StandardAnalyzer ( ) ) ; redisQParser = new com . sematext . solr . redis . RedisQParser ( "string_field" , localParamsMock , paramsMock , requestMock , commandHandler ) ; final org . apache . lucene . search . Query query = redisQParser . parse ( ) ; verify ( jedisMock ) . zrevrangeByScoreWithScores ( "simpleKey" , "100" , "1" ) ; org . apache . lucene . search . IndexSearcher searcher = new org . apache . lucene . search . IndexSearcher ( new org . apache . lucene . index . MultiReader ( ) ) ; final com . sematext . solr . redis . Set < org . apache . lucene . index . Term > terms = com . sematext . solr . redis . TestRedisQParser . extractTerms ( searcher , query ) ; "<AssertPlaceHolder>" ; } extractTerms ( org . apache . lucene . search . IndexSearcher , org . apache . lucene . search . Query ) { final com . sematext . solr . redis . Set < org . apache . lucene . index . Term > terms = new com . sematext . solr . redis . HashSet ( ) ; org . apache . lucene . search . Query rewrittenQuery = searcher . rewrite ( query ) ; if ( rewrittenQuery instanceof org . apache . lucene . search . ConstantScoreQuery ) { org . apache . lucene . search . ConstantScoreQuery constantScoreQuery = ( ( org . apache . lucene . search . ConstantScoreQuery ) ( rewrittenQuery ) ) ; rewrittenQuery = constantScoreQuery . getQuery ( ) ; } searcher . createNormalizedWeight ( rewrittenQuery , true ) . extractTerms ( terms ) ; return terms ; }
org . junit . Assert . assertEquals ( 2 , terms . size ( ) )
testFileResourceGetChildReturnsNull ( ) { java . io . File file = java . io . File . createTempFile ( "fileresourcetest" , ".tmp" ) ; file . deleteOnExit ( ) ; org . jboss . forge . addon . resource . FileResource < ? > fileResource = resourceFactory . create ( org . jboss . forge . addon . resource . FileResource . class , file ) ; "<AssertPlaceHolder>" ; } getChild ( java . lang . String ) { return null ; }
org . junit . Assert . assertNull ( fileResource . getChild ( "foo" ) )
properlyBuildsCommand ( ) { util . CommandBuilder cb = new util . CommandBuilder ( ) ; cb . setCommand ( "wow" ) . addParam ( "--foo" , "v1" ) . addParam ( "--bar" ) . addParam ( "--baz" , 123 ) ; java . lang . String [ ] expectedParams = new java . lang . String [ ] { "wow" , "--foo" , "v1" , "--bar" , "--baz" , "123" } ; "<AssertPlaceHolder>" ; } build ( ) { java . util . ArrayList < java . lang . String > commandParts = new java . util . ArrayList ( ) ; commandParts . add ( command ) ; for ( Map . Entry < java . lang . String , java . lang . String > entry : paramsMap . entrySet ( ) ) { java . lang . String name = entry . getKey ( ) ; java . lang . String value = entry . getValue ( ) ; if ( value != null ) { commandParts . add ( name ) ; commandParts . add ( value ) ; } else { commandParts . add ( name ) ; } } return commandParts . toArray ( new java . lang . String [ commandParts . size ( ) ] ) ; }
org . junit . Assert . assertArrayEquals ( expectedParams , cb . build ( ) )
testNotEmptyCollectionWithParameterNull ( ) { com . twelvemonkeys . lang . Set < java . lang . Byte > collection = com . twelvemonkeys . lang . Collections . singleton ( ( ( byte ) ( 1 ) ) ) ; "<AssertPlaceHolder>" ; } notEmpty ( T extends com . twelvemonkeys . lang . CharSequence , java . lang . String ) { if ( ( ( pParameter == null ) || ( ( pParameter . length ( ) ) == 0 ) ) || ( com . twelvemonkeys . lang . Validate . isOnlyWhiteSpace ( pParameter ) ) ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "%s<sp>may<sp>not<sp>be<sp>blank" , ( pParamName == null ? com . twelvemonkeys . lang . Validate . UNSPECIFIED_PARAM_NAME : pParamName ) ) ) ; } return pParameter ; }
org . junit . Assert . assertSame ( collection , com . twelvemonkeys . lang . Validate . notEmpty ( collection , null ) )
testBitwiseOrIntegerLong ( ) { long expected = 7L ; long actual = cFunction . bitwiseOr ( 5 , 3L ) ; "<AssertPlaceHolder>" ; } bitwiseOr ( java . lang . Integer , java . lang . Long ) { return l1 | l2 ; }
org . junit . Assert . assertEquals ( expected , actual )
test12 ( ) { java . lang . String usuario = "Teste1" ; java . lang . String operacao = "Teste2" ; java . lang . String recurso = "Teste3" ; java . lang . String expResult = "O<sp>usurio<sp>no<sp>possui<sp>permisso<sp>para<sp>executar<sp>a<sp>ao<sp>Teste1<sp>no<sp>recurso<sp>Teste2" ; java . lang . String result = instance . accessDenied ( usuario , operacao , recurso ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expResult , result )
testGetParametersWithDefaultEntityAndDisabledDefaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . street . type . StreetType entity = new org . lnu . is . domain . street . type . StreetType ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
testIsGuidedDecisionTableEditableWhenDecisionTableIsNotEditable ( ) { final org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTableView . Presenter dtPresenter = mock ( GuidedDecisionTableView . Presenter . class ) ; final org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTablePresenter . Access access = mock ( GuidedDecisionTablePresenter . Access . class ) ; doReturn ( access ) . when ( dtPresenter ) . getAccess ( ) ; doReturn ( true ) . when ( access ) . isReadOnly ( ) ; doReturn ( true ) . when ( access ) . hasEditableColumns ( ) ; final boolean isGuidedDecisionTableEditable = presenter . isGuidedDecisionTableEditable ( dtPresenter ) ; "<AssertPlaceHolder>" ; } isGuidedDecisionTableEditable ( org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTableView$Presenter ) { final org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTablePresenter . Access access = decisionTablePresenter . getAccess ( ) ; final boolean decisionTableIsEditable = ! ( access . isReadOnly ( ) ) ; final boolean decisionTableHasEditableColumns = access . hasEditableColumns ( ) ; return decisionTableIsEditable && decisionTableHasEditableColumns ; }
org . junit . Assert . assertFalse ( isGuidedDecisionTableEditable )
shouldFindNextCharacterAfterOpenBracket ( ) { int position = edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . indexOfWord ( "xx(x" , 1 ) ; "<AssertPlaceHolder>" ; } indexOfWord ( java . lang . String , int ) { checkNotNull ( entityName , "Input<sp>string<sp>must<sp>not<sp>be<sp>null" ) ; int length = entityName . length ( ) ; checkElementIndex ( startIndex , length ) ; for ( int index = startIndex ; index < length ; index ++ ) { if ( edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . isWordStart ( entityName , index ) ) { return index ; } } return - 1 ; }
org . junit . Assert . assertEquals ( 3 , position )
shouldDefaultToSingletonGraph ( ) { final uk . gov . gchq . gaffer . rest . factory . DefaultGraphFactory factory = new uk . gov . gchq . gaffer . rest . factory . DefaultGraphFactory ( ) ; final boolean isSingleton = factory . isSingletonGraph ( ) ; "<AssertPlaceHolder>" ; } isSingletonGraph ( ) { return singletonGraph ; }
org . junit . Assert . assertTrue ( isSingleton )
getSetLastModified ( ) { java . util . Date expected = new java . util . Date ( ) ; com . microsoft . windowsazure . services . media . models . AccessPolicyInfo policy = new com . microsoft . windowsazure . services . media . models . AccessPolicyInfo ( null , new com . microsoft . windowsazure . services . media . implementation . content . AccessPolicyType ( ) . setLastModified ( expected ) ) ; java . util . Date actual = policy . getLastModified ( ) ; "<AssertPlaceHolder>" ; } getLastModified ( ) { return lastModified ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldParseIsoDateWithZuluTimeZone ( ) { java . util . Date date = now ( ) ; value = JsonReader . DATE_VALUE_MATCHER . parseValue ( org . modeshape . schematic . document . Bson . getDateFormatter ( ) . format ( date ) ) ; "<AssertPlaceHolder>" ; } getDateFormatter ( ) { java . lang . ref . SoftReference < java . text . DateFormat > ref = org . modeshape . schematic . document . Bson . dateFormatter . get ( ) ; java . text . DateFormat formatter = ( ref != null ) ? ref . get ( ) : null ; if ( formatter == null ) { formatter = new java . text . SimpleDateFormat ( org . modeshape . schematic . document . Bson . DATE_FORMAT ) ; formatter . setCalendar ( new java . util . GregorianCalendar ( new java . util . SimpleTimeZone ( 0 , "GMT" ) ) ) ; org . modeshape . schematic . document . Bson . dateFormatter . set ( new java . lang . ref . SoftReference < java . text . DateFormat > ( formatter ) ) ; } return formatter ; }
org . junit . Assert . assertTrue ( ( ( value ) instanceof java . util . Date ) )
testSerialization ( ) { org . jfree . chart . renderer . xy . StandardXYItemRenderer r1 = new org . jfree . chart . renderer . xy . StandardXYItemRenderer ( ) ; org . jfree . chart . renderer . xy . StandardXYItemRenderer r2 = ( ( org . jfree . chart . renderer . xy . StandardXYItemRenderer ) ( org . jfree . chart . TestUtilities . serialised ( r1 ) ) ) ; "<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 ( r1 , r2 )
areSame_sameInstance ( ) { final java . net . URI uri = java . net . URI . create ( "http://one.example.com" ) ; "<AssertPlaceHolder>" ; } areSame ( java . net . URI , java . net . URI ) { if ( a == null ) { return b == null ; } if ( b == null ) { return false ; } if ( ! ( hudson . plugins . tfs . util . StringHelper . equalIgnoringCase ( a . getScheme ( ) , b . getScheme ( ) ) ) ) { return false ; } if ( ! ( hudson . plugins . tfs . util . StringHelper . equalIgnoringCase ( a . getHost ( ) , b . getHost ( ) ) ) ) { return false ; } final int aPort = hudson . plugins . tfs . util . UriHelper . normalizePort ( a ) ; final int bPort = hudson . plugins . tfs . util . UriHelper . normalizePort ( b ) ; if ( aPort != bPort ) { return false ; } final java . lang . String aPath = hudson . plugins . tfs . util . UriHelper . normalizePath ( a ) ; final java . lang . String bPath = hudson . plugins . tfs . util . UriHelper . normalizePath ( b ) ; if ( ! ( hudson . plugins . tfs . util . StringHelper . equal ( aPath , bPath ) ) ) { return false ; } if ( ! ( hudson . plugins . tfs . util . StringHelper . equal ( a . getQuery ( ) , b . getQuery ( ) ) ) ) { return false ; } if ( ! ( hudson . plugins . tfs . util . StringHelper . equal ( a . getFragment ( ) , b . getFragment ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( hudson . plugins . tfs . util . UriHelper . areSame ( uri , uri ) )
shouldReturnFalseIfIsReasonNeededWhenChangingStateToInterrupted ( ) { com . qcadoo . model . api . Entity parameter = mock ( com . qcadoo . model . api . Entity . class ) ; given ( parameterService . getParameter ( ) ) . willReturn ( parameter ) ; given ( parameter . getBooleanField ( com . qcadoo . mes . orders . REASON_NEEDED_WHEN_CHANGING_STATE_TO_INTERRUPTED ) ) . willReturn ( false ) ; boolean result = orderStateChangeReasonService . neededForInterrupt ( ) ; "<AssertPlaceHolder>" ; } neededForInterrupt ( ) { return parameterService . getParameter ( ) . getBooleanField ( com . qcadoo . mes . orders . REASON_NEEDED_WHEN_CHANGING_STATE_TO_INTERRUPTED ) ; }
org . junit . Assert . assertFalse ( result )
extractSysType ( ) { java . util . Map < java . lang . String , java . lang . Object > typeDef = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; try { org . searchisko . api . service . ProviderService . extractSysType ( typeDef , org . searchisko . api . service . ProviderServiceTest . TEST_TYPE_NAME ) ; org . junit . Assert . fail ( "SettingsException<sp>expected" ) ; } catch ( org . elasticsearch . common . settings . SettingsException e ) { } typeDef . put ( ProviderService . SYS_TYPE , "" ) ; try { org . searchisko . api . service . ProviderService . extractSysType ( typeDef , org . searchisko . api . service . ProviderServiceTest . TEST_TYPE_NAME ) ; org . junit . Assert . fail ( "SettingsException<sp>expected" ) ; } catch ( org . elasticsearch . common . settings . SettingsException e ) { } typeDef . put ( ProviderService . SYS_TYPE , "<sp>" ) ; try { org . searchisko . api . service . ProviderService . extractSysType ( typeDef , org . searchisko . api . service . ProviderServiceTest . TEST_TYPE_NAME ) ; org . junit . Assert . fail ( "SettingsException<sp>expected" ) ; } catch ( org . elasticsearch . common . settings . SettingsException e ) { } typeDef . put ( ProviderService . SYS_TYPE , "mysystype" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { java . security . Principal principal = securityContext . getUserPrincipal ( ) ; if ( principal == null ) { return super . getFiltered ( id , fieldsToRemove ) ; } else { return super . get ( id ) ; } }
org . junit . Assert . assertEquals ( typeDef . get ( ProviderService . SYS_TYPE ) , org . searchisko . api . service . ProviderService . extractSysType ( typeDef , org . searchisko . api . service . ProviderServiceTest . TEST_TYPE_NAME ) )
testDataPointsRecoveryPTR ( ) { long ts = java . lang . System . currentTimeMillis ( ) ; java . util . List < com . srotya . sidewinder . core . rpc . Tag > tags = java . util . Arrays . asList ( com . srotya . sidewinder . core . rpc . Tag . newBuilder ( ) . setTagKey ( "test" ) . setTagValue ( "1" ) . build ( ) , com . srotya . sidewinder . core . rpc . Tag . newBuilder ( ) . setTagKey ( "test" ) . setTagValue ( "2" ) . build ( ) ) ; java . util . Map < java . lang . String , java . lang . String > conf = new java . util . HashMap ( ) ; conf . put ( DiskMalloc . CONF_MEASUREMENT_FILE_MAX , java . lang . String . valueOf ( ( ( 2 * 1024 ) * 1024 ) ) ) ; conf . put ( "malloc.ptrfile.increment" , java . lang . String . valueOf ( ( 2 * 1024 ) ) ) ; measurement . configure ( conf , null , 4096 , com . srotya . sidewinder . core . storage . disk . TestPersistentMeasurement . DBNAME , "m1" , indexDir , dataDir , metadata , com . srotya . sidewinder . core . storage . disk . TestPersistentMeasurement . bgTaskPool ) ; int LIMIT = 100 ; for ( int i = 0 ; i < LIMIT ; i ++ ) { measurement . addPointWithLocking ( com . srotya . sidewinder . core . utils . MiscUtils . buildDataPoint ( com . srotya . sidewinder . core . storage . disk . TestPersistentMeasurement . DBNAME , "m1" , ( "value" + i ) , tags , ts , 1L ) , true ) ; } measurement . close ( ) ; measurement . configure ( conf , null , 4096 , com . srotya . sidewinder . core . storage . disk . TestPersistentMeasurement . DBNAME , "m1" , indexDir , dataDir , metadata , com . srotya . sidewinder . core . storage . disk . TestPersistentMeasurement . bgTaskPool ) ; java . util . List < com . srotya . sidewinder . core . storage . SeriesOutput > resultMap = new java . util . ArrayList ( ) ; measurement . queryDataPoints ( "value.*" , ts , ( ts + 1000 ) , null , null , resultMap , null ) ; "<AssertPlaceHolder>" ; measurement . close ( ) ; } configure ( java . util . Map , com . srotya . sidewinder . core . storage . StorageEngine , int , java . lang . String , java . lang . String , java . lang . String , java . lang . String , com . srotya . sidewinder . core . storage . DBMetadata , java . util . concurrent . ScheduledExecutorService ) { com . srotya . sidewinder . core . monitoring . MetricsRegistryService reg = null ; if ( ( engine == null ) || ( bgTaskPool == null ) ) { enableMetricsCapture = false ; } else { reg = com . srotya . sidewinder . core . monitoring . MetricsRegistryService . getInstance ( engine , bgTaskPool ) ; com . codahale . metrics . MetricRegistry metaops = reg . getInstance ( "metaops" ) ; metricsTimeSeriesCounter = metaops . counter ( "timeseries-counter" ) ; metricsCompactionCounter = metaops . counter ( "compaction-counter" ) ; metricsCleanupBufferCounter = metaops . counter ( "cleanbuf-counter" ) ; enableMetricsCapture = true ; } this . conf = conf ; this . timeBucketSize = defaultTimeBucketSize ; this . dbName = dbName ; this . measurementName = measurementName ; this . fieldCache = com . srotya . sidewinder . core . storage . ByteString . ByteStringCache . instance ( ) ; this . metadata = metadata ; this . seriesList = new java . util . ArrayList ( 10000 ) ; this . tagIndex = new com . srotya . sidewinder . core . storage . mem . MemTagIndex ( ) ; tagIndex . configure ( getConf ( ) , null , this ) ; this . seriesMap = new java . util . concurrent . ConcurrentHashMap ( ) ; this . fieldTypeMap = new java . util . concurrent . ConcurrentSkipListMap ( ) ; this . retentionBuckets = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; setRetentionHours ( metadata . getRetentionHours ( ) ) ; this . useQueryPool = java . lang . Boolean . parseBoolean ( conf . getOrDefault ( com . srotya . sidewinder . core . storage . mem . USE_QUERY_POOL , "true" ) ) ; this . malloc = new com . srotya . sidewinder . core . storage . mem . MemMalloc ( ) ; this . malloc . configure ( conf , dataDirectory , measurementName , engine , bgTaskPool , lock ) ; }
org . junit . Assert . assertEquals ( LIMIT , resultMap . size ( ) )
testDefaultFormatVector3D ( ) { java . util . Locale defaultLocal = java . util . Locale . getDefault ( ) ; java . util . Locale . setDefault ( getLocale ( ) ) ; org . apache . commons . math4 . geometry . euclidean . threed . Cartesian3D c = new org . apache . commons . math4 . geometry . euclidean . threed . Cartesian3D ( 232.22222222222 , ( - 342.3333333333 ) , 432.44444444444 ) ; java . lang . String expected = ( ( ( ( ( "{232" + ( getDecimalCharacter ( ) ) ) + "2222222222;<sp>-342" ) + ( getDecimalCharacter ( ) ) ) + "3333333333;<sp>432" ) + ( getDecimalCharacter ( ) ) ) + "4444444444}" ; java . lang . String actual = new org . apache . commons . math4 . geometry . euclidean . threed . Vector3DFormat ( ) . format ( c ) ; "<AssertPlaceHolder>" ; java . util . Locale . setDefault ( defaultLocal ) ; } format ( double ) { if ( d != d ) { return "Double.NaN," ; } else { return ( ( d >= 0 ? "+" : "" ) + ( java . lang . Double . toString ( d ) ) ) + "d," ; } }
org . junit . Assert . assertEquals ( expected , actual )
allMatch ( ) { org . mule . runtime . api . message . ErrorType mockErrorType = mock ( org . mule . runtime . api . message . ErrorType . class ) ; when ( mockErrorType . getParentErrorType ( ) ) . thenReturn ( transformationErrorType ) ; org . mule . runtime . core . api . exception . ErrorTypeMatcher matcherWithTwoTransformation = createMatcher ( transformationErrorType , mockErrorType ) ; "<AssertPlaceHolder>" ; } match ( org . mule . runtime . api . message . ErrorType ) { return errorTypeMatchers . stream ( ) . anyMatch ( ( errorTypeMatcher ) -> errorTypeMatcher . match ( errorType ) ) ; }
org . junit . Assert . assertThat ( matcherWithTwoTransformation . match ( mockErrorType ) , org . hamcrest . Matchers . is ( true ) )
shouldChangeStartTime ( ) { java . time . LocalTime time = entry . getStartTime ( ) . plusHours ( 1 ) ; entry . changeStartTime ( time ) ; "<AssertPlaceHolder>" ; } getStartTime ( ) { return ( startTime ) == null ? _startTime : startTime . get ( ) ; }
org . junit . Assert . assertThat ( entry . getStartTime ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( time ) ) )
testCopyWithoutTargetDirectory ( ) { final org . uberfire . backend . vfs . Path expectedPath = mock ( org . uberfire . backend . vfs . Path . class ) ; doReturn ( expectedPath ) . when ( copyService ) . copy ( path , newFileName , comment ) ; final org . uberfire . backend . vfs . Path actualPath = htmlEditorService . copy ( path , newFileName , comment ) ; verify ( copyService ) . copy ( path , newFileName , comment ) ; "<AssertPlaceHolder>" ; } copy ( org . uberfire . backend . vfs . Path , java . lang . String , java . lang . String ) { org . dashbuilder . dataset . def . DataSetDef def = dataSetDefRegistry . loadDataSetDef ( path ) ; if ( def == null ) { throw exceptionManager . handleException ( new java . lang . Exception ( ( "Data<sp>set<sp>definition<sp>not<sp>found:<sp>" + ( path . getFileName ( ) ) ) ) ) ; } org . dashbuilder . dataset . def . DataSetDef clone = dataSetDefRegistry . copyDataSetDef ( def , newName , ( ( identity ) != null ? identity . getIdentifier ( ) : org . dashbuilder . dataset . service . DataSetDefVfsServicesImpl . SYSTEM ) , commitMessage ) ; return dataSetDefRegistry . resolveVfsPath ( clone ) ; }
org . junit . Assert . assertEquals ( expectedPath , actualPath )
testWindowDefnEquivalent ( ) { java . lang . String sqlText = java . lang . String . format ( ( "DENSE_RANK()<sp>OVER<sp>(ORDER<sp>BY<sp>SUM(amount)<sp>DESC)<sp>AS<sp>dense_rank\n" 2 + ( ( ( ( ( ( "prd_type_id,<sp>SUM(amount),\n" + "RANK()<sp>OVER<sp>(ORDER<sp>BY<sp>SUM(amount)<sp>DESC)<sp>AS<sp>rank,\n" ) + "DENSE_RANK()<sp>OVER<sp>(ORDER<sp>BY<sp>SUM(amount)<sp>DESC)<sp>AS<sp>dense_rank\n" ) + "FROM<sp>%s\n<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>" ) + "WHERE<sp>amount<sp>IS<sp>NOT<sp>NULL\n" ) + "DENSE_RANK()<sp>OVER<sp>(ORDER<sp>BY<sp>SUM(amount)<sp>DESC)<sp>AS<sp>dense_rank\n" 1 ) + "ORDER<sp>BY<sp>prd_type_id" ) ) , this . getTableReference ( com . splicemachine . derby . impl . sql . execute . operations . WindowFunctionIT . ALL_SALES ) , useSpark ) ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . WindowFunctionIT . methodWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "PRD_TYPE_ID<sp>|<sp>2<sp>|RANK<sp>|DENSE_RANK<sp>|\n" + ( ( "-------------------------------------------\n" + "<sp>1<sp>|227276.50<sp>|<sp>1<sp>|<sp>1<sp>|\n" ) + "<sp>2<sp>|223927.08<sp>|<sp>2<sp>|<sp>2<sp>|" ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "DENSE_RANK()<sp>OVER<sp>(ORDER<sp>BY<sp>SUM(amount)<sp>DESC)<sp>AS<sp>dense_rank\n" 0 + sqlText ) + "DENSE_RANK()<sp>OVER<sp>(ORDER<sp>BY<sp>SUM(amount)<sp>DESC)<sp>AS<sp>dense_rank\n" 0 ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
testFooBar1 ( ) { java . lang . String className = com . examples . with . different . packagename . staticusage . FooBar1 . class . getName ( ) ; org . evosuite . setup . PutStaticMethodCollector collector = new org . evosuite . setup . PutStaticMethodCollector ( className ) ; org . evosuite . setup . PutStaticMethodCollector . MethodIdentifier expected_method_id = new org . evosuite . setup . PutStaticMethodCollector . MethodIdentifier ( com . examples . with . different . packagename . staticusage . FooBar2 . class . getName ( ) , "init_used_int_field" , org . objectweb . asm . Type . getMethodDescriptor ( Type . VOID_TYPE ) ) ; java . util . Set < org . evosuite . setup . PutStaticMethodCollector . MethodIdentifier > expected_methods = java . util . Collections . singleton ( expected_method_id ) ; java . util . Set < org . evosuite . setup . PutStaticMethodCollector . MethodIdentifier > methods = collector . collectMethods ( ) ; "<AssertPlaceHolder>" ; } collectMethods ( ) { java . util . Set < org . evosuite . setup . PutStaticMethodCollector . MethodIdentifier > methods = new java . util . LinkedHashSet < org . evosuite . setup . PutStaticMethodCollector . MethodIdentifier > ( ) ; for ( java . lang . String calledClassName : getStaticFields . keySet ( ) ) { org . objectweb . asm . tree . ClassNode classNode = org . evosuite . setup . DependencyAnalysis . getClassNode ( calledClassName ) ; java . util . List < org . objectweb . asm . tree . MethodNode > classMethods = classNode . methods ; for ( org . objectweb . asm . tree . MethodNode mn : classMethods ) { if ( mn . name . equals ( org . evosuite . setup . PutStaticMethodCollector . CLINIT ) ) continue ; org . objectweb . asm . tree . InsnList instructions = mn . instructions ; java . util . Iterator < org . objectweb . asm . tree . AbstractInsnNode > it = instructions . iterator ( ) ; while ( it . hasNext ( ) ) { org . objectweb . asm . tree . AbstractInsnNode insn = it . next ( ) ; if ( insn instanceof org . objectweb . asm . tree . FieldInsnNode ) { org . objectweb . asm . tree . FieldInsnNode fieldInsn = ( ( org . objectweb . asm . tree . FieldInsnNode ) ( insn ) ) ; if ( ( fieldInsn . getOpcode ( ) ) != ( org . objectweb . asm . Opcodes . PUTSTATIC ) ) { continue ; } java . lang . String calleeClassName = fieldInsn . owner . replaceAll ( "/" , "." ) ; java . lang . String calleeFieldName = fieldInsn . name ; if ( contains ( getStaticFields , calleeClassName , calleeFieldName ) ) { org . evosuite . setup . PutStaticMethodCollector . MethodIdentifier methodIdentifier = new org . evosuite . setup . PutStaticMethodCollector . MethodIdentifier ( calledClassName , mn . name , mn . desc ) ; methods . add ( methodIdentifier ) ; } } } } } return methods ; }
org . junit . Assert . assertEquals ( expected_methods , methods )
testPatternMatching1 ( ) { java . lang . String text = "blabla<sp>d<sp>is<sp>the<sp>word" ; java . lang . String pattern = "d" ; byte [ ] b2 = org . apache . james . mime4j . util . ContentUtil . toAsciiByteArray ( pattern ) ; org . apache . james . mime4j . io . BufferedLineReaderInputStream inbuffer = org . apache . james . mime4j . io . BufferedLineReaderInputStreamBufferTest . create ( text ) ; inbuffer . fillBuffer ( ) ; int i = inbuffer . indexOf ( b2 ) ; "<AssertPlaceHolder>" ; inbuffer . close ( ) ; } indexOf ( byte ) { return indexOf ( b , this . bufpos , bufferLen ( ) ) ; }
org . junit . Assert . assertEquals ( 7 , i )
equalsStop ( ) { org . apache . hadoop . fs . shell . find . Result one = org . apache . hadoop . fs . shell . find . Result . STOP ; org . apache . hadoop . fs . shell . find . Result two = Result . STOP . combine ( Result . STOP ) ; "<AssertPlaceHolder>" ; } combine ( org . apache . hadoop . fs . shell . find . Result ) { return new org . apache . hadoop . fs . shell . find . Result ( ( ( this . isPass ( ) ) && ( other . isPass ( ) ) ) , ( ( this . isDescend ( ) ) && ( other . isDescend ( ) ) ) ) ; }
org . junit . Assert . assertEquals ( one , two )
testCoordinateDimensionPolygonLite3D ( ) { org . locationtech . jts . geom . Geometry geom = org . geotools . geometry . jts . coordinatesequence . CoordinateSequencesTest . liteGF . createPolygon ( org . geotools . geometry . jts . coordinatesequence . CoordinateSequencesTest . liteGF . createLinearRing ( org . geotools . geometry . jts . coordinatesequence . CoordinateSequencesTest . liteCSF . create ( new double [ ] { 1 , 1 , 100 , 2 , 1 , 99 , 2 , 2 , 98 , 1 , 2 , 97 , 1 , 1 , 100 } , 3 ) ) , null ) ; "<AssertPlaceHolder>" ; } coordinateDimension ( org . locationtech . jts . geom . Geometry ) { if ( g instanceof org . geotools . geometry . jts . CurvedGeometry < ? > ) { return ( ( org . geotools . geometry . jts . CurvedGeometry < ? > ) ( g ) ) . getCoordinatesDimension ( ) ; } if ( g instanceof org . locationtech . jts . geom . Point ) return org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . coordinateDimension ( ( ( org . locationtech . jts . geom . Point ) ( g ) ) . getCoordinateSequence ( ) ) ; if ( g instanceof org . locationtech . jts . geom . LineString ) return org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . coordinateDimension ( ( ( org . locationtech . jts . geom . LineString ) ( g ) ) . getCoordinateSequence ( ) ) ; if ( g instanceof org . locationtech . jts . geom . Polygon ) return org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . coordinateDimension ( ( ( org . locationtech . jts . geom . Polygon ) ( g ) ) . getExteriorRing ( ) . getCoordinateSequence ( ) ) ; org . locationtech . jts . geom . CoordinateSequence cs = org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . CoordinateSequenceFinder . find ( g ) ; return org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . coordinateDimension ( cs ) ; }
org . junit . Assert . assertEquals ( 3 , org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . coordinateDimension ( geom ) )
testMyExtension ( ) { try ( org . neo4j . harness . ServerControls server = getServerBuilder ( ) . withExtension ( "/myExtension" , org . neo4j . harness . doc . ExtensionTestingDocIT . MyUnmanagedExtension . class ) . newServer ( ) ) { org . neo4j . doc . server . HTTP . Response response = org . neo4j . doc . server . HTTP . GET ( org . neo4j . doc . server . HTTP . GET ( server . httpURI ( ) . resolve ( "myExtension" ) . toString ( ) ) . location ( ) ) ; "<AssertPlaceHolder>" ; } } status ( ) { return response . getStatus ( ) ; }
org . junit . Assert . assertEquals ( 200 , response . status ( ) )
getProcessDeploymentInfosWithActorOnlyForRole ( ) { final org . bonitasoft . engine . persistence . QueryOptions options = new org . bonitasoft . engine . persistence . QueryOptions ( 0 , 10 ) ; final java . util . List < org . bonitasoft . engine . core . process . definition . model . SProcessDefinitionDeployInfo > sProcessDefinitionDeployInfos = new java . util . ArrayList ( 3 ) ; doReturn ( sProcessDefinitionDeployInfos ) . when ( persistenceService ) . selectList ( org . mockito . Matchers . < org . bonitasoft . engine . persistence . SelectListDescriptor < org . bonitasoft . engine . core . process . definition . model . SProcessDefinitionDeployInfo > > any ( ) ) ; final java . util . List < org . bonitasoft . engine . core . process . definition . model . SProcessDefinitionDeployInfo > processDeploymentInfos = processDefinitionServiceImpl . getProcessDeploymentInfosWithActorOnlyForRole ( 9 , options ) ; "<AssertPlaceHolder>" ; } getProcessDeploymentInfosWithActorOnlyForRole ( long , org . bonitasoft . engine . persistence . QueryOptions ) { final java . util . Map < java . lang . String , java . lang . Object > parameters = java . util . Collections . singletonMap ( org . bonitasoft . engine . core . process . definition . ROLE_ID , ( ( java . lang . Object ) ( roleId ) ) ) ; final org . bonitasoft . engine . persistence . SelectListDescriptor < org . bonitasoft . engine . core . process . definition . model . SProcessDefinitionDeployInfo > selectDescriptor = new org . bonitasoft . engine . persistence . SelectListDescriptor ( "getProcessesWithActorOnlyForRole" , parameters , org . bonitasoft . engine . core . process . definition . model . SProcessDefinitionDeployInfo . class , queryOptions ) ; return persistenceService . selectList ( selectDescriptor ) ; }
org . junit . Assert . assertEquals ( sProcessDefinitionDeployInfos , processDeploymentInfos )
testCalendarCutoffWithStartedEvent ( ) { long currentTime = java . lang . System . currentTimeMillis ( ) ; java . util . Date startDate = new java . util . Date ( ( currentTime - ( 10 * 1000 ) ) ) ; java . util . Date endDate = new java . util . Date ( ( currentTime + ( ( 60 * 60 ) * 1000 ) ) ) ; org . opencastproject . mediapackage . MediaPackage mediaPackage = org . opencastproject . scheduler . impl . SchedulerServiceImplTest . generateEvent ( com . entwinemedia . fn . data . Opt . < java . lang . String > none ( ) ) ; java . lang . String captureAgentId = "Device<sp>A" ; org . opencastproject . scheduler . impl . SchedulerServiceImplTest . schedSvc . addEvent ( startDate , endDate , captureAgentId , java . util . Collections . < java . lang . String > emptySet ( ) , mediaPackage , org . opencastproject . scheduler . impl . SchedulerServiceImplTest . wfProperties , java . util . Collections . < java . lang . String , java . lang . String > emptyMap ( ) , com . entwinemedia . fn . data . Opt . < java . lang . String > none ( ) ) ; java . util . Date start = new java . util . Date ( currentTime ) ; java . util . Date end = new java . util . Date ( ( currentTime + ( ( 60 * 60 ) * 1000 ) ) ) ; java . util . List < org . opencastproject . mediapackage . MediaPackage > events = org . opencastproject . scheduler . impl . SchedulerServiceImplTest . schedSvc . search ( com . entwinemedia . fn . data . Opt . some ( captureAgentId ) , com . entwinemedia . fn . data . Opt . < java . util . Date > none ( ) , com . entwinemedia . fn . data . Opt . some ( end ) , com . entwinemedia . fn . data . Opt . some ( start ) , com . entwinemedia . fn . data . Opt . < java . util . Date > none ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return count ; }
org . junit . Assert . assertEquals ( 1 , events . size ( ) )
simple_updates ( ) { final java . lang . String rulebase = "rules/reloaded/test019.prova" ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( ) ; java . util . Map < java . lang . String , java . lang . Object > globals = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; globals . put ( "$Count" , count ) ; prova = new ws . prova . api2 . ProvaCommunicatorImpl ( test . ws . prova . test2 . ProvaUpdatesTest . kAgent , test . ws . prova . test2 . ProvaUpdatesTest . kPort , rulebase , ws . prova . api2 . ProvaCommunicatorImpl . SYNC , globals ) ; try { synchronized ( this ) { wait ( 1000 ) ; "<AssertPlaceHolder>" ; } } catch ( java . lang . Exception e ) { } } get ( ) { return count ; }
org . junit . Assert . assertEquals ( 3 , count . get ( ) )
testDefaultFalse ( ) { com . hp . hpl . jena . rdf . model . Model config = getModelA ( "false" ) ; com . epimorphics . lda . metadata . MetaConfig mc = parseMetaConfig ( config ) ; "<AssertPlaceHolder>" ; } disableDefaultMetadata ( ) { return disableDefaultMetadata ; }
org . junit . Assert . assertEquals ( false , mc . disableDefaultMetadata ( ) )
name_equality ( ) { com . groupon . lex . metrics . timeseries . Alert alert1 = new com . groupon . lex . metrics . timeseries . Alert ( com . groupon . lex . metrics . timeseries . AlertTest . t_past , com . groupon . lex . metrics . timeseries . AlertTest . alert_name , ( ) -> "foo" , java . util . Optional . of ( true ) , org . joda . time . Duration . standardDays ( 1 ) , "test" , EMPTY_MAP ) ; com . groupon . lex . metrics . timeseries . Alert alert2 = new com . groupon . lex . metrics . timeseries . Alert ( com . groupon . lex . metrics . timeseries . AlertTest . t0 , com . groupon . lex . metrics . timeseries . AlertTest . alert_name , ( ) -> "bar" , java . util . Optional . of ( false ) , org . joda . time . Duration . standardDays ( 2 ) , "test" , EMPTY_MAP ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( alert1 , alert2 )
getPaths ( ) { java . util . List < java . net . URL > trackerPaths = java . util . Collections . singletonList ( new java . net . URL ( "http://www.last.fm/1/2" ) ) ; when ( mockTracker . getPaths ( fm . last . moji . impl . MojiFileImplTest . KEY , fm . last . moji . impl . MojiFileImplTest . DOMAIN ) ) . thenReturn ( trackerPaths ) ; java . util . List < java . net . URL > paths = file . getPaths ( ) ; "<AssertPlaceHolder>" ; } getPaths ( ) { return java . util . Collections . singletonList ( file . toURI ( ) . toURL ( ) ) ; }
org . junit . Assert . assertThat ( paths , org . hamcrest . CoreMatchers . is ( trackerPaths ) )
testItShouldCountTwoMapsForTolueneOntoToluene ( ) { org . openscience . cdk . smsd . algorithm . vflib . interfaces . IMapper mapper = new org . openscience . cdk . smsd . algorithm . vflib . map . VFMapper ( toluene , true ) ; "<AssertPlaceHolder>" ; } countMaps ( org . openscience . cdk . smsd . algorithm . vflib . builder . TargetProperties ) { org . openscience . cdk . smsd . algorithm . vflib . interfaces . IState state = new org . openscience . cdk . smsd . algorithm . vflib . map . VFState ( query , targetMolecule ) ; maps . clear ( ) ; mapAll ( state ) ; return maps . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , mapper . countMaps ( toluene ) )
testGetObject ( ) { org . apache . rocketmq . jms . domain . message . JmsObjectMessage jmsObjectMessage = new org . apache . rocketmq . jms . domain . message . JmsObjectMessage ( new org . apache . rocketmq . jms . domain . message . JmsObjectMessageTest . User ( "jack" , 20 ) ) ; try { "<AssertPlaceHolder>" ; } catch ( javax . jms . JMSException e ) { e . printStackTrace ( ) ; } } getObject ( ) { return this . body ; }
org . junit . Assert . assertEquals ( jmsObjectMessage . getObject ( ) , new org . apache . rocketmq . jms . domain . message . JmsObjectMessageTest . User ( "jack" , 20 ) )
testGetFullPathSimpleField ( ) { com . redhat . lightblue . util . Path fullPath = getMD1 ( ) . resolve ( new com . redhat . lightblue . util . Path ( "obj1.nestedSimpleInteger" ) ) . getFullPath ( ) ; "<AssertPlaceHolder>" ; } getFullPath ( ) { return com . redhat . lightblue . util . Path . EMPTY ; }
org . junit . Assert . assertEquals ( new com . redhat . lightblue . util . Path ( "obj1.nestedSimpleInteger" ) , fullPath )
shouldInstrumentES6GeneratorDirect ( ) { java . lang . String source = "<sp>}\n" 3 + ( ( ( ( "<sp>while<sp>(start<sp><<sp>end)<sp>{\n" + "<sp>}\n" 4 ) + "<sp>start<sp>+=<sp>step;\n" ) + "<sp>}\n" 1 ) + "<sp>}\n" 0 ) ; java . lang . String instrumentedSource = sourceProcessor . instrumentSource ( source ) ; java . lang . String expectedSource = "_$jscoverage[\'test.js\'].lineData[1]++;\n" + ( ( ( ( ( ( ( ( ( "<sp>}\n" 3 + "<sp>_$jscoverage[\'test.js\'].functionData[0]++;\n" ) + "<sp>}\n" 5 ) + "<sp>while<sp>(start<sp><<sp>end)<sp>{\n" ) + "<sp>_$jscoverage[\'test.js\'].lineData[3]++;\n" ) + "<sp>yield<sp>start;\n" ) + "<sp>}\n" 2 ) + "<sp>start<sp>+=<sp>step;\n" ) + "<sp>}\n" ) + "}\n" ) ; "<AssertPlaceHolder>" ; } instrumentSource ( java . lang . String ) { return instrumentSource ( uri , source ) ; }
org . junit . Assert . assertEquals ( expectedSource , instrumentedSource )
testMissingName ( ) { if ( ! ( org . postgresql . test . TestUtil . haveMinimumServerVersion ( con , ServerVersion . v9_0 ) ) ) { return ; } con . setClientInfo ( "ApplicationName" , "my<sp>app" ) ; con . setClientInfo ( new java . util . Properties ( ) ) ; java . lang . String applicationName = con . getClientInfo ( "ApplicationName" ) ; "<AssertPlaceHolder>" ; } getClientInfo ( java . lang . String ) { checkClosed ( ) ; clientInfo . put ( "ApplicationName" , queryExecutor . getApplicationName ( ) ) ; return clientInfo . getProperty ( name ) ; }
org . junit . Assert . assertTrue ( ( ( "" . equals ( applicationName ) ) || ( applicationName == null ) ) )
manyClientsMemoryTest ( ) { java . util . ArrayList < org . threadly . concurrent . future . ListenableFuture < ? > > lfl = new java . util . ArrayList < org . threadly . concurrent . future . ListenableFuture < ? > > ( ) ; for ( int i = 0 ; i < 100 ; i ++ ) { org . threadly . litesockets . TCPClient tc = SE . createTCPClient ( "127.0.0.1" , port ) ; serverFC . addTCPClient ( tc ) ; lfl . add ( tc . connect ( ) ) ; } org . threadly . concurrent . future . FutureUtils . makeCompleteFuture ( lfl ) . get ( 5000 , TimeUnit . MILLISECONDS ) ; new org . threadly . test . concurrent . TestCondition ( ) { @ org . threadly . litesockets . tcp . Override public boolean get ( ) { return 200 == ( SE . getClientCount ( ) ) ; } } . blockTillTrue ( 5000 ) ; "<AssertPlaceHolder>" ; for ( org . threadly . litesockets . TCPClient tc : serverFC . getAllClients ( ) ) { tc . write ( org . threadly . litesockets . tcp . TCPTests . SMALL_TEXT_BUFFER . duplicate ( ) ) ; } java . lang . System . gc ( ) ; System . out . println ( ( "Used<sp>Memory:" + ( ( ( java . lang . Runtime . getRuntime ( ) . totalMemory ( ) ) - ( java . lang . Runtime . getRuntime ( ) . freeMemory ( ) ) ) / ( 1024 * 1024 ) ) ) ) ; for ( org . threadly . litesockets . TCPClient tc : serverFC . getAllClients ( ) ) { org . threadly . litesockets . buffers . MergedByteBuffers mbb = serverFC . getClientsBuffer ( tc ) ; mbb . discard ( mbb . remaining ( ) ) ; } java . lang . System . gc ( ) ; System . out . println ( ( "Used<sp>Memory:" + ( ( ( java . lang . Runtime . getRuntime ( ) . totalMemory ( ) ) - ( java . lang . Runtime . getRuntime ( ) . freeMemory ( ) ) ) / ( 1024 * 1024 ) ) ) ) ; } getClientCount ( ) { return clients . size ( ) ; }
org . junit . Assert . assertEquals ( 200 , SE . getClientCount ( ) )