input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testEmptySecondLevelCacheEntry ( ) { sessionFactory ( ) . getCache ( ) . evictCollectionRegion ( ( ( org . infinispan . test . hibernate . cache . commons . functional . entities . Item . class . getName ( ) ) + ".items" ) ) ; org . hibernate . stat . Statistics stats = sessionFactory ( ) . getStatistics ( ) ; stats . clear ( ) ; org . infinispan . hibernate . cache . commons . InfinispanBaseRegion region = org . infinispan . test . hibernate . cache . commons . functional . TEST_SESSION_ACCESS . getRegion ( sessionFactory ( ) , ( ( org . infinispan . test . hibernate . cache . commons . functional . entities . Item . class . getName ( ) ) + ".items" ) ) ; "<AssertPlaceHolder>" ; } getElementCountInMemory ( ) { if ( ( filter ) == null ) { return localAndSkipLoadCache . size ( ) ; } else { return localAndSkipLoadCache . entrySet ( ) . stream ( ) . filter ( filter ) . count ( ) ; } }
org . junit . Assert . assertEquals ( 0 , region . getElementCountInMemory ( ) )
assertSingleton ( ) { org . apache . camel . component . couchdb . CouchDbEndpoint endpoint = new org . apache . camel . component . couchdb . CouchDbEndpoint ( "couchdb:http://localhost/db" , "http://localhost/db" , new org . apache . camel . component . couchdb . CouchDbComponent ( ) ) ; "<AssertPlaceHolder>" ; } isSingleton ( ) { return true ; }
org . junit . Assert . assertTrue ( endpoint . isSingleton ( ) )
testGetAnnotationForMethodReturnsNullForNonExistentAnnotation ( ) { javax . inject . Qualifier result = io . joynr . util . AnnotationUtil . getAnnotation ( getMethodWithAnnotation ( ) , javax . inject . Qualifier . class ) ; "<AssertPlaceHolder>" ; } getMethodWithAnnotation ( ) { return io . joynr . util . AnnotationUtilTest . MyTestStatelessAsyncCallback . class . getMethod ( "getEnumAttributeSuccess" , joynr . tests . testTypes . TestEnum . class , io . joynr . proxy . ReplyContext . class ) ; }
org . junit . Assert . assertNull ( result )
getAllDependencies ( ) { com . liferay . ide . test . core . base . support . FileSupport fs = new com . liferay . ide . test . core . base . support . FileSupport ( "testDependencies.gradle" , false ) ; fs . before ( ) ; com . liferay . ide . gradle . core . parser . GradleDependencyUpdater updater = new com . liferay . ide . gradle . core . parser . GradleDependencyUpdater ( fs . getFile ( ) ) ; java . util . List < com . liferay . ide . core . Artifact > allDependencies = updater . getDependencies ( "*" ) ; "<AssertPlaceHolder>" ; fs . after ( ) ; } size ( ) { return getWidget ( ) . rowCount ( ) ; }
org . junit . Assert . assertEquals ( "" , 3 , allDependencies . size ( ) )
testBlobListAll ( ) { prefixes . clear ( ) ; includes . clear ( ) ; prefixes . add ( "" ) ; includes . add ( true ) ; remoteBlobs . prefix . setValue ( prefixes ) ; remoteBlobs . include . setValue ( includes ) ; listBlobs ( ) ; for ( java . lang . String blob : TEST_ALL_BLOBS ) "<AssertPlaceHolder>" ; } isInBlobList ( java . lang . String , java . util . List ) { for ( java . lang . String cb : blobs ) { if ( cb . equals ( blob ) ) { return true ; } } return false ; }
org . junit . Assert . assertTrue ( isInBlobList ( blob , blobs ) )
groupLookupShouldInheritFieldsFromPreviousAggregationOperation ( ) { org . springframework . data . mongodb . core . aggregation . TypeBasedAggregationOperationContext context = getContext ( org . springframework . data . mongodb . core . aggregation . MeterData . class ) ; org . springframework . data . mongodb . core . aggregation . TypedAggregation < org . springframework . data . mongodb . core . aggregation . MeterData > agg = newAggregation ( org . springframework . data . mongodb . core . aggregation . MeterData . class , group ( ) . min ( "resourceId" ) . as ( "foreignKey" ) , lookup ( "OtherCollection" , "foreignKey" , "otherId" , "lookup" ) , sort ( Direction . ASC , "foreignKey" ) ) ; org . bson . Document document = agg . toDocument ( "meterData" , context ) ; org . bson . Document sort = org . springframework . data . mongodb . core . aggregation . TypeBasedAggregationOperationContextUnitTests . getPipelineElementFromAggregationAt ( document , 2 ) ; org . bson . Document definition = ( ( org . bson . Document ) ( sort . get ( "$sort" ) ) ) ; "<AssertPlaceHolder>" ; } getPipelineElementFromAggregationAt ( org . bson . Document , int ) { return ( ( java . util . List < org . bson . Document > ) ( agg . get ( "pipeline" ) ) ) . get ( index ) ; }
org . junit . Assert . assertThat ( definition . get ( "foreignKey" ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 1 ) ) )
testRegisterRepositorySources ( ) { sourceRegistry . registerRepositorySources ( path , repository ) ; java . util . List < org . guvnor . ala . source . Repository > result = sourceRegistry . getAllRepositories ( ) ; "<AssertPlaceHolder>" ; } contains ( T ) { return registryMap . containsKey ( keyProvider . apply ( item ) ) ; }
org . junit . Assert . assertTrue ( result . contains ( repository ) )
testAccessSignedValueFromUnsignedByte_Less128 ( ) { com . eclipsesource . v8 . V8TypedArray array = ( ( com . eclipsesource . v8 . V8TypedArray ) ( v8 . executeScript ( "var<sp>buf<sp>=<sp>new<sp>ArrayBuffer(8);<sp>var<sp>bytes<sp>=<sp>new<sp>Uint8Array(buf);<sp>bytes[0]<sp>=<sp>20;<sp>bytes[1]<sp>=<sp>7;<sp>bytes" ) ) ) ; com . eclipsesource . v8 . V8ArrayBuffer arrayBuffer = array . getBuffer ( ) ; short result = ( ( short ) ( ( arrayBuffer . get ( ) ) & 255 ) ) ; "<AssertPlaceHolder>" ; array . close ( ) ; arrayBuffer . close ( ) ; } get ( ) { v8 . checkThread ( ) ; checkReleased ( ) ; return byteBuffer . get ( ) ; }
org . junit . Assert . assertEquals ( 20 , result )
readData_Exception_readAllLine ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( filereader . readAllLine ( org . mockito . Mockito . anyString ( ) ) ) . thenThrow ( new java . io . IOException ( "Exception_readAllLine" ) ) ; info = cameraReader . readData ( traceFolder , 0 , 0 ) ; "<AssertPlaceHolder>" ; } size ( ) { return sessionTable . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( info . size ( ) ) == 0 ) )
test_shouldNotRemoveApplicationButIgnoreError ( ) { connect ( ) ; try { org . springframework . shell . core . CommandResult result = removeApplication ( "dzqmodzq" , false ) ; "<AssertPlaceHolder>" ; } finally { disconnect ( ) ; } } isSuccessfulCommand ( ) { return new fr . treeptik . cloudunit . cli . integration . ShellMatchers . CommandStatusMatcher ( true ) ; }
org . junit . Assert . assertThat ( result , isSuccessfulCommand ( ) )
testMyClassName ( ) { java . lang . String fullName = getClass ( ) . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( java . lang . String ) { return org . zeroturnaround . exec . stream . CallerLoggerUtil . getName ( name , 1 ) ; }
org . junit . Assert . assertEquals ( fullName , org . zeroturnaround . exec . stream . CallerLoggerUtil . getName ( null ) )
determineCheckoutPath_defaultOnWindowsWithForwardSlashes ( ) { final hudson . remoting . VirtualChannel vc = mock ( hudson . remoting . VirtualChannel . class ) ; final java . lang . String windowsPath = "C:/.jenkins/jobs/tfs-plugin/workspace" ; final hudson . FilePath workspacePath = new hudson . FilePath ( vc , windowsPath ) ; final java . lang . String actual = hudson . plugins . tfs . actions . CheckoutAction . determineCheckoutPath ( workspacePath , "." ) ; "<AssertPlaceHolder>" ; } determineCheckoutPath ( hudson . FilePath , java . lang . String ) { final hudson . FilePath combinedPath = new hudson . FilePath ( workspacePath , localFolder ) ; final java . lang . String result = combinedPath . getRemote ( ) ; return result ; }
org . junit . Assert . assertEquals ( windowsPath , actual )
testOnSplashPotionSplashAllowPVP ( ) { when ( island . isAllowed ( org . mockito . Mockito . any ( ) ) ) . thenReturn ( true ) ; org . bukkit . entity . ThrownPotion tp = mock ( org . bukkit . entity . ThrownPotion . class ) ; when ( tp . getShooter ( ) ) . thenReturn ( player ) ; when ( tp . getWorld ( ) ) . thenReturn ( world ) ; java . util . Map < org . bukkit . entity . LivingEntity , java . lang . Double > map = new java . util . HashMap ( ) ; map . put ( player2 , 100.0 ) ; map . put ( zombie , 100.0 ) ; map . put ( creeper , 10.0 ) ; org . bukkit . event . entity . PotionSplashEvent e = new org . bukkit . event . entity . PotionSplashEvent ( tp , map ) ; new world . bentobox . bentobox . listeners . flags . settings . PVPListener ( ) . onSplashPotionSplash ( e ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( player , org . mockito . Mockito . never ( ) ) . sendMessage ( Flags . PVP_OVERWORLD . getHintReference ( ) ) ; } isCancelled ( ) { return cancelled ; }
org . junit . Assert . assertFalse ( e . isCancelled ( ) )
testTrimUnsuccessful ( ) { com . facebook . common . references . CloseableReference < byte [ ] > arrayRef = mPool . get ( 7 ) ; mDelegatePool . trim ( MemoryTrimType . OnCloseToDalvikHeapLimit ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( ! ( mIsDone ) ) { throw new java . lang . IllegalStateException ( "Not<sp>yet<sp>done.<sp>We<sp>don't<sp>support<sp>blocking<sp>in<sp>tests" ) ; } if ( ( mResultThrowable ) != null ) { throw new java . util . concurrent . ExecutionException ( mResultThrowable ) ; } else { return mResult ; } }
org . junit . Assert . assertNotNull ( arrayRef . get ( ) )
testGetParametersWithDefaultEntityAndDisabledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . paper . usage . PaperUsage entity = new org . lnu . is . domain . paper . usage . PaperUsage ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "userGroups" , groups ) ; 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 )
testTranslateDTOToDBO ( ) { org . sagebionetworks . repo . model . dbo . loginlockout . DBOUnsuccessfulLoginLockout translatedDBO = org . sagebionetworks . repo . model . dbo . dao . UnsuccessfulLoginLockoutDAOImpl . translateDTOToDBO ( dto ) ; "<AssertPlaceHolder>" ; } translateDTOToDBO ( org . sagebionetworks . repo . model . UnsuccessfulLoginLockoutDTO ) { org . sagebionetworks . repo . model . dbo . loginlockout . DBOUnsuccessfulLoginLockout dbo = new org . sagebionetworks . repo . model . dbo . loginlockout . DBOUnsuccessfulLoginLockout ( ) ; dbo . setLockoutExpiration ( dto . getLockoutExpiration ( ) ) ; dbo . setUnsuccessfulLoginCount ( dto . getUnsuccessfulLoginCount ( ) ) ; dbo . setUserId ( dto . getUserId ( ) ) ; return dbo ; }
org . junit . Assert . assertEquals ( dbo , translatedDBO )
testCanPrescribeIsFalseOnEmptyStringInstructions ( ) { org . oscarehr . common . model . Drug d = getTestDrug ( ) ; d . setSpecial ( "" ) ; "<AssertPlaceHolder>" ; } canPrescribe ( org . oscarehr . common . model . Drug ) { if ( d == null ) { org . oscarehr . managers . RxManager . logger . debug ( "drug<sp>was<sp>null<sp>returning<sp>false" ) ; return false ; } if ( ( ( d . getProviderNo ( ) ) == null ) || ( d . getProviderNo ( ) . equals ( "" ) ) ) { org . oscarehr . managers . RxManager . logger . debug ( "provider<sp>was<sp>null<sp>or<sp>blank<sp>returning<sp>false" ) ; return false ; } if ( ( ( d . getDemographicId ( ) ) == null ) || ( ( d . getDemographicId ( ) ) < 0 ) ) { org . oscarehr . managers . RxManager . logger . debug ( "demographic<sp>was<sp>null<sp>returning<sp>false" ) ; return false ; } if ( ( d . getRxDate ( ) ) == null ) { org . oscarehr . managers . RxManager . logger . debug ( "rx<sp>date<sp>was<sp>null<sp>returning<sp>false" ) ; return false ; } if ( ( ( d . getEndDate ( ) ) == null ) || ( d . getRxDate ( ) . after ( d . getEndDate ( ) ) ) ) { org . oscarehr . managers . RxManager . logger . debug ( "drug<sp>endDate<sp>was<sp>null" ) ; return false ; } if ( ( ( d . getSpecial ( ) ) == null ) || ( d . getSpecial ( ) . equals ( "" ) ) ) { org . oscarehr . managers . RxManager . logger . debug ( "drug<sp>special<sp>instructions<sp>was<sp>null<sp>returning<sp>false" ) ; return false ; } return true ; }
org . junit . Assert . assertFalse ( canPrescribe ( d ) )
testWrapperToPrimtive ( ) { ma . glasnost . orika . MapperFactory factory = ma . glasnost . orika . test . MappingUtil . getMapperFactory ( ) ; factory . registerClassMap ( ma . glasnost . orika . metadata . ClassMapBuilder . map ( ma . glasnost . orika . test . primitives . BooleanTestCase . Wrapper . class , ma . glasnost . orika . test . primitives . BooleanTestCase . Primitive . class ) . field ( "wrapper" , "primitive" ) . toClassMap ( ) ) ; factory . build ( ) ; ma . glasnost . orika . MapperFacade mapper = factory . getMapperFacade ( ) ; ma . glasnost . orika . test . primitives . BooleanTestCase . Primitive source = new ma . glasnost . orika . test . primitives . BooleanTestCase . Primitive ( ) ; source . setPrimitive ( true ) ; ma . glasnost . orika . test . primitives . BooleanTestCase . Wrapper destination = mapper . map ( source , ma . glasnost . orika . test . primitives . BooleanTestCase . Wrapper . class ) ; "<AssertPlaceHolder>" ; } getWrapper ( ) { return wrapper ; }
org . junit . Assert . assertEquals ( true , destination . getWrapper ( ) )
serialize_ContainerWithLowAndHighValues_LowAndHighValuesSerialized ( ) { final com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . Pair < com . vaadin . data . provider . ListDataProvider < com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItem > , com . vaadin . addon . charts . model . DataProviderSeries < com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItem > > pair = createTuple ( new com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItem ( ( - 5 ) , 5 , null ) ) ; final com . vaadin . addon . charts . model . DataProviderSeries < com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItem > dataProviderSeries = pair . getT2 ( ) ; dataProviderSeries . setLow ( com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItem :: getX ) ; dataProviderSeries . setHigh ( com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItem :: getY ) ; final java . lang . String actual = toJSON ( dataProviderSeries ) ; final java . lang . String expected = "{\"data\":[{\"high\":5,\"low\":-5}]}" ; "<AssertPlaceHolder>" ; } toJSON ( com . vaadin . addon . charts . model . AbstractConfigurationObject ) { try { return com . vaadin . addon . charts . util . ChartSerialization . jsonWriter . writeValueAsString ( object ) ; } catch ( com . fasterxml . jackson . core . JsonProcessingException e ) { e . printStackTrace ( ) ; throw new java . lang . RuntimeException ( ( "Error<sp>while<sp>serializing<sp>" + ( object . getClass ( ) . getSimpleName ( ) ) ) , e ) ; } }
org . junit . Assert . assertEquals ( expected , actual )
createStoragePoolMappingsForVolumesTestCrossCluterMigration ( ) { java . util . ArrayList < com . cloud . storage . Volume > allVolumes = new java . util . ArrayList ( ) ; allVolumes . add ( volumeVoMock ) ; java . util . HashMap < com . cloud . storage . Volume , com . cloud . storage . StoragePool > volumeToPoolObjectMap = new java . util . HashMap ( ) ; org . mockito . Mockito . doReturn ( ScopeType . CLUSTER ) . when ( storagePoolVoMock ) . getScope ( ) ; org . mockito . Mockito . doNothing ( ) . when ( virtualMachineManagerImpl ) . executeManagedStorageChecksWhenTargetStoragePoolNotProvided ( hostMock , storagePoolVoMock , volumeVoMock ) ; org . mockito . Mockito . doNothing ( ) . when ( virtualMachineManagerImpl ) . createVolumeToStoragePoolMappingIfPossible ( virtualMachineProfileMock , hostMock , volumeToPoolObjectMap , volumeVoMock , storagePoolVoMock ) ; org . mockito . Mockito . doReturn ( true ) . when ( virtualMachineManagerImpl ) . isStorageCrossClusterMigration ( hostMock , storagePoolVoMock ) ; virtualMachineManagerImpl . createStoragePoolMappingsForVolumes ( virtualMachineProfileMock , hostMock , volumeToPoolObjectMap , allVolumes ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( virtualMachineManagerImpl ) . executeManagedStorageChecksWhenTargetStoragePoolNotProvided ( hostMock , storagePoolVoMock , volumeVoMock ) ; org . mockito . Mockito . verify ( virtualMachineManagerImpl ) . createVolumeToStoragePoolMappingIfPossible ( virtualMachineProfileMock , hostMock , volumeToPoolObjectMap , volumeVoMock , storagePoolVoMock ) ; org . mockito . Mockito . verify ( virtualMachineManagerImpl ) . isStorageCrossClusterMigration ( hostMock , storagePoolVoMock ) ; } isEmpty ( ) { return ( this . resultCount ) == 0 ; }
org . junit . Assert . assertTrue ( volumeToPoolObjectMap . isEmpty ( ) )
twoBelow ( ) { set . set ( 1 ) ; final int ret = set . previousSetBit ( 3 ) ; "<AssertPlaceHolder>" ; } previousSetBit ( int ) { if ( i < 0 ) { if ( i == ( - 1 ) ) return - 1 ; throw new java . lang . IndexOutOfBoundsException ( ( "i=" + i ) ) ; } final long [ ] [ ] [ ] bits = this . bits ; final int aSize = ( bits . length ) - 1 ; if ( w1 > aSize ) { w1 = aSize ; w2 = com . zaxxer . sparsebits . SparseBitSet . LENGTH2_SIZE ; w3 = com . zaxxer . sparsebits . SparseBitSet . LENGTH3_SIZE ; w4 = com . zaxxer . sparsebits . SparseBitSet . LENGTH4_SIZE ; } else { w2 = ( w > > ( com . zaxxer . sparsebits . SparseBitSet . SHIFT2 ) ) & ( com . zaxxer . sparsebits . SparseBitSet . MASK2 ) ; w3 = w & ( com . zaxxer . sparsebits . SparseBitSet . MASK3 ) ; w4 = i % ( com . zaxxer . sparsebits . SparseBitSet . LENGTH4 ) ; } long word ; long [ ] [ ] a2 ; long [ ] a3 ; for ( ; w1 >= 0 ; -- w1 ) { if ( ( a2 = bits [ w1 ] ) != null ) for ( ; w2 >= 0 ; -- w2 ) { if ( ( a3 = a2 [ w2 ] ) != null ) for ( ; w3 >= 0 ; -- w3 ) { if ( ( word = a3 [ w3 ] ) != 0 ) for ( int bitIdx = w4 ; bitIdx >= 0 ; -- bitIdx ) { if ( ( word & ( 1L << bitIdx ) ) != 0 ) return ( ( ( ( w1 << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT1 ) ) + ( w2 << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT2 ) ) ) + w3 ) << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT3 ) ) + bitIdx ; } w4 = com . zaxxer . sparsebits . SparseBitSet . LENGTH4_SIZE ; } w3 = com . zaxxer . sparsebits . SparseBitSet . LENGTH3_SIZE ; w4 = com . zaxxer . sparsebits . SparseBitSet . LENGTH4_SIZE ; } w2 = com . zaxxer . sparsebits . SparseBitSet . LENGTH2_SIZE ; w3 = com . zaxxer . sparsebits . SparseBitSet . LENGTH3_SIZE ; w4 = com . zaxxer . sparsebits . SparseBitSet . LENGTH4_SIZE ; } return - 1 ; }
org . junit . Assert . assertEquals ( 1 , ret )
getFirstOnEmpty ( ) { com . gs . collections . impl . lazy . CollectIterable < java . lang . Integer , java . lang . String > collect = new com . gs . collections . impl . lazy . CollectIterable ( com . gs . collections . impl . list . mutable . FastList . newList ( ) , String :: valueOf ) ; "<AssertPlaceHolder>" ; } getFirst ( ) { org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 10 ) , com . gs . collections . impl . list . Interval . fromTo ( 10 , ( - 10 ) ) . by ( ( - 5 ) ) . getFirst ( ) ) ; org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( ( - 10 ) ) , com . gs . collections . impl . list . Interval . fromTo ( ( - 10 ) , 10 ) . by ( 5 ) . getFirst ( ) ) ; org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 0 ) , com . gs . collections . impl . list . Interval . zero ( ) . getFirst ( ) ) ; }
org . junit . Assert . assertNull ( collect . getFirst ( ) )
testIsPresentlyValidAfterNotOnOrAfter ( ) { org . w3c . dom . Element issuedAssertion = this . readDocument ( "/saml.xml" ) . getDocumentElement ( ) ; issuedAssertion . getElementsByTagName ( "saml2:Conditions" ) . item ( 0 ) . getAttributes ( ) . getNamedItem ( "NotOnOrAfter" ) . setNodeValue ( getNowWithOffset ( ( - 1 ) ) ) ; ddf . security . assertion . impl . SecurityAssertionImpl assertion = getSecurityAssertion ( issuedAssertion ) ; "<AssertPlaceHolder>" ; } isPresentlyValid ( ) { java . util . Date now = new java . util . Date ( ) ; if ( ( ( getNotBefore ( ) ) != null ) && ( now . before ( getNotBefore ( ) ) ) ) { ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "SAML<sp>Assertion<sp>Time<sp>Bound<sp>Check<sp>Failed." ) ; ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "\t<sp>Checked<sp>time<sp>of<sp>{}<sp>is<sp>before<sp>the<sp>NotBefore<sp>time<sp>of<sp>{}" , now , getNotBefore ( ) ) ; return false ; } if ( ( ( getNotOnOrAfter ( ) ) != null ) && ( ( now . equals ( getNotOnOrAfter ( ) ) ) || ( now . after ( getNotOnOrAfter ( ) ) ) ) ) { ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "SAML<sp>Assertion<sp>Time<sp>Bound<sp>Check<sp>Failed." ) ; ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "\t<sp>Checked<sp>time<sp>of<sp>{}<sp>is<sp>equal<sp>to<sp>or<sp>after<sp>the<sp>NotOnOrAfter<sp>time<sp>of<sp>{}" , now , getNotOnOrAfter ( ) ) ; return false ; } return true ; }
org . junit . Assert . assertFalse ( assertion . isPresentlyValid ( ) )
testConvertVarTypeToResolvedType ( ) { org . eclipse . jdt . core . IPackageFragment pack1 = sourceFolder . createPackageFragment ( "foo.bar" , false , null ) ; java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; buf . append ( "package<sp>foo.bar;\n" ) ; buf . append ( "public<sp>class<sp>Test<sp>{\n" ) ; buf . append ( "<sp>public<sp>void<sp>test()<sp>{\n" ) ; buf . append ( "<sp>var<sp>name<sp>=<sp>\"test\";\n" ) ; buf . append ( "<sp>}\n" ) ; buf . append ( "}\n" ) ; org . eclipse . jdt . core . ICompilationUnit cu = pack1 . createCompilationUnit ( "Test.java" , buf . toString ( ) , false , null ) ; java . util . List < org . eclipse . lsp4j . jsonrpc . messages . Either < org . eclipse . lsp4j . Command , org . eclipse . lsp4j . CodeAction > > codeActions = evaluateCodeActions ( cu ) ; org . eclipse . lsp4j . jsonrpc . messages . Either < org . eclipse . lsp4j . Command , org . eclipse . lsp4j . CodeAction > codeAction = codeActions . stream ( ) . filter ( ( c ) -> getTitle ( c ) . matches ( "Change<sp>type<sp>of<sp>'name'<sp>to<sp>'String'" ) ) . findFirst ( ) . orElse ( null ) ; "<AssertPlaceHolder>" ; } matches ( org . eclipse . jdt . ls . core . internal . corext . dom . fragments . IASTFragment ) { return ( other . getClass ( ) . equals ( getClass ( ) ) ) && ( org . eclipse . jdt . ls . core . internal . corext . dom . JdtASTMatcher . doNodesMatch ( other . getAssociatedNode ( ) , getAssociatedNode ( ) ) ) ; }
org . junit . Assert . assertNotNull ( codeAction )
resetRemovesAllLoggingEvents ( ) { uk . org . lidalia . slf4jtest . TestLoggerFactory . getInstance ( ) . getLogger ( "name1" ) . info ( "hello" ) ; uk . org . lidalia . slf4jtest . TestLoggerFactory . reset ( ) ; "<AssertPlaceHolder>" ; } getLoggingEvents ( ) { return uk . org . lidalia . slf4jtest . TestLoggerFactory . getInstance ( ) . getLoggingEventsFromLoggers ( ) ; }
org . junit . Assert . assertThat ( uk . org . lidalia . slf4jtest . TestLoggerFactory . getLoggingEvents ( ) , org . hamcrest . CoreMatchers . is ( empty ( ) ) )
deveObterPercentualInterestadualComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSUFDestino icmsUFDestino = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSUFDestino ( ) ; final java . lang . String percentualInterestadual = "999.9999" ; icmsUFDestino . setPercentualInterestadual ( new java . math . BigDecimal ( percentualInterestadual ) ) ; "<AssertPlaceHolder>" ; } getPercentualInterestadual ( ) { return this . percentualInterestadual ; }
org . junit . Assert . assertEquals ( percentualInterestadual , icmsUFDestino . getPercentualInterestadual ( ) )
testUnknownInput ( ) { dspFactory . addCodec ( org . restcomm . media . core . codec . g711 . alaw . Encoder . class . getName ( ) ) ; dspFactory . addCodec ( org . restcomm . media . core . codec . g711 . alaw . Decoder . class . getName ( ) ) ; org . restcomm . media . core . component . dsp . Dsp dsp = dspFactory . newProcessor ( ) ; org . restcomm . media . core . spi . memory . Frame frame = org . restcomm . media . core . spi . memory . Memory . allocate ( 320 ) ; org . restcomm . media . core . spi . memory . Frame frame2 = dsp . process ( frame , null , null ) ; "<AssertPlaceHolder>" ; } process ( org . restcomm . media . core . spi . memory . Frame , org . restcomm . media . core . spi . format . Format , org . restcomm . media . core . spi . format . Format ) { if ( ( source == null ) || ( destination == null ) ) return frame ; if ( source . matches ( destination ) ) return frame ; if ( ( ( ( ( sourceFormat ) != null ) && ( source . matches ( sourceFormat ) ) ) && ( ( destinationFormat ) != null ) ) && ( destination . matches ( destinationFormat ) ) ) { if ( ( codec ) != null ) { try { return codec . process ( frame ) ; } finally { frame . recycle ( ) ; } } return frame ; } if ( ( codecs ) == null ) { return frame ; } for ( int i = 0 ; i < ( codecs . length ) ; i ++ ) { if ( codecs [ i ] . getSupportedInputFormat ( ) . matches ( source ) ) { if ( codecs [ i ] . getSupportedOutputFormat ( ) . matches ( destination ) ) { codec = codecs [ i ] ; destinationFormat = destination ; sourceFormat = source ; break ; } } } if ( ( codec ) != null ) { try { return codec . process ( frame ) ; } finally { frame . recycle ( ) ; } } return frame ; }
org . junit . Assert . assertEquals ( frame , frame2 )
testGetTrustReport ( ) { System . out . println ( "getTrustReport" ) ; com . intel . mtwilson . as . business . Collection < com . intel . mtwilson . as . business . Hostname > hostNames = null ; com . intel . mtwilson . as . business . ReportsBO instance = new com . intel . mtwilson . as . business . ReportsBO ( ) ; com . intel . mountwilson . as . hosttrustreport . data . HostsTrustReportType expResult = null ; com . intel . mountwilson . as . hosttrustreport . data . HostsTrustReportType result = instance . getTrustReport ( hostNames ) ; "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "The<sp>test<sp>case<sp>is<sp>a<sp>prototype." ) ; } getTrustReport ( com . intel . mtwilson . as . business . Collection ) { try { com . intel . mountwilson . as . hosttrustreport . data . HostsTrustReportType hostsTrustReportType = new com . intel . mountwilson . as . hosttrustreport . data . HostsTrustReportType ( ) ; for ( com . intel . mtwilson . model . Hostname host : hostNames ) { com . intel . mtwilson . as . data . TblHosts tblHosts = com . intel . mtwilson . My . jpa ( ) . mwHosts ( ) . findByName ( host . toString ( ) ) ; if ( tblHosts == null ) { throw new com . intel . mountwilson . as . common . ASException ( com . intel . mtwilson . i18n . ErrorCode . AS_HOST_NOT_FOUND , host ) ; } com . intel . mtwilson . as . business . List < com . intel . mtwilson . as . data . TblTaLog > logs = com . intel . mtwilson . My . jpa ( ) . mwTaLog ( ) . findTrustStatusByHostId ( tblHosts . getId ( ) , 5 ) ; if ( logs != null ) { for ( com . intel . mtwilson . as . data . TblTaLog log : logs ) { com . intel . mountwilson . as . hosttrustreport . data . HostType hostType = new com . intel . mountwilson . as . hosttrustreport . data . HostType ( ) ; hostType . setHostName ( host . toString ( ) ) ; hostType . setMLEInfo ( getMleInfo ( tblHosts ) ) ; hostType . setTrustStatus ( getTrustStatus ( log . getError ( ) ) ) ; hostType . setVerifiedOn ( com . intel . mtwilson . as . business . trust . Util . getCalendar ( log . getUpdatedOn ( ) ) ) ; hostsTrustReportType . getHost ( ) . add ( hostType ) ; } } } return hostsTrustReportType ; } catch ( java . io . IOException | com . intel . dcsg . cpg . crypto . CryptographyException | com . intel . mountwilson . as . common . ASException e ) { com . intel . mtwilson . as . business . ReportsBO . logger . error ( "Error<sp>during<sp>retrieval<sp>of<sp>host<sp>trust<sp>report." , e ) ; throw new com . intel . mountwilson . as . common . ASException ( com . intel . mtwilson . i18n . ErrorCode . AS_HOST_REPORT_ERROR , e . getClass ( ) . getSimpleName ( ) ) ; } }
org . junit . Assert . assertEquals ( expResult , result )
shouldBeEqualWhenUsingDefaults ( ) { javax . cache . configuration . Configuration config1 = new javax . cache . configuration . MutableConfiguration ( ) ; javax . cache . configuration . Configuration config2 = new javax . cache . configuration . MutableConfiguration ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( config1 , config2 )
testFileSystemInequivalence ( ) { org . apache . hadoop . conf . Configuration hadoopConf = createMock ( org . apache . hadoop . conf . Configuration . class ) ; org . apache . hadoop . fs . FileSystem fs = createMock ( org . apache . hadoop . fs . FileSystem . class ) ; org . apache . hadoop . fs . FileSystem other = createMock ( org . apache . hadoop . fs . FileSystem . class ) ; java . lang . String basePath = "/accumulo" ; expect ( fs . getConf ( ) ) . andReturn ( hadoopConf ) . anyTimes ( ) ; expect ( fs . getUri ( ) ) . andReturn ( java . net . URI . create ( "hdfs://localhost:8020" ) ) . anyTimes ( ) ; expect ( other . getUri ( ) ) . andReturn ( java . net . URI . create ( "hdfs://otherhost:8020" ) ) . anyTimes ( ) ; replay ( fs , other ) ; org . apache . accumulo . core . volume . VolumeImpl volume = new org . apache . accumulo . core . volume . VolumeImpl ( fs , basePath ) ; "<AssertPlaceHolder>" ; verify ( fs , other ) ; } equivalentFileSystems ( org . apache . hadoop . fs . FileSystem ) { return fs . getUri ( ) . equals ( other . getUri ( ) ) ; }
org . junit . Assert . assertFalse ( volume . equivalentFileSystems ( other ) )
testEndpointHasNoIasZoneInputCluster ( ) { when ( endpoint . getInputCluster ( ZclIasZoneCluster . CLUSTER_ID ) ) . thenReturn ( null ) ; org . eclipse . smarthome . core . thing . Channel channel = converter . getChannel ( thingUID , endpoint ) ; "<AssertPlaceHolder>" ; } getChannel ( org . eclipse . smarthome . core . thing . ThingUID , com . zsmartsystems . zigbee . ZigBeeEndpoint ) { if ( ( endpoint . getInputCluster ( ZclRelativeHumidityMeasurementCluster . CLUSTER_ID ) ) == null ) { logger . trace ( "{}:<sp>Relative<sp>humidity<sp>cluster<sp>not<sp>found" , endpoint . getIeeeAddress ( ) ) ; return null ; } return org . eclipse . smarthome . core . thing . binding . builder . ChannelBuilder . create ( createChannelUID ( thingUID , endpoint , ZigBeeBindingConstants . CHANNEL_NAME_HUMIDITY_VALUE ) , ZigBeeBindingConstants . ITEM_TYPE_NUMBER ) . withType ( ZigBeeBindingConstants . CHANNEL_HUMIDITY_VALUE ) . withLabel ( ZigBeeBindingConstants . CHANNEL_LABEL_HUMIDITY_VALUE ) . withProperties ( createProperties ( endpoint ) ) . build ( ) ; }
org . junit . Assert . assertNull ( channel )
testParseFromBitwiseValueWithUpdateBitwiseValue ( ) { com . liferay . sharing . security . permission . SharingEntryAction updateSharingEntryAction = SharingEntryAction . UPDATE ; "<AssertPlaceHolder>" ; } parseFromBitwiseValue ( long ) { if ( java . util . Objects . equals ( com . liferay . sharing . security . permission . SharingEntryAction . ADD_DISCUSSION . getBitwiseValue ( ) , bitwiseValue ) ) { return com . liferay . sharing . security . permission . SharingEntryAction . ADD_DISCUSSION ; } else if ( java . util . Objects . equals ( com . liferay . sharing . security . permission . SharingEntryAction . UPDATE . getBitwiseValue ( ) , bitwiseValue ) ) { return com . liferay . sharing . security . permission . SharingEntryAction . UPDATE ; } else if ( java . util . Objects . equals ( com . liferay . sharing . security . permission . SharingEntryAction . VIEW . getBitwiseValue ( ) , bitwiseValue ) ) { return com . liferay . sharing . security . permission . SharingEntryAction . VIEW ; } throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>bitwise<sp>value<sp>" + bitwiseValue ) ) ; }
org . junit . Assert . assertEquals ( updateSharingEntryAction , com . liferay . sharing . security . permission . SharingEntryAction . parseFromBitwiseValue ( updateSharingEntryAction . getBitwiseValue ( ) ) )
testReplaceLocation_renamingTable_none ( ) { final java . lang . String expression = "YYYZ.columnA<sp>==<sp>XXXYYY.columnA" ; java . lang . String result = expressionParser . replaceLocation ( expression , new org . talend . designer . mapper . model . tableentry . TableEntryLocation ( "YYY" , "columnA" ) , new org . talend . designer . mapper . model . tableentry . TableEntryLocation ( "YYYZZZ" , "columnA" ) ) ; "<AssertPlaceHolder>" ; } replaceLocation ( org . talend . designer . mapper . model . tableentry . TableEntryLocation , org . talend . designer . mapper . model . tableentry . TableEntryLocation , java . lang . String , org . talend . designer . mapper . utils . DataMapExpressionParser , boolean ) { if ( ( currentExpression == null ) || ( ( currentExpression . trim ( ) . length ( ) ) == 0 ) ) { return null ; } org . talend . designer . mapper . model . tableentry . TableEntryLocation [ ] tableEntryLocations = dataMapExpressionParser . parseTableEntryLocations ( currentExpression ) ; for ( org . talend . designer . mapper . model . tableentry . TableEntryLocation currentLocation : tableEntryLocations ) { if ( tableRenamed && ( oldLocation . tableName . equals ( currentLocation . tableName ) ) ) { oldLocation . columnName = currentLocation . columnName ; newLocation . columnName = currentLocation . columnName ; } if ( currentLocation . equals ( oldLocation ) ) { currentExpression = dataMapExpressionParser . replaceLocation ( currentExpression , currentLocation , newLocation ) ; } } return currentExpression ; }
org . junit . Assert . assertEquals ( expression , result )
testIteratorEmpty ( ) { org . jsoup . nodes . Attributes a = new org . jsoup . nodes . Attributes ( ) ; java . util . Iterator < org . jsoup . nodes . Attribute > iterator = a . iterator ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertFalse ( iterator . hasNext ( ) )
testSerialization ( ) { com . orsoncharts . renderer . category . AreaRenderer3D r1 = new com . orsoncharts . renderer . category . AreaRenderer3D ( ) ; com . orsoncharts . renderer . category . AreaRenderer3D r2 = ( ( com . orsoncharts . renderer . category . AreaRenderer3D ) ( com . orsoncharts . TestUtils . serialized ( r1 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof com . orsoncharts . graphics3d . Offset3D ) ) { return false ; } com . orsoncharts . graphics3d . Offset3D that = ( ( com . orsoncharts . graphics3d . Offset3D ) ( obj ) ) ; if ( ( this . dx ) != ( that . dx ) ) { return false ; } if ( ( this . dy ) != ( that . dy ) ) { return false ; } if ( ( this . dz ) != ( that . dz ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( r1 . equals ( r2 ) )
testLeeg ( ) { final nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder builder = new nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder ( nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortPersoon . INGESCHREVENE ) ; final nl . bzk . brp . model . hisvolledig . predikaatview . kern . PersoonHisVolledigView persoonHisVolledig = new nl . bzk . brp . model . hisvolledig . predikaatview . kern . PersoonHisVolledigView ( builder . build ( ) , null ) ; final nl . bzk . migratiebrp . conversie . model . brp . BrpStapel < nl . bzk . migratiebrp . conversie . model . brp . groep . BrpPersoonAfgeleidAdministratiefInhoud > brpInhoud = mapper . map ( persoonHisVolledig , new nl . bzk . brp . levering . lo3 . mapper . OnderzoekMapper ( persoonHisVolledig ) , new nl . bzk . brp . levering . lo3 . mapper . TestActieHisVolledigLocator ( ) ) ; "<AssertPlaceHolder>" ; } map ( B , nl . bzk . brp . levering . lo3 . mapper . OnderzoekMapper , nl . bzk . brp . levering . lo3 . mapper . ActieHisVolledigLocator ) { final java . util . List < nl . bzk . migratiebrp . conversie . model . brp . BrpGroep < G > > groepen = new java . util . ArrayList ( ) ; final java . lang . Iterable < H > histories = getHistorieIterable ( volledig ) ; if ( histories != null ) { for ( final H historie : histories ) { if ( historie != null ) { if ( ! ( behoortTotStatischePersoonlijst ( historie ) ) ) { continue ; } final nl . bzk . migratiebrp . conversie . model . brp . BrpGroep < G > groep = mapGroep ( historie , onderzoekMapper , actieHisVolledigLocator ) ; if ( groep != null ) { groepen . add ( groep ) ; } } } } if ( groepen . isEmpty ( ) ) { return null ; } else { return new nl . bzk . migratiebrp . conversie . model . brp . BrpStapel < G > ( groepen ) ; } }
org . junit . Assert . assertNull ( brpInhoud )
testUserSearch ( ) { org . springframework . data . domain . Sort sort = new org . springframework . data . domain . Sort ( Sort . Direction . DESC , "createDate" ) . and ( new org . springframework . data . domain . Sort ( Sort . Direction . ASC , "id" ) ) ; org . springframework . data . domain . Pageable p = new org . springframework . data . domain . PageRequest ( 0 , 20 , sort ) ; java . util . Set < com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion > set = new java . util . HashSet ( ) ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion c1 ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion c2 ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion c3 ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion c4 ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion c5 ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion c6 ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion c7 ; c1 = new com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion ( "email" , Criterion . Operator . EQ , emailtohl . getEmail ( ) ) ; c2 = new com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion ( "age" , Criterion . Operator . GTE , 10 ) ; c3 = new com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion ( "age" , Criterion . Operator . LTE , 150 ) ; c4 = new com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion ( "subsidiary.mobile" , Criterion . Operator . NOT_NULL , null ) ; c5 = new com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion ( "affiliation" , Criterion . Operator . NULL , null ) ; java . util . Set < java . lang . Integer > in = new java . util . HashSet ( ) ; java . util . Set < java . lang . Integer > notIn = new java . util . HashSet ( ) ; for ( int i = 0 ; i < 150 ; i ++ ) { in . add ( i ) ; } for ( int i = - 150 ; i < 0 ; i ++ ) { notIn . add ( i ) ; } c6 = new com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion ( "age" , Criterion . Operator . IN , in ) ; c7 = new com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion ( "age" , Criterion . Operator . NOT_IN , notIn ) ; set . add ( c1 ) ; set . add ( c2 ) ; set . add ( c3 ) ; set . add ( c4 ) ; set . add ( c5 ) ; set . add ( c6 ) ; set . add ( c7 ) ; org . springframework . data . domain . Page < com . github . emailtohl . building . site . entities . user . User > page = userRepository . search ( set , p ) ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . AbstractCriterionQueryRepositoryTest . logger . debug ( page . getContent ( ) ) ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . AbstractCriterionQueryRepositoryTest . logger . debug ( page . getNumber ( ) ) ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . AbstractCriterionQueryRepositoryTest . logger . debug ( page . getNumberOfElements ( ) ) ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . AbstractCriterionQueryRepositoryTest . logger . debug ( page . getSize ( ) ) ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . AbstractCriterionQueryRepositoryTest . logger . debug ( page . getTotalElements ( ) ) ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . AbstractCriterionQueryRepositoryTest . logger . debug ( page . getSort ( ) ) ; "<AssertPlaceHolder>" ; com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion c8 = new com . github . emailtohl . building . common . jpa . jpaCriterionQuery . Criterion ( "department.name" , Criterion . Operator . LIKE , foo . getDepartment ( ) . getName ( ) ) ; set . clear ( ) ; set . add ( c8 ) ; page = userRepository . search ( set , p ) ; } getContent ( ) { return content ; }
org . junit . Assert . assertFalse ( page . getContent ( ) . isEmpty ( ) )
testOsRelease2 ( ) { java . lang . String osReleaseReply = org . onosproject . drivers . microsemi . RpcResultParserTest . loadXml ( org . onosproject . drivers . microsemi . RpcResultParserTest . SAMPLE2_XML ) ; java . lang . String osRelease = org . onosproject . drivers . microsemi . RpcResultParser . parseXml ( osReleaseReply , "os-release" ) ; "<AssertPlaceHolder>" ; } parseXml ( java . lang . String , java . lang . String ) { int end = deviceDescriptionResponse . lastIndexOf ( keyWord ) ; end = deviceDescriptionResponse . lastIndexOf ( '<' , end ) ; int start = deviceDescriptionResponse . lastIndexOf ( '>' , end ) ; if ( ( start > 1 ) && ( end > start ) ) { return deviceDescriptionResponse . substring ( ( start + 1 ) , end ) ; } else { return null ; } }
org . junit . Assert . assertEquals ( null , osRelease )
shouldExportMatchPhraseQueryWithAllOptions ( ) { com . couchbase . client . java . search . queries . MatchPhraseQuery fts = com . couchbase . client . java . search . SearchQuery . matchPhrase ( "salty<sp>beers" ) . boost ( 1.5 ) . field ( "field" ) . analyzer ( "analyzer" ) ; com . couchbase . client . java . search . SearchQuery query = new com . couchbase . client . java . search . SearchQuery ( "foo" , fts ) . limit ( 10 ) ; com . couchbase . client . java . document . json . JsonObject expected = com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "query" , com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "match_phrase" , "salty<sp>beers" ) . put ( "analyzer" , "analyzer" ) . put ( "boost" , 1.5 ) . put ( "field" , "field" ) ) . put ( "size" , 10 ) ; "<AssertPlaceHolder>" ; } export ( ) { return "INSERT<sp>INTO<sp>" + ( bucket . toString ( ) ) ; }
org . junit . Assert . assertEquals ( expected , query . export ( ) )
rick ( ) { java . lang . String signatureB64 = "MEQCIAwtk4DStr2MqkrAlOVG+nyQxbS6tnBpVi7OcKCm8/5lAiBjVsv+b+7nI/306iNHrso/ruOaxY8IJy3jw2/zr17JEQ==" ; java . math . BigInteger [ ] bigIntegerArray = org . ebayopensource . fido . uaf . crypto . Asn1 . decodeToBigIntegerArray ( org . apache . commons . codec . binary . Base64 . decodeBase64 ( signatureB64 ) ) ; byte [ ] encoded = org . ebayopensource . fido . uaf . crypto . Asn1 . getEncoded ( bigIntegerArray ) ; java . lang . String encodeBackToBase64 = org . apache . commons . codec . binary . Base64 . encodeBase64String ( encoded ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( signatureB64 . equals ( encodeBackToBase64 ) )
testReverse2 ( ) { org . jerlang . type . List list = new org . jerlang . type . List ( org . jerlang . type . Atom . of ( "element" ) ) ; "<AssertPlaceHolder>" ; } reverse ( org . jerlang . type . List ) { return org . jerlang . stdlib . lists . ListsReverse . reverse_1 ( list ) ; }
org . junit . Assert . assertEquals ( list , org . jerlang . stdlib . Lists . reverse ( list ) )
getJavaKindTest ( ) { for ( Map . Entry < java . lang . reflect . Field , jdk . vm . ci . meta . ResolvedJavaField > e : fields . entrySet ( ) ) { jdk . vm . ci . meta . JavaKind expected = metaAccess . lookupJavaType ( e . getKey ( ) . getType ( ) ) . getJavaKind ( ) ; jdk . vm . ci . meta . JavaKind actual = e . getValue ( ) . getJavaKind ( ) ; "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertEquals ( expected , actual )
testStringCollectSet ( ) { 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 . STRING ) ) ) ; 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 . STRING ) ) ; collectSet . beginFunction ( ) ; collectSet . operateOn ( io . cdap . cdap . api . data . format . StructuredRecord . builder ( schema ) . set ( "x" , "a" ) . build ( ) ) ; collectSet . operateOn ( io . cdap . cdap . api . data . format . StructuredRecord . builder ( schema ) . set ( "x" , "b" ) . build ( ) ) ; collectSet . operateOn ( io . cdap . cdap . api . data . format . StructuredRecord . builder ( schema ) . set ( "x" , "a" ) . build ( ) ) ; java . util . Set set = collectSet . getAggregate ( ) ; java . util . Set < java . lang . String > expectedSet = com . google . common . collect . ImmutableSet . of ( "a" , "b" ) ; "<AssertPlaceHolder>" ; } getAggregate ( ) { return first ; }
org . junit . Assert . assertEquals ( expectedSet , set )
getAuthenticatedResource_authenticated_asNonSystemResource ( ) { final char [ ] password = generateUniquePassword ( ) ; final com . acciente . oacc . Resource authenticatableResource = generateAuthenticatableResource ( password ) ; accessControlContext . authenticate ( authenticatableResource , com . acciente . oacc . PasswordCredentials . newInstance ( password ) ) ; final com . acciente . oacc . Resource authenticatedResource = accessControlContext . getAuthenticatedResource ( ) ; "<AssertPlaceHolder>" ; } getAuthenticatedResource ( ) { __assertAuthenticated ( ) ; if ( ( ( defensiveCopyOfAuthenticatedResource ) == null ) || ( ! ( com . acciente . oacc . sql . internal . SQLAccessControlContext . __isEqual ( defensiveCopyOfAuthenticatedResource , authenticatedResource ) ) ) ) { defensiveCopyOfAuthenticatedResource = com . acciente . oacc . Resources . getInstance ( authenticatedResource . getId ( ) , authenticatedResource . getExternalId ( ) ) ; } return defensiveCopyOfAuthenticatedResource ; }
org . junit . Assert . assertThat ( authenticatedResource , org . hamcrest . CoreMatchers . is ( authenticatableResource ) )
testGetters ( ) { gov . hhs . fha . nhinc . docsubmission . outbound . deferred . response . PassthroughOutboundDocSubmissionDeferredResponse passthruOrch = new gov . hhs . fha . nhinc . docsubmission . outbound . deferred . response . PassthroughOutboundDocSubmissionDeferredResponse ( ) ; "<AssertPlaceHolder>" ; } getOutboundDocSubmissionDeferredResponseDelegate ( ) { return new gov . hhs . fha . nhinc . docsubmission . entity . deferred . response . OutboundDocSubmissionDeferredResponseDelegate ( ) ; }
org . junit . Assert . assertNotNull ( passthruOrch . getOutboundDocSubmissionDeferredResponseDelegate ( ) )
appliesBothConverters ( ) { org . mule . runtime . core . api . transformer . Transformer converter1 = new org . mule . runtime . core . internal . transformer . builder . MockConverterBuilder ( ) . from ( org . mule . runtime . core . api . config . TransformationServiceTestCase . dataTypeB ) . to ( org . mule . runtime . core . api . config . TransformationServiceTestCase . dataTypeC ) . returning ( new org . mule . runtime . core . api . config . TransformationServiceTestCase . C ( ) ) . build ( ) ; org . mule . runtime . core . api . transformer . Transformer converter2 = new org . mule . runtime . core . internal . transformer . builder . MockConverterBuilder ( ) . from ( org . mule . runtime . core . api . config . TransformationServiceTestCase . dataTypeC ) . to ( org . mule . runtime . core . api . config . TransformationServiceTestCase . dataTypeD ) . returning ( new org . mule . runtime . core . api . config . TransformationServiceTestCase . D ( ) ) . build ( ) ; org . mule . runtime . api . message . Message message = of ( new org . mule . runtime . core . api . config . TransformationServiceTestCase . B ( ) ) ; message = transformationService . applyTransformers ( message , null , converter1 , converter2 ) ; "<AssertPlaceHolder>" ; verifyTransformerExecuted ( converter1 ) ; verifyTransformerExecuted ( converter2 ) ; } getPayload ( ) { return payload ; }
org . junit . Assert . assertTrue ( ( ( message . getPayload ( ) . getValue ( ) ) instanceof org . mule . runtime . core . api . config . TransformationServiceTestCase . D ) )
testBasicQueryFromWithEndParam ( ) { java . lang . String query = "select<sp>*<sp>from<sp>openTSDB.`(metric=warp.speed.test,<sp>aggregator=sum,<sp>start=47y-ago,<sp>end=1407165403000))`" ; "<AssertPlaceHolder>" ; } testSql ( java . lang . String ) { return org . apache . drill . test . BaseTestQuery . testRunAndPrint ( QueryType . SQL , query ) ; }
org . junit . Assert . assertEquals ( 5 , testSql ( query ) )
testGetEventID ( ) { "<AssertPlaceHolder>" ; } getEventID ( ) { return eventID ; }
org . junit . Assert . assertNotNull ( e . getEventID ( ) )
testGetFromEmptyQueue ( ) { org . antlr . runtime . misc . FastQueue < java . lang . String > q = new org . antlr . runtime . misc . FastQueue < java . lang . String > ( ) ; java . lang . String msg = null ; try { q . remove ( ) ; } catch ( java . util . NoSuchElementException nsee ) { msg = nsee . getMessage ( ) ; } java . lang . String expecting = "queue<sp>index<sp>0<sp>><sp>last<sp>index<sp>-1" ; java . lang . String found = msg ; "<AssertPlaceHolder>" ; } getMessage ( ) { if ( ( elementDescription ) != null ) { return elementDescription ; } return null ; }
org . junit . Assert . assertEquals ( expecting , found )
newlyWrittenFileMustNotBeDeletedDueToLateClose ( ) { org . apache . lucene . store . Directory cow1 = copier . getCoWDir ( ) ; writeFile ( cow1 , "a" ) ; cow1 . close ( ) ; org . apache . lucene . store . Directory cor1 = copier . getCoRDir ( ) ; org . apache . lucene . store . Directory cow2 = copier . getCoWDir ( ) ; writeFile ( cow2 , "fileX" ) ; cow2 . close ( ) ; cor1 . close ( ) ; "<AssertPlaceHolder>" ; } existsLocally ( java . lang . String ) { return new java . io . File ( localFSDir , fileName ) . exists ( ) ; }
org . junit . Assert . assertTrue ( existsLocally ( "fileX" ) )
testWriteRequestXML ( ) { System . out . println ( "writeRequestXML" ) ; org . wiztools . restclient . bean . RequestBean bean = getDefaultRequestBean ( ) ; java . io . File f = java . io . File . createTempFile ( "prefix" , ".rcq" ) ; pWrite . writeRequest ( bean , f ) ; org . wiztools . restclient . bean . Request expResult = pRead . getRequestFromFile ( f ) ; "<AssertPlaceHolder>" ; } getRequestFromFile ( java . io . File ) { nu . xom . Document doc = getDocumentFromFile ( f ) ; return xml2Request ( doc ) ; }
org . junit . Assert . assertEquals ( expResult , bean )
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final java . lang . String xmlEsperado = "<NFInfoEventoCancelamento<sp>Id=\"hluU2zKt4QK5bEktOiGfpZw64535p2A4Z5m5egLQbMpjnCH48c1aw6\"><cOrgao>42</cOrgao><tpAmb>2</tpAmb><CNPJ>12345678901234</CNPJ><chNFe>81568004734874930428983724940883089298523837</chNFe><dhEvento>2014-01-01T10:10:10-02:00</dhEvento><tpEvento>123456</tpEvento><nSeqEvento>2</nSeqEvento><verEvento>2.49</verEvento><detEvento<sp>versao=\"3.10\"><descEvento>Cancelamento</descEvento><nProt>123456789012345</nProt><xJust>Justificativa<sp>qualquer<sp>coisa</xJust></detEvento></NFInfoEventoCancelamento>" ; "<AssertPlaceHolder>" ; } getNFInfoEventoCancelamento ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFInfoEventoCancelamento infoEventoCancelamento = new com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFInfoEventoCancelamento ( ) ; infoEventoCancelamento . setAmbiente ( DFAmbiente . HOMOLOGACAO ) ; infoEventoCancelamento . setCancelamento ( com . fincatto . documentofiscal . nfe310 . FabricaDeObjetosFake . getNFInfoCancelamento ( ) ) ; infoEventoCancelamento . setChave ( "81568004734874930428983724940883089298523837" ) ; infoEventoCancelamento . setCnpj ( "12345678901234" ) ; infoEventoCancelamento . setCodigoEvento ( "123456" ) ; infoEventoCancelamento . setDataHoraEvento ( java . time . ZonedDateTime . of ( java . time . LocalDateTime . from ( java . time . format . DateTimeFormatter . ofPattern ( "yyyy-MM-dd<sp>HH:mm:ss" ) . parse ( "2014-01-01<sp>10:10:10" ) ) , java . time . ZoneId . systemDefault ( ) ) ) ; infoEventoCancelamento . setId ( "hluU2zKt4QK5bEktOiGfpZw64535p2A4Z5m5egLQbMpjnCH48c1aw6" ) ; infoEventoCancelamento . setNumeroSequencialEvento ( 2 ) ; infoEventoCancelamento . setOrgao ( DFUnidadeFederativa . SC ) ; infoEventoCancelamento . setCodigoEvento ( "123456" ) ; infoEventoCancelamento . setVersaoEvento ( new java . math . BigDecimal ( "2.49" ) ) ; return infoEventoCancelamento ; }
org . junit . Assert . assertEquals ( xmlEsperado , com . fincatto . documentofiscal . nfe310 . FabricaDeObjetosFake . getNFInfoEventoCancelamento ( ) . toString ( ) )
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . ihe . operations . VitalSignsSectionOperations obj = new org . openhealthtools . mdht . uml . cda . ihe . operations . VitalSignsSectionOperations ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
atomicNumberIsNotCleared ( ) { org . openscience . cdk . interfaces . IAtomContainer container = org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; org . openscience . cdk . interfaces . IAtom atom1 = org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ; org . openscience . cdk . interfaces . IAtom atom2 = org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "O" ) ; org . openscience . cdk . interfaces . IAtom atom3 = org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ; container . addAtom ( atom1 ) ; container . addAtom ( atom2 ) ; container . addAtom ( atom3 ) ; container . addBond ( new org . openscience . cdk . Bond ( atom1 , atom2 , org . openscience . cdk . interfaces . IBond . Order . SINGLE ) ) ; container . addBond ( new org . openscience . cdk . Bond ( atom2 , atom3 , org . openscience . cdk . interfaces . IBond . Order . SINGLE ) ) ; org . openscience . cdk . tools . manipulator . AtomContainerManipulator . clearAtomConfigurations ( container ) ; for ( org . openscience . cdk . interfaces . IAtom atom : container . atoms ( ) ) { "<AssertPlaceHolder>" ; } } getAtomicNumber ( ) { return this . atomicNumber ; }
org . junit . Assert . assertNotNull ( atom . getAtomicNumber ( ) )
testAddHeaderWithNoProlog ( ) { java . lang . String header = org . codehaus . mojo . license . header . transformer . XmlFileHeaderTransformerTest . HEADER ; java . lang . String content = org . codehaus . mojo . license . header . transformer . XmlFileHeaderTransformerTest . CONTENT ; java . lang . String result = transformer . addHeader ( header , content ) ; "<AssertPlaceHolder>" ; } addHeader ( java . lang . String , java . lang . String ) { java . lang . String result ; java . lang . String prolog = null ; int startProlog = content . indexOf ( "<?xml" ) ; if ( startProlog > ( - 1 ) ) { int endProlog = content . indexOf ( "?>" , startProlog ) ; if ( endProlog > ( - 1 ) ) { prolog = content . substring ( 0 , ( endProlog + 2 ) ) ; } } if ( prolog == null ) { result = super . addHeader ( header , content ) ; } else { content = content . substring ( prolog . length ( ) ) ; result = super . addHeader ( ( ( prolog + ( LINE_SEPARATOR ) ) + header ) , content ) ; } return result ; }
org . junit . Assert . assertEquals ( ( header + content ) , result )
findFiles_vfs_hdfs ( ) { org . pentaho . hadoop . shim . common . DistributedCacheUtilImpl ch = new org . pentaho . hadoop . shim . common . DistributedCacheUtilImpl ( org . pentaho . hadoop . shim . common . DistributedCacheUtilImplTest . TEST_CONFIG ) ; java . net . URL url = new java . net . URL ( "http://localhost:8020/path/to/file" ) ; org . apache . hadoop . conf . Configuration conf = mock ( org . apache . hadoop . conf . Configuration . class ) ; org . apache . hadoop . fs . FileSystem fs = mock ( org . apache . hadoop . fs . FileSystem . class ) ; org . apache . commons . vfs2 . FileObject source = mock ( org . apache . commons . vfs2 . FileObject . class ) ; org . apache . hadoop . fs . Path dest = mock ( org . apache . hadoop . fs . Path . class ) ; org . apache . commons . vfs2 . FileObject hdfsDest = mock ( org . apache . commons . vfs2 . FileObject . class ) ; org . apache . hadoop . fs . Path root = mock ( org . apache . hadoop . fs . Path . class ) ; org . apache . commons . vfs2 . FileObject [ ] fileObjects = new org . apache . commons . vfs2 . FileObject [ 12 ] ; for ( int i = 0 ; i < ( fileObjects . length ) ; i ++ ) { java . net . URL fileUrl = new java . net . URL ( ( "http://localhost:8020/path/to/file/" + i ) ) ; org . apache . commons . vfs2 . FileObject fileObject = mock ( org . apache . commons . vfs2 . FileObject . class ) ; fileObjects [ i ] = fileObject ; doReturn ( fileUrl ) . when ( fileObject ) . getURL ( ) ; } doReturn ( url ) . when ( source ) . getURL ( ) ; doReturn ( conf ) . when ( fs ) . getConf ( ) ; doReturn ( 0 ) . when ( conf ) . getInt ( any ( java . lang . String . class ) , anyInt ( ) ) ; doReturn ( true ) . when ( source ) . exists ( ) ; doReturn ( fileObjects ) . when ( hdfsDest ) . findFiles ( any ( org . apache . commons . vfs2 . FileSelector . class ) ) ; doReturn ( true ) . when ( fs ) . delete ( root , true ) ; doReturn ( fileObjects . length ) . when ( source ) . delete ( any ( org . apache . commons . vfs2 . AllFileSelector . class ) ) ; doNothing ( ) . when ( fs ) . copyFromLocalFile ( any ( org . apache . hadoop . fs . Path . class ) , any ( org . apache . hadoop . fs . Path . class ) ) ; doNothing ( ) . when ( fs ) . setPermission ( any ( org . apache . hadoop . fs . Path . class ) , any ( org . apache . hadoop . fs . permission . FsPermission . class ) ) ; doReturn ( true ) . when ( fs ) . setReplication ( any ( org . apache . hadoop . fs . Path . class ) , anyShort ( ) ) ; try { try { ch . stageForCache ( source , fs , dest , true ) ; java . util . List < java . lang . String > files = ch . findFiles ( hdfsDest , null ) ; "<AssertPlaceHolder>" ; } finally { fs . delete ( root , true ) ; } } finally { source . delete ( new org . apache . commons . vfs2 . AllFileSelector ( ) ) ; } } findFiles ( org . apache . commons . vfs2 . FileObject , java . lang . String ) { org . apache . commons . vfs2 . FileObject [ ] files = root . findFiles ( new org . apache . commons . vfs2 . FileSelector ( ) { @ org . pentaho . hadoop . shim . common . Override public boolean includeFile ( org . apache . commons . vfs2 . FileSelectInfo fileSelectInfo ) throws org . pentaho . hadoop . shim . common . Exception { return ( extension == null ) || ( extension . equals ( fileSelectInfo . getFile ( ) . getName ( ) . getExtension ( ) ) ) ; } @ org . pentaho . hadoop . shim . common . Override public boolean traverseDescendents ( org . apache . commons . vfs2 . FileSelectInfo fileSelectInfo ) throws org . pentaho . hadoop . shim . common . Exception { return FileType . FOLDER . equals ( fileSelectInfo . getFile ( ) . getType ( ) ) ; } } ) ; if ( files == null ) { return java . util . Collections . EMPTY_LIST ; } java . util . List < java . lang . String > paths = new java . util . ArrayList < java . lang . String > ( ) ; for ( org . apache . commons . vfs2 . FileObject file : files ) { try { paths . add ( file . getURL ( ) . toURI ( ) . getPath ( ) ) ; } catch ( java . net . URISyntaxException ex ) { throw new org . apache . commons . vfs2 . FileSystemException ( ( "Error<sp>getting<sp>URI<sp>of<sp>file:<sp>" + ( file . getURL ( ) . getPath ( ) ) ) ) ; } } return paths ; }
org . junit . Assert . assertEquals ( 12 , files . size ( ) )
test_Filter19 ( ) { java . lang . String expected = "dfbcacbfd" ; java . lang . String actual ; org . osgi . framework . Bundle bundle = installBundle ( org . eclipse . equinox . http . servlet . tests . TEST_BUNDLE_1 ) ; try { bundle . start ( ) ; actual = requestAdvisor . request ( "TestFilter18/foo/bar/baz/with/path/info" ) ; } finally { uninstallBundle ( bundle ) ; } "<AssertPlaceHolder>" ; } uninstallBundle ( org . osgi . framework . Bundle ) { org . eclipse . equinox . internal . security . tests . storage . WaitingRegistryListener listener = new org . eclipse . equinox . internal . security . tests . storage . WaitingRegistryListener ( ) ; listener . register ( "org.eclipse.equinox.security.secureStorage" ) ; try { bundle . uninstall ( ) ; bundle = null ; org . junit . Assert . assertTrue ( ( ( listener . waitFor ( 1 , ( 10 * ( org . eclipse . equinox . internal . security . tests . storage . DynamicPreferencesTest . MAX_TIME_PER_BUNDLE ) ) ) ) == 1 ) ) ; return true ; } finally { listener . unregister ( ) ; if ( bundle != null ) bundle . uninstall ( ) ; } }
org . junit . Assert . assertEquals ( expected , actual )
shouldReplaceArgumentWhenNameIsNull ( ) { com . oracle . bedrock . OptionsByType optionsByType = com . oracle . bedrock . OptionsByType . empty ( ) ; optionsByType . add ( com . oracle . bedrock . runtime . options . Argument . of ( "A1" , "A1" ) ) ; optionsByType . add ( com . oracle . bedrock . runtime . options . Argument . of ( "A21" ) ) ; optionsByType . add ( com . oracle . bedrock . runtime . options . Argument . of ( "A22" ) ) ; optionsByType . add ( com . oracle . bedrock . runtime . options . Argument . of ( "A3" , "A3" ) ) ; com . oracle . bedrock . runtime . options . Arguments arguments = optionsByType . get ( com . oracle . bedrock . runtime . options . Arguments . class ) . replace ( null , "changed" ) ; "<AssertPlaceHolder>" ; } resolve ( com . oracle . bedrock . runtime . Platform , com . oracle . bedrock . OptionsByType ) { com . oracle . bedrock . lang . ExpressionEvaluator evaluator = new com . oracle . bedrock . lang . ExpressionEvaluator ( optionsByType ) ; java . util . Properties properties = new java . util . Properties ( ) ; for ( com . oracle . bedrock . runtime . java . options . SystemProperty property : this . properties . values ( ) ) { java . lang . String name = property . getName ( ) ; java . lang . Object value = property . getValue ( ) ; if ( value != null ) { if ( value instanceof com . oracle . bedrock . runtime . java . options . SystemProperty . ContextSensitiveValue ) { com . oracle . bedrock . runtime . java . options . SystemProperty . ContextSensitiveValue contextSensitiveValue = ( ( com . oracle . bedrock . runtime . java . options . SystemProperty . ContextSensitiveValue ) ( value ) ) ; value = contextSensitiveValue . resolve ( name , platform , optionsByType ) ; } if ( value instanceof java . util . Iterator < ? > ) { java . util . Iterator < ? > iterator = ( ( java . util . Iterator < ? > ) ( value ) ) ; if ( iterator . hasNext ( ) ) { value = iterator . next ( ) . toString ( ) ; } else { throw new java . lang . IndexOutOfBoundsException ( java . lang . String . format ( "No<sp>more<sp>values<sp>available<sp>for<sp>the<sp>property<sp>[%s]" , name ) ) ; } } if ( value != null ) { java . lang . String expression = value . toString ( ) . trim ( ) ; if ( ! ( expression . isEmpty ( ) ) ) { java . lang . Object result = evaluator . evaluate ( expression , java . lang . Object . class ) ; expression = ( result == null ) ? "" : result . toString ( ) ; } com . oracle . bedrock . OptionsByType propertyOptions = property . getOptions ( ) ; java . lang . Iterable < com . oracle . bedrock . runtime . java . options . SystemProperty . ResolveHandler > handlers = propertyOptions . getInstancesOf ( SystemProperty . ResolveHandler . class ) ; for ( com . oracle . bedrock . runtime . java . options . SystemProperty . ResolveHandler handler : handlers ) { try { handler . onResolve ( name , expression , optionsByType ) ; } catch ( java . lang . Throwable t ) { t . printStackTrace ( ) ; } } properties . put ( name , expression ) ; } } } return properties ; }
org . junit . Assert . assertThat ( arguments . resolve ( null , null ) , contains ( "A1" , "A1" , "changed" , "A22" , "A3" , "A3" ) )
testGetRendition_MultiMatchingRegex ( ) { com . adobe . acs . commons . dam . RenditionPatternPicker instance = new com . adobe . acs . commons . dam . RenditionPatternPicker ( "^cq5dam\\.thumb*" ) ; com . day . cq . dam . api . Rendition expResult = largeRendition ; com . day . cq . dam . api . Rendition result = instance . getRendition ( asset ) ; "<AssertPlaceHolder>" ; } getRendition ( com . day . cq . dam . api . Asset ) { final java . util . List < com . day . cq . dam . api . Rendition > renditions = asset . getRenditions ( ) ; final java . util . regex . Pattern p = getPattern ( ) ; boolean hasOriginal = ( asset . getOriginal ( ) ) != null ; boolean hasRenditions = ( renditions . size ( ) ) > 0 ; for ( final com . day . cq . dam . api . Rendition rendition : renditions ) { final java . util . regex . Matcher m = p . matcher ( rendition . getName ( ) ) ; if ( m . find ( ) ) { return rendition ; } } if ( hasOriginal ) { return asset . getOriginal ( ) ; } else if ( hasRenditions ) { return renditions . get ( 0 ) ; } else { return null ; } }
org . junit . Assert . assertEquals ( expResult , result )
verifyContentWithSeparateSignature ( ) { java . io . InputStream message = new java . io . ByteArrayInputStream ( "Test<sp>Message" . getBytes ( StandardCharsets . UTF_8 ) ) ; java . io . InputStream signature = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "detached_signature.binary" ) ; "<AssertPlaceHolder>" ; verifyContentWithSeparateSignature ( message , signature , "rsa" ) ; } getResourceAsStream ( java . lang . String ) { java . io . InputStream is = null ; if ( ( runtimeProviderVersion ) != null ) { is = doGetResourceAsStream ( name , runtimeProviderVersion ) ; } if ( ( is == null ) && ( ( version ) != null ) ) { is = doGetResourceAsStream ( name , version ) ; } if ( is == null ) { is = org . apache . camel . catalog . maven . MavenVersionManager . class . getClassLoader ( ) . getResourceAsStream ( name ) ; } return is ; }
org . junit . Assert . assertNotNull ( signature )
InheritanceExtendsAbstractClass ( ) { java . lang . String fromClass = "Domain.Direct.Violating.InheritanceExtendsAbstractClass" ; java . lang . String toClass = "Technology.Direct.Dao.FriendsDAO" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typesToFind . add ( "Inheritance" ) ; "<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 ) )
serialize_ContainerWithLinePlotOptions_PlotOptionsAndTypeSerialized ( ) { com . vaadin . addon . charts . model . PlotOptionsLine plotOptions = new com . vaadin . addon . charts . model . PlotOptionsLine ( ) ; plotOptions . setShowInLegend ( true ) ; final com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . Pair < com . vaadin . data . provider . ListDataProvider < com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItem > , com . vaadin . addon . charts . model . DataProviderSeries < com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItem > > pair = createTuple ( ) ; final com . vaadin . addon . charts . model . DataProviderSeries < com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItem > dataProviderSeries = pair . getT2 ( ) ; dataProviderSeries . setY ( com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItem :: getY ) ; dataProviderSeries . setPlotOptions ( plotOptions ) ; com . vaadin . addon . charts . model . Configuration config = new com . vaadin . addon . charts . model . Configuration ( ) ; config . addSeries ( dataProviderSeries ) ; java . lang . String actual = toJSON ( dataProviderSeries ) ; java . lang . String expected = "{\"type\":\"line\",\"showInLegend\":true,\"data\":[]}" ; "<AssertPlaceHolder>" ; } toJSON ( com . vaadin . addon . charts . model . AbstractConfigurationObject ) { try { return com . vaadin . addon . charts . util . ChartSerialization . jsonWriter . writeValueAsString ( object ) ; } catch ( com . fasterxml . jackson . core . JsonProcessingException e ) { e . printStackTrace ( ) ; throw new java . lang . RuntimeException ( ( "Error<sp>while<sp>serializing<sp>" + ( object . getClass ( ) . getSimpleName ( ) ) ) , e ) ; } }
org . junit . Assert . assertEquals ( expected , actual )
testGetName ( ) { boolean flag = odps . projects ( ) . exists ( "project_not_exist" ) ; "<AssertPlaceHolder>" ; } exists ( java . lang . String ) { return exists ( name , getDefaultProjectName ( ) ) ; }
org . junit . Assert . assertEquals ( false , flag )
testFindUser_valid_user ( ) { com . captaindebug . cargocult . User expected = new com . captaindebug . cargocult . User ( 0L , com . captaindebug . cargocult . ntier . UserServiceTest . NAME , "aaa@bbb.com" , new java . util . Date ( ) ) ; when ( userDao . findUser ( com . captaindebug . cargocult . ntier . UserServiceTest . NAME ) ) . thenReturn ( expected ) ; com . captaindebug . cargocult . User result = instance . findUser ( com . captaindebug . cargocult . ntier . UserServiceTest . NAME ) ; "<AssertPlaceHolder>" ; } findUser ( java . lang . String ) { com . captaindebug . cargocult . User user ; try { com . captaindebug . cargocult . ntier . FindUserMapper rowMapper = new com . captaindebug . cargocult . ntier . FindUserMapper ( ) ; user = jdbcTemplate . queryForObject ( com . captaindebug . cargocult . ntier . UserDaoImpl . FIND_USER_BY_NAME , rowMapper , name ) ; } catch ( org . springframework . dao . EmptyResultDataAccessException e ) { user = com . captaindebug . cargocult . User . NULL_USER ; } return user ; }
org . junit . Assert . assertEquals ( expected , result )
testCanSetupDefaultValueWhenEditingPatternIsNull ( ) { when ( plugin . patternWrapper ( ) ) . thenReturn ( null ) ; "<AssertPlaceHolder>" ; } canSetupDefaultValue ( ) { if ( ! ( isDefaultValueEnabled ( ) ) ) { return false ; } if ( ( tableFormat ( ) ) != ( GuidedDecisionTable52 . TableFormat . EXTENDED_ENTRY ) ) { return false ; } if ( doesNotHaveFactTypeOrFactField ( ) ) { return false ; } if ( ! ( org . drools . workbench . screens . guided . dtable . client . wizard . column . pages . ValueOptionsPage . plugin ( ) . doesOperatorNeedValue ( ) ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( page . canSetupDefaultValue ( ) )
testCreateNodeWithNoField ( ) { try ( com . syncleus . ferma . tx . Tx tx = tx ( ) ) { com . gentics . mesh . core . rest . node . NodeResponse response = createNode ( com . gentics . mesh . core . field . date . DateFieldEndpointTest . FIELD_NAME , ( ( com . gentics . mesh . core . rest . node . field . Field ) ( null ) ) ) ; com . gentics . mesh . core . rest . node . field . impl . DateFieldImpl field = response . getFields ( ) . getDateField ( com . gentics . mesh . core . field . date . DateFieldEndpointTest . FIELD_NAME ) ; "<AssertPlaceHolder>" ; } } getDateField ( java . lang . String ) { return getField ( key , FieldTypes . DATE ) ; }
org . junit . Assert . assertNull ( field )
computeFactor_SummerTimeWeek ( ) { long startTimeUsage = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-03-13<sp>00:00:00" ) ; long endTimeUsage = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-03-25<sp>23:59:59" ) ; org . oscm . billingservice . service . model . BillingInput billingInput = org . oscm . billingservice . business . calculation . revenue . BillingInputFactory . newBillingInput ( "2012-03-01<sp>00:00:00" , "2012-04-01<sp>00:00:00" ) ; double factor = calculator . computeFactor ( PricingPeriod . WEEK , billingInput , startTimeUsage , endTimeUsage , true , true ) ; "<AssertPlaceHolder>" ; } computeFactor ( org . oscm . internal . types . enumtypes . PricingPeriod , org . oscm . billingservice . service . model . BillingInput , long , long , boolean , boolean ) { if ( usagePeriodEnd < usagePeriodStart ) { throw new org . oscm . internal . types . exception . IllegalArgumentException ( ( ( ( ( "Usage<sp>period<sp>end<sp>(" + ( new java . util . Date ( usagePeriodEnd ) ) ) + ")<sp>before<sp>usage<sp>period<sp>start<sp>(" ) + ( new java . util . Date ( usagePeriodStart ) ) ) + ")" ) ) ; } java . util . Calendar adjustedBillingPeriodStart = org . oscm . billingservice . business . calculation . revenue . PricingPeriodDateConverter . getStartTime ( billingInput . getCutOffDate ( ) , pricingPeriod ) ; java . util . Calendar adjustedBillingPeriodEnd = org . oscm . billingservice . business . calculation . revenue . PricingPeriodDateConverter . getStartTime ( billingInput . getBillingPeriodEnd ( ) , pricingPeriod ) ; if ( usagePeriodOutsideOfAdjustedBillingPeriod ( usagePeriodStart , usagePeriodEnd , adjustedBillingPeriodStart . getTimeInMillis ( ) , adjustedBillingPeriodEnd . getTimeInMillis ( ) ) ) { return 0.0 ; } else { java . util . Calendar startTimeForFactorCalculation = determineStartTimeForFactorCalculation ( pricingPeriod , adjustedBillingPeriodStart , usagePeriodStart , adjustsPeriodStart ) ; java . util . Calendar endTimeForFactorCalculation = determineEndTimeForFactorCalculation ( pricingPeriod , adjustedBillingPeriodEnd , usagePeriodEnd , adjustsPeriodEnd ) ; return computeFractionalFactor ( startTimeForFactorCalculation . getTimeInMillis ( ) , endTimeForFactorCalculation . getTimeInMillis ( ) , pricingPeriod ) ; } }
org . junit . Assert . assertEquals ( 2 , factor , 0 )
test ( ) { java . util . List < io . datakernel . bytebuf . ByteBuf > data = java . util . Arrays . asList ( io . datakernel . bytebuf . ByteBuf . wrapForReading ( "hello<sp>world,<sp>this<sp>is<sp>some<sp>lines<sp>of<sp>text<sp>to<sp>be<sp>encrypted,<sp>yaay!" . getBytes ( io . global . common . UTF_8 ) ) , io . datakernel . bytebuf . ByteBuf . wrapForReading ( "here<sp>is<sp>also<sp>some<sp>pretty<sp>random<sp>text<sp>that,<sp>however,<sp>looks<sp>very<sp>distinctly<sp>for<sp>the<sp>human<sp>eye" . getBytes ( io . global . common . UTF_8 ) ) , io . datakernel . bytebuf . ByteBuf . wrapForReading ( "third<sp>one<sp>is<sp>the<sp>worst<sp>one,<sp>we're<sp>played<sp>ourselves,<sp>hurray" . getBytes ( io . global . common . UTF_8 ) ) ) ; io . global . common . SimKey key = io . global . common . SimKey . generate ( ) ; byte [ ] nonce = io . global . common . CryptoUtils . nonceFromString ( "test.txt" ) ; long pos = java . util . concurrent . ThreadLocalRandom . current ( ) . nextLong ( ( ( Long . MAX_VALUE ) > > > 1 ) ) ; java . util . List < io . datakernel . bytebuf . ByteBuf > encList = await ( io . datakernel . csp . ChannelSupplier . ofIterable ( data ) . transformWith ( io . global . common . CipherTransformer . create ( key , nonce , pos ) ) . toList ( ) ) ; java . util . List < io . datakernel . bytebuf . ByteBuf > decList = await ( io . datakernel . csp . ChannelSupplier . ofIterable ( encList ) . transformWith ( io . global . common . CipherTransformer . create ( key , nonce , pos ) ) . toList ( ) ) ; "<AssertPlaceHolder>" ; } toList ( ) { System . out . println ( "Collecting<sp>group<sp>of<sp>Promises<sp>to<sp>list<sp>of<sp>Promises'<sp>results:" ) ; io . datakernel . async . Promises . toList ( io . datakernel . async . Promise . of ( 1 ) , io . datakernel . async . Promise . of ( 2 ) , io . datakernel . async . Promise . of ( 3 ) , io . datakernel . async . Promise . of ( 4 ) , io . datakernel . async . Promise . of ( 5 ) , io . datakernel . async . Promise . of ( 6 ) ) . whenResult ( ( list ) -> System . out . println ( ( ( ( "Size<sp>of<sp>collected<sp>list:<sp>" + ( list . size ( ) ) ) + "\nList:<sp>" ) + list ) ) ) ; System . out . println ( ) ; }
org . junit . Assert . assertEquals ( data , decList )
testChangeTagMode ( ) { final java . lang . String tagName = "myTag" ; org . dcache . chimera . FsInode base = _rootInode . mkdir ( "junit" ) ; _fs . createTag ( base , tagName ) ; org . dcache . chimera . FsInode tagInode = new org . dcache . chimera . FsInode_TAG ( _fs , base . ino ( ) , tagName ) ; org . dcache . chimera . posix . Stat stat = new org . dcache . chimera . posix . Stat ( ) ; stat . setMode ( 7 ) ; tagInode . setStat ( stat ) ; "<AssertPlaceHolder>" ; } stat ( ) { org . dcache . chimera . posix . Stat ret = super . stat ( ) ; ret . setMode ( ( ( ( ret . getMode ( ) ) & 511 ) | ( UnixPermission . S_IFREG ) ) ) ; if ( ( _path ) == null ) { _path = ( ( _fs . inode2path ( this ) ) + '\n' ) . getBytes ( StandardCharsets . UTF_8 ) ; } ret . setSize ( _path . length ) ; return ret ; }
org . junit . Assert . assertEquals ( ( 7 | ( UnixPermission . S_IFREG ) ) , tagInode . stat ( ) . getMode ( ) )
testSerialization ( ) { org . jfree . chart . plot . MultiplePiePlot p1 = new org . jfree . chart . plot . MultiplePiePlot ( null ) ; p1 . setAggregatedItemsPaint ( new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . yellow , 3.0F , 4.0F , java . awt . Color . RED ) ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( p1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . plot . MultiplePiePlot p2 = ( ( org . jfree . chart . plot . MultiplePiePlot ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( p1 , p2 )
testSetBytesWithNull ( ) { org . apache . qpid . jms . message . JmsMapMessage mapMessage = factory . createMapMessage ( ) ; java . lang . String name = "myName" ; mapMessage . setBytes ( name , null ) ; "<AssertPlaceHolder>" ; } getBytes ( java . lang . String ) { java . lang . Object value = getObject ( name ) ; if ( value == null ) { return null ; } else if ( value instanceof byte [ ] ) { byte [ ] original = ( ( byte [ ] ) ( value ) ) ; byte [ ] clone = new byte [ original . length ] ; java . lang . System . arraycopy ( original , 0 , clone , 0 , original . length ) ; return clone ; } else { throw new javax . jms . MessageFormatException ( ( "Cannot<sp>read<sp>a<sp>byte[]<sp>from<sp>" + ( value . getClass ( ) . getSimpleName ( ) ) ) ) ; } }
org . junit . Assert . assertNull ( mapMessage . getBytes ( name ) )
testResolveUri ( ) { org . apache . beam . sdk . extensions . gcp . util . gcsfs . GcsPath path = org . apache . beam . sdk . extensions . gcp . util . gcsfs . GcsPath . fromComponents ( "bucket" , "a/b/c" ) ; org . apache . beam . sdk . extensions . gcp . util . gcsfs . GcsPath d = path . resolve ( "gs://bucket2/d" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return org . apache . beam . vendor . guava . v20_0 . com . google . common . base . MoreObjects . toStringHelper ( this ) . omitNullValues ( ) . add ( "apiServiceDescriptor" , apiServiceDescriptor ) . add ( "consumers" , consumers ) . toString ( ) ; }
org . junit . Assert . assertEquals ( "gs://bucket2/d" , d . toString ( ) )
updateBinAdminReferences ( ) { java . io . File binAdmin = new java . io . File ( git . getRepository ( ) . getWorkTree ( ) , "bin/admin" ) ; org . apache . commons . io . FileUtils . copyFile ( new java . io . File ( "src/test/resources/files/bin/admin" ) , binAdmin ) ; java . util . List < io . fabric8 . patch . management . BundleUpdate > bundleUpdates = new java . util . LinkedList ( ) ; bundleUpdates . add ( io . fabric8 . patch . management . BundleUpdate . from ( "mvn:org.apache.karaf.admin/org.apache.karaf.admin.command/2.4.0.redhat-620133" ) . to ( "mvn:org.apache.karaf.admin/org.apache.karaf.admin.command/2.4.0.redhat-620134" ) ) ; bundleUpdates . add ( io . fabric8 . patch . management . BundleUpdate . from ( "mvn:org.apache.felix/org.apache.felix.gogo.runtime/0.12.1" ) . to ( "mvn:org.apache.felix/org.apache.felix.gogo.runtime/1.12.1" ) ) ; java . util . Map < java . lang . String , java . lang . String > updates = io . fabric8 . patch . management . Utils . collectLocationUpdates ( bundleUpdates ) ; new io . fabric8 . patch . management . impl . GitPatchManagementServiceImpl ( context ) . updateReferences ( git , "bin/admin" , "system/" , updates , false ) ; java . lang . String expected = org . apache . commons . io . FileUtils . readFileToString ( new java . io . File ( "src/test/resources/files/bin/admin.updated" ) ) ; java . lang . String changed = org . apache . commons . io . FileUtils . readFileToString ( binAdmin ) ; "<AssertPlaceHolder>" ; } updateReferences ( org . eclipse . jgit . api . Git , java . lang . String , java . lang . String , java . util . Map , boolean ) { java . io . File updatedFile = new java . io . File ( fork . getRepository ( ) . getWorkTree ( ) , file ) ; if ( ! ( updatedFile . isFile ( ) ) ) { return ; } java . io . BufferedReader reader = null ; java . io . StringWriter sw = new java . io . StringWriter ( ) ; try { io . fabric8 . patch . management . impl . Activator . log2 ( org . osgi . service . log . LogService . LOG_INFO , ( ( "Updating<sp>\"" + file ) + "\"" ) ) ; reader = new java . io . BufferedReader ( new java . io . FileReader ( updatedFile ) ) ; java . lang . String line = null ; while ( ( line = reader . readLine ( ) ) != null ) { for ( Map . Entry < java . lang . String , java . lang . String > entry : locationUpdates . entrySet ( ) ) { java . lang . String pattern = prefix + ( entry . getKey ( ) ) ; java . lang . String replacement = prefix + ( entry . getValue ( ) ) ; if ( useBackSlash ) { pattern = pattern . replaceAll ( "/" , "\\\\" ) ; replacement = replacement . replaceAll ( "/" , "\\\\" ) ; } if ( line . contains ( pattern ) ) { line = line . replace ( pattern , replacement ) ; } } sw . append ( line ) ; if ( useBackSlash ) { sw . append ( "\r" ) ; } sw . append ( "\n" ) ; } org . apache . commons . io . IOUtils . closeQuietly ( reader ) ; org . apache . commons . io . FileUtils . write ( updatedFile , sw . toString ( ) ) ; } catch ( java . lang . Exception e ) { io . fabric8 . patch . management . impl . Activator . log ( org . osgi . service . log . LogService . LOG_ERROR , null , e . getMessage ( ) , e , true ) ; } finally { org . apache . commons . io . IOUtils . closeQuietly ( reader ) ; } }
org . junit . Assert . assertThat ( changed , org . hamcrest . CoreMatchers . equalTo ( expected ) )
whenReadUsingByteSource_thenRead ( ) { java . lang . String expectedValue = "Hello<sp>world" ; java . io . File file = new java . io . File ( "test.txt" ) ; com . github . mysite . common . guava . ByteSource source = com . github . mysite . common . guava . Files . asByteSource ( file ) ; byte [ ] result = source . read ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expectedValue , new java . lang . String ( result ) )
shouldRejectStatus ( ) { lb . setStatus ( "BUILD" ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( lb , org . openstack . atlas . api . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; }
org . junit . Assert . assertFalse ( result . passedValidation ( ) )
testRepositorySystemHookEvent ( ) { org . gitlab4j . api . systemhooks . SystemHookEvent event = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . systemhooks . SystemHookEvent . class , "repository-system-hook-event.json" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , java . lang . String ) { java . io . InputStreamReader reader = new java . io . InputStreamReader ( org . gitlab4j . api . TestGitLabApiBeans . class . getResourceAsStream ( filename ) ) ; return org . gitlab4j . api . JsonUtils . compareJson ( apiObject , reader ) ; }
org . junit . Assert . assertTrue ( org . gitlab4j . api . JsonUtils . compareJson ( event , "repository-system-hook-event.json" ) )
testAccessBasicValue_longlong ( ) { org . omg . CORBA . TypeCode tc = orb . get_primitive_tc ( org . omg . CORBA . TCKind . tk_longlong ) ; org . omg . DynamicAny . DynAny dynAny = createDynAnyFromTypeCode ( tc ) ; java . lang . String msg = "Value<sp>inserted<sp>into<sp>DynAny<sp>object<sp>is<sp>not<sp>equal<sp>to<sp>value<sp>" ; msg += "extracted<sp>from<sp>same<sp>DynAny<sp>object" ; dynAny . insert_longlong ( 700700L ) ; "<AssertPlaceHolder>" ; } get_longlong ( ) { checkDestroyed ( ) ; org . omg . CORBA . Any any = getRepresentation ( ) ; try { return any . extract_longlong ( ) ; } catch ( org . jacorb . orb . dynany . org . omg b ) { throw new org . omg . DynamicAny . DynAnyPackage . TypeMismatch ( ) ; } }
org . junit . Assert . assertEquals ( msg , 700700L , dynAny . get_longlong ( ) )
shouldSetIsNetworkRoaming ( ) { org . robolectric . Shadows . shadowOf ( telephonyManager ) . setIsNetworkRoaming ( true ) ; "<AssertPlaceHolder>" ; } isNetworkRoaming ( ) { return isNetworkRoaming ; }
org . junit . Assert . assertTrue ( telephonyManager . isNetworkRoaming ( ) )
temp_qr ( ) { com . foxinmy . weixin4j . model . qr . QRResult result = qrApi . createQR ( com . foxinmy . weixin4j . model . qr . QRParameter . createTemporaryQR ( 1200 , 1200L ) ) ; "<AssertPlaceHolder>" ; } getTicket ( ) { return ticket ; }
org . junit . Assert . assertTrue ( ( ! ( result . getTicket ( ) . isEmpty ( ) ) ) )
testEmptyJsonFileInArrayFormat ( ) { try ( java . io . InputStream in = getJsonStream ( "org/ojai/test/data/emptyjsonfileinarrayformat.json" ) ; org . ojai . DocumentStream stream = org . ojai . json . Json . newDocumentStream ( in ) ) { int documentCount = getDocumentCount ( stream . documentReaders ( ) ) ; "<AssertPlaceHolder>" ; } } documentReaders ( ) { checkStateForIteration ( ) ; iteratorOpened = true ; return new org . ojai . json . impl . JsonDocumentReaderIterable ( this ) ; }
org . junit . Assert . assertEquals ( 0 , documentCount )
nietUitvoerbaarAutorisatiesLeeg ( ) { org . springframework . test . util . ReflectionTestUtils . setField ( selectie , "selectietaakAutorisatieList" , emptyList ( ) ) ; "<AssertPlaceHolder>" ; } isUitvoerbaar ( ) { org . junit . Assert . assertTrue ( selectie . isUitvoerbaar ( ) ) ; }
org . junit . Assert . assertFalse ( selectie . isUitvoerbaar ( ) )
testAvailable ( ) { int port = 2000 ; boolean result = org . apache . usergrid . persistence . core . util . AvailablePortFinder . available ( port ) ; "<AssertPlaceHolder>" ; } available ( int ) { if ( ( port < ( org . apache . usergrid . persistence . core . util . AvailablePortFinder . MIN_PORT_NUMBER ) ) || ( port > ( org . apache . usergrid . persistence . core . util . AvailablePortFinder . MAX_PORT_NUMBER ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>start<sp>port:<sp>" + port ) ) ; } java . net . ServerSocket ss = null ; java . net . DatagramSocket ds = null ; try { ss = new java . net . ServerSocket ( port ) ; ss . setReuseAddress ( true ) ; ds = new java . net . DatagramSocket ( port ) ; ds . setReuseAddress ( true ) ; return true ; } catch ( java . io . IOException e ) { } finally { if ( ds != null ) { ds . close ( ) ; } if ( ss != null ) { try { ss . close ( ) ; } catch ( java . io . IOException e ) { } } } return false ; }
org . junit . Assert . assertTrue ( result )
shouldIndicateHasSingleValue ( ) { prop = cars . getProperty ( "booleanProperty" ) ; javax . jcr . nodetype . PropertyDefinition def = prop . getDefinition ( ) ; "<AssertPlaceHolder>" ; } isMultiple ( ) { return true ; }
org . junit . Assert . assertThat ( def . isMultiple ( ) , org . hamcrest . core . Is . is ( false ) )
multiFieldTest ( ) { if ( org . apache . hyracks . storage . am . bloomfilter . LOGGER . isLoggable ( Level . INFO ) ) { org . apache . hyracks . storage . am . bloomfilter . LOGGER . info ( "TESTING<sp>BLOOM<sp>FILTER" ) ; } org . apache . hyracks . storage . common . buffercache . IBufferCache bufferCache = harness . getBufferCache ( ) ; int numElements = 10000 ; int [ ] keyFields = new int [ ] { 2 , 4 , 1 } ; org . apache . hyracks . storage . am . bloomfilter . impls . BloomFilter bf = new org . apache . hyracks . storage . am . bloomfilter . impls . BloomFilter ( bufferCache , harness . getFileMapProvider ( ) , harness . getFileReference ( ) , keyFields ) ; double acceptanleFalsePositiveRate = 0.1 ; int maxBucketsPerElement = org . apache . hyracks . storage . am . bloomfilter . impls . BloomCalculations . maxBucketsPerElement ( numElements ) ; org . apache . hyracks . storage . am . bloomfilter . impls . BloomFilterSpecification bloomFilterSpec = org . apache . hyracks . storage . am . bloomfilter . impls . BloomCalculations . computeBloomSpec ( maxBucketsPerElement , acceptanleFalsePositiveRate ) ; bf . create ( ) ; bf . activate ( ) ; org . apache . hyracks . storage . am . common . api . IIndexBulkLoader builder = bf . createBuilder ( numElements , bloomFilterSpec . getNumHashes ( ) , bloomFilterSpec . getNumBucketsPerElements ( ) ) ; int fieldCount = 5 ; org . apache . hyracks . api . dataflow . value . ISerializerDeserializer [ ] fieldSerdes = new org . apache . hyracks . api . dataflow . value . ISerializerDeserializer [ ] { new org . apache . hyracks . dataflow . common . data . marshalling . UTF8StringSerializerDeserializer ( ) , new org . apache . hyracks . dataflow . common . data . marshalling . UTF8StringSerializerDeserializer ( ) , org . apache . hyracks . dataflow . common . data . marshalling . IntegerSerializerDeserializer . INSTANCE , new org . apache . hyracks . dataflow . common . data . marshalling . UTF8StringSerializerDeserializer ( ) , new org . apache . hyracks . dataflow . common . data . marshalling . UTF8StringSerializerDeserializer ( ) } ; org . apache . hyracks . dataflow . common . comm . io . ArrayTupleBuilder tupleBuilder = new org . apache . hyracks . dataflow . common . comm . io . ArrayTupleBuilder ( fieldCount ) ; org . apache . hyracks . dataflow . common . comm . io . ArrayTupleReference tuple = new org . apache . hyracks . dataflow . common . comm . io . ArrayTupleReference ( ) ; int maxLength = 20 ; java . util . ArrayList < java . lang . String > s1 = new java . util . ArrayList < java . lang . String > ( ) ; java . util . ArrayList < java . lang . String > s2 = new java . util . ArrayList < java . lang . String > ( ) ; java . util . ArrayList < java . lang . String > s3 = new java . util . ArrayList < java . lang . String > ( ) ; java . util . ArrayList < java . lang . String > s4 = new java . util . ArrayList < java . lang . String > ( ) ; for ( int i = 0 ; i < numElements ; ++ i ) { s1 . add ( randomString ( ( ( rnd . nextInt ( ) ) % maxLength ) , rnd ) ) ; s2 . add ( randomString ( ( ( rnd . nextInt ( ) ) % maxLength ) , rnd ) ) ; s3 . add ( randomString ( ( ( rnd . nextInt ( ) ) % maxLength ) , rnd ) ) ; s4 . add ( randomString ( ( ( rnd . nextInt ( ) ) % maxLength ) , rnd ) ) ; } for ( int i = 0 ; i < numElements ; ++ i ) { org . apache . hyracks . dataflow . common . util . TupleUtils . createTuple ( tupleBuilder , tuple , fieldSerdes , s1 . get ( i ) , s2 . get ( i ) , i , s3 . get ( i ) , s4 . get ( i ) ) ; builder . add ( tuple ) ; } builder . end ( ) ; long [ ] hashes = new long [ 2 ] ; for ( int i = 0 ; i < numElements ; ++ i ) { org . apache . hyracks . dataflow . common . util . TupleUtils . createTuple ( tupleBuilder , tuple , fieldSerdes , s1 . get ( i ) , s2 . get ( i ) , i , s3 . get ( i ) , s4 . get ( i ) ) ; "<AssertPlaceHolder>" ; } bf . deactivate ( ) ; bf . destroy ( ) ; } contains ( org . apache . hyracks . dataflow . common . data . accessors . ITupleReference , long [ ] ) { if ( ( numPages ) == 0 ) { return false ; } org . apache . hyracks . storage . am . bloomfilter . impls . MurmurHash128Bit . hash3_x64_128 ( tuple , keyFields , org . apache . hyracks . storage . am . bloomfilter . impls . BloomFilter . SEED , hashes ) ; for ( int i = 0 ; i < ( numHashes ) ; ++ i ) { long hash = java . lang . Math . abs ( ( ( ( hashes [ 0 ] ) + ( i * ( hashes [ 1 ] ) ) ) %
org . junit . Assert . assertTrue ( bf . contains ( tuple , hashes ) )
testDateNotPresent ( ) { com . couchbase . jdbc . JDBCTestUtils . setConnection ( null ) ; java . lang . String drop_primary_index = "drop<sp>primary<sp>index<sp>on<sp>default" ; com . couchbase . jdbc . JDBCTestUtils . createPrimaryIndexes ( TestUtil . clusterInfo . bucketInformation . keySet ( ) ) ; org . json . simple . JSONObject obj = new org . json . simple . JSONObject ( ) ; java . lang . String deleteData = "delete<sp>from<sp>default" ; com . couchbase . jdbc . JDBCTestUtils . runQueryWithoutResult ( deleteData ) ; java . util . HashMap < java . lang . String , java . lang . Object > map = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; map . put ( "name" , "NAME" ) ; obj . putAll ( map ) ; org . json . simple . JSONArray expectedArray = new org . json . simple . JSONArray ( ) ; java . util . HashMap < java . lang . String , org . json . simple . JSONObject > objMap = new java . util . HashMap < java . lang . String , org . json . simple . JSONObject > ( ) ; objMap . put ( "1" , obj ) ; expectedArray . add ( obj ) ; com . couchbase . jdbc . JDBCTestUtils . insertData ( objMap , "default" ) ; java . lang . Thread . sleep ( 1000 ) ; java . lang . String query = "select<sp>name<sp>from<sp>default" ; com . couchbase . jdbc . JDBCTestUtils . setConnection ( null ) ; try ( java . sql . Statement stmt = JDBCTestUtils . con . createStatement ( ) ) { try ( java . sql . ResultSet rs = stmt . executeQuery ( query ) ) { com . couchbase . jdbc . CBResultSet cbrs = ( ( com . couchbase . jdbc . CBResultSet ) ( rs ) ) ; while ( cbrs . next ( ) ) { java . sql . ResultSetMetaData meta = cbrs . getMetaData ( ) ; com . couchbase . json . SQLJSON jsonVal = cbrs . getSQLJSON ( 1 ) ; try { jsonVal . getDate ( null ) ; } catch ( java . sql . SQLException e ) { java . lang . String expectatedMessage = "value<sp>NAME<sp>is<sp>not<sp>a<sp>date" ; "<AssertPlaceHolder>" ; } } } } try { com . couchbase . jdbc . JDBCTestUtils . runQueryWithoutResult ( drop_primary_index ) ; } catch ( java . sql . SQLException e ) { e . printStackTrace ( ) ; } } getDate ( java . lang . String ) { return getDate ( columnLabel , null ) ; }
org . junit . Assert . assertEquals ( expectatedMessage . trim ( ) , e . getMessage ( ) . trim ( ) )
testGetParamteresWithoutSecurity ( ) { unit . setSecurity ( false ) ; java . lang . Long personId = 1L ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; person . setId ( personId ) ; java . lang . Long contactTypeId = 2L ; org . lnu . is . domain . pension . type . PensionType contactType = new org . lnu . is . domain . pension . type . PensionType ( ) ; contactType . setId ( contactTypeId ) ; org . lnu . is . domain . person . pension . PersonPension entity = new org . lnu . is . domain . person . pension . PersonPension ( ) ; entity . setPerson ( person ) ; entity . setPensionType ( contactType ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; expected . put ( "person" , person ) ; expected . put ( "pensionType" , contactType ) ; when ( personDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( person ) ; when ( contactTypeDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( contactType ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; verify ( personDao ) . getEntityById ( personId ) ; verify ( contactTypeDao ) . getEntityById ( contactTypeId ) ; verify ( sessionService , times ( 0 ) ) . getGroups ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . name ; }
org . junit . Assert . assertEquals ( expected . toString ( ) , actual . toString ( ) )
jarUriWithHttpStringifiesToOriginalForm ( ) { org . eclipse . rdf4j . common . net . ParsedURI uri = new org . eclipse . rdf4j . common . net . ParsedURI ( "jar:http://example.test/bar/baz.jar!/COM/foo/Quux.class" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return getName ( ) ; }
org . junit . Assert . assertEquals ( "jar:http://example.test/bar/baz.jar!/COM/foo/Quux.class" , uri . toString ( ) )
findByUserIdTest ( ) { me . xiezefan . easyim . server . model . User friend1 = userDao . findById ( Contact . USER_ID2 ) ; me . xiezefan . easyim . server . model . User friend2 = userDao . findById ( Contact . USER_ID3 ) ; me . xiezefan . easyim . server . model . Friendship friendship1 = new me . xiezefan . easyim . server . model . Friendship ( ) ; friendship1 . setId ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; friendship1 . setUserId ( Contact . USER_ID ) ; friendship1 . setFriend ( friend1 ) ; friendshipDao . insert ( friendship1 ) ; me . xiezefan . easyim . server . model . Friendship friendship2 = new me . xiezefan . easyim . server . model . Friendship ( ) ; friendship2 . setId ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; friendship2 . setUserId ( Contact . USER_ID ) ; friendship2 . setFriend ( friend2 ) ; friendshipDao . insert ( friendship2 ) ; java . util . List < me . xiezefan . easyim . server . model . Friendship > list = friendshipDao . findByUserId ( Contact . USER_ID ) ; "<AssertPlaceHolder>" ; } findByUserId ( java . lang . String ) { java . util . List < me . xiezefan . easyim . server . resource . vo . UserVo > result = new java . util . ArrayList < me . xiezefan . easyim . server . resource . vo . UserVo > ( ) ; java . util . List < me . xiezefan . easyim . server . model . Friendship > friendshipList = friendshipDao . findByUserId ( userId ) ; for ( me . xiezefan . easyim . server . model . Friendship friendship : friendshipList ) { if ( ( friendship . getFriend ( ) ) == null ) { continue ; } result . add ( new me . xiezefan . easyim . server . resource . vo . UserVo ( friendship . getFriend ( ) ) ) ; } return result ; }
org . junit . Assert . assertTrue ( ( ( list . size ( ) ) == 2 ) )
testCoerceNullToNumber ( ) { java . lang . Object output = org . apache . el . lang . ELSupport . coerceToType ( null , org . apache . el . lang . Number . class ) ; "<AssertPlaceHolder>" ; } coerceToType ( java . lang . Object , java . lang . Class ) { if ( ( ( type == null ) || ( java . lang . Object . class . equals ( type ) ) ) || ( ( obj != null ) && ( type . isAssignableFrom ( obj . getClass ( ) ) ) ) ) { return obj ; } if ( ! ( org . apache . el . lang . ELSupport . COERCE_TO_ZERO ) ) { if ( ( ( obj == null ) && ( ! ( type . isPrimitive ( ) ) ) ) && ( ! ( java . lang . String . class . isAssignableFrom ( type ) ) ) ) { return null ; } } if ( java . lang . String . class . equals ( type ) ) { return org . apache . el . lang . ELSupport . coerceToString ( obj ) ; } if ( org . apache . el . lang . ELArithmetic . isNumberType ( type ) ) { return org . apache . el . lang . ELSupport . coerceToNumber ( obj , type ) ; } if ( ( org . apache . el . lang . Character . class . equals ( type ) ) || ( ( Character . TYPE ) == type ) ) { return org . apache . el . lang . ELSupport . coerceToCharacter ( obj ) ; } if ( ( org . apache . el . lang . Boolean . class . equals ( type ) ) || ( ( Boolean . TYPE ) == type ) ) { return org . apache . el . lang . ELSupport . coerceToBoolean ( obj , ( ( Boolean . TYPE ) == type ) ) ; } if ( type . isEnum ( ) ) { return org . apache . el . lang . ELSupport . coerceToEnum ( obj , type ) ; } if ( obj == null ) return null ; if ( obj instanceof java . lang . String ) { if ( "" . equals ( obj ) ) return null ; java . beans . PropertyEditor editor = java . beans . PropertyEditorManager . findEditor ( type ) ; if ( editor != null ) { editor . setAsText ( ( ( java . lang . String ) ( obj ) ) ) ; return editor . getValue ( ) ; } } if ( ( ( obj instanceof java . util . Set ) && ( type == ( java . util . Map . class ) ) ) && ( ( ( java . util . Set < ? > ) ( obj ) ) . isEmpty ( ) ) ) { return java . util . Collections . EMPTY_MAP ; } throw new javax . el . ELException ( org . apache . el . util . MessageFactory . get ( "error.convert" , obj , obj . getClass ( ) , type ) ) ; }
org . junit . Assert . assertNull ( output )
reconstructFormattingElementsInTable ( ) { java . lang . String h = "<p><b>One</p><sp><table><tr><td><p><i>Three<p>Four</i></td></tr></table><sp><p>Five</p>" ; org . jsoup . parser . Document doc = org . jsoup . Jsoup . parse ( h ) ; java . lang . String want = "<p><b>One</b></p>\n" + ( ( ( ( ( ( ( "<b><sp>\n" + "<sp><table>\n" ) + "<sp><tbody>\n" ) + "<sp><tr>\n" ) + "<sp><td><p><i>Three</i></p><p><i>Four</i></p></td>\n" ) + "<sp></tr>\n" ) + "<sp></tbody>\n" ) + "<sp></table><sp><p>Five</p></b>" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . CharSequence ) { org . mozilla . javascript . CompilerEnvirons compilerEnv = new org . mozilla . javascript . CompilerEnvirons ( ) ; compilerEnv . initFromContext ( cx ) ; org . mozilla . javascript . ErrorReporter compilationErrorReporter = compilerEnv . getErrorReporter ( ) ; org . mozilla . javascript . Parser p = new org . mozilla . javascript . Parser ( compilerEnv , compilationErrorReporter ) ; return p . parse ( cs . toString ( ) , "<eval>" , 1 ) ; }
org . junit . Assert . assertEquals ( want , doc . body ( ) . html ( ) )
testNoSnapshotReportPlugins ( ) { org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = new org . apache . maven . shared . release . config . ReleaseDescriptorBuilder ( ) ; java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createDescriptorFromProjects ( "no-snapshot-report-plugins" ) ; phase . execute ( org . apache . maven . shared . release . config . ReleaseUtils . buildReleaseDescriptor ( builder ) , new org . apache . maven . shared . release . env . DefaultReleaseEnvironment ( ) , reactorProjects ) ; phase . simulate ( org . apache . maven . shared . release . config . ReleaseUtils . buildReleaseDescriptor ( builder ) , new org . apache . maven . shared . release . env . DefaultReleaseEnvironment ( ) , reactorProjects ) ; "<AssertPlaceHolder>" ; } buildReleaseDescriptor ( org . apache . maven . shared . release . config . ReleaseDescriptorBuilder ) { return builder . build ( ) ; }
org . junit . Assert . assertTrue ( true )
shouldNeverRunTheSameTestTwice ( ) { queue . addAll ( asList ( "test1" , "test2" , "test1" ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 2 , queue . size ( ) )
allRegionsAreSortedCorrectly ( ) { final com . google . common . collect . SortedSetMultimap < java . lang . String , com . hartwig . hmftools . common . region . HmfTranscriptRegion > geneRegions = com . hartwig . hmftools . common . genepanel . HmfGenePanelSupplier . allGenesPerChromosomeMap37 ( ) ; for ( final java . lang . String chromosome : geneRegions . keySet ( ) ) { long start = 0 ; for ( final com . hartwig . hmftools . common . region . HmfTranscriptRegion hmfTranscriptRegion : geneRegions . get ( chromosome ) ) { "<AssertPlaceHolder>" ; start = hmfTranscriptRegion . start ( ) ; } } } start ( ) { return annotations . stream ( ) . filter ( GeneAnnotation :: isStart ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
org . junit . Assert . assertTrue ( ( ( hmfTranscriptRegion . start ( ) ) >= start ) )
shouldConsiderNodeToBeAtOrAboveItself ( ) { "<AssertPlaceHolder>" ; } isAtOrAbove ( org . modeshape . jcr . value . Path ) { org . modeshape . common . util . CheckArg . isNotNull ( other , "other" ) ; return other . isAtOrBelow ( this ) ; }
org . junit . Assert . assertThat ( path . isAtOrAbove ( path ) , org . hamcrest . core . Is . is ( true ) )
givenTwoEmptyOptionals_whenChaining_thenDefaultIsReturned ( ) { java . lang . String found = java . util . stream . Stream . < java . util . function . Supplier < java . util . Optional < java . lang . String > > > of ( ( ) -> createOptional ( "empty" ) , ( ) -> createOptional ( "empty" ) ) . map ( Supplier :: get ) . filter ( Optional :: isPresent ) . map ( Optional :: get ) . findFirst ( ) . orElseGet ( ( ) -> "default" ) ; "<AssertPlaceHolder>" ; } map ( java . lang . String ) { com . baeldung . rate . impl . QuoteResponseWrapper qrw = javax . json . bind . JsonbBuilder . create ( ) . fromJson ( response , com . baeldung . rate . impl . QuoteResponseWrapper . class ) ; return qrw . getQuoteResponse ( ) . getResult ( ) ; }
org . junit . Assert . assertEquals ( "default" , found )
perfTest ( ) { final org . csstudio . apputil . test . TestProperties settings = new org . csstudio . apputil . test . TestProperties ( ) ; final java . lang . String url = settings . getString ( org . csstudio . logging . jms2rdb . RDBPerfUnitTest . MSG_LOG_URL ) ; final java . lang . String schema = settings . getString ( "msg_log_schema" ) ; if ( url == null ) { System . out . println ( ( "Skipping<sp>test,<sp>need<sp>" + ( org . csstudio . logging . jms2rdb . RDBPerfUnitTest . MSG_LOG_URL ) ) ) ; return ; } final org . csstudio . logging . jms2rdb . rdb . RDBWriter rdb_writer = new org . csstudio . logging . jms2rdb . rdb . RDBWriter ( url , schema ) ; System . out . println ( ( "URL<sp>:<sp>" + url ) ) ; System . out . println ( ( ( "Runtime:<sp>" + ( org . csstudio . logging . jms2rdb . RDBPerfUnitTest . SECONDS ) ) + "<sp>seconds" ) ) ; final long end = ( java . lang . System . currentTimeMillis ( ) ) + ( ( org . csstudio . logging . jms2rdb . RDBPerfUnitTest . SECONDS ) * 1000 ) ; int count = 0 ; while ( ( java . lang . System . currentTimeMillis ( ) ) < end ) { ++ count ; rdb_writer . write ( java . lang . Integer . toString ( count ) ) ; } rdb_writer . close ( ) ; System . out . format ( "Wrote<sp>%d<sp>messages<sp>=<sp>%.1f<sp>msg/sec\n" , count , ( ( ( double ) ( count ) ) / ( org . csstudio . logging . jms2rdb . RDBPerfUnitTest . SECONDS ) ) ) ; "<AssertPlaceHolder>" ; } format ( java . lang . String , java . lang . String , java . lang . String ) { return org . csstudio . alarm . beast . AnnunciationFormatter . format ( format , severity , value , false ) ; }
org . junit . Assert . assertTrue ( ( count > 1000 ) )
testEdmWithtestEdmWithActionAndFunctionImport ( ) { try { java . io . InputStream stream = new java . io . ByteArrayInputStream ( org . apache . olingo . client . core . MetadataValidationTest . xmlWithActionsAndFunctionsHavingReturnedEntitiesInDiffNamespace . getBytes ( "UTF-8" ) ) ; final org . apache . olingo . commons . api . edm . Edm edm = client . getReader ( ) . readMetadata ( stream ) ; "<AssertPlaceHolder>" ; org . apache . olingo . client . api . serialization . ODataMetadataValidation metadataValidator = client . metadataValidation ( ) ; metadataValidator . validateMetadata ( edm ) ; } catch ( java . io . UnsupportedEncodingException e ) { throw e ; } } readMetadata ( java . io . InputStream ) { return readMetadata ( client . getDeserializer ( ContentType . APPLICATION_XML ) . toMetadata ( input ) . getSchemaByNsOrAlias ( ) ) ; }
org . junit . Assert . assertNotNull ( edm )
subclassWithNoopSetter ( ) { class NoopSetterRuleKeyBuilder extends com . facebook . buck . rules . keys . UncachedRuleKeyBuilder { public NoopSetterRuleKeyBuilder ( com . facebook . buck . core . rules . SourcePathRuleFinder ruleFinder , com . facebook . buck . core . sourcepath . resolver . SourcePathResolver pathResolver , com . facebook . buck . util . cache . FileHashCache hashCache , com . facebook . buck . rules . keys . RuleKeyFactory < com . facebook . buck . core . rulekey . RuleKey > defaultRuleKeyFactory ) { ( ruleFinder , pathResolver , hashCache , defaultRuleKeyFactory ) ; } @ com . facebook . buck . core . rulekey . Override protected NoopSetterRuleKeyBuilder setSourcePath ( com . facebook . buck . core . sourcepath . SourcePath sourcePath ) { return this ; } } com . facebook . buck . core . rules . SourcePathRuleFinder ruleFinder = new com . facebook . buck . core . rules . SourcePathRuleFinder ( new com . facebook . buck . core . rules . resolver . impl . TestActionGraphBuilder ( ) ) ; com . facebook . buck . core . sourcepath . resolver . SourcePathResolver pathResolver = com . facebook . buck . core . sourcepath . resolver . impl . DefaultSourcePathResolver . from ( ruleFinder ) ; com . facebook . buck . util . cache . FileHashCache hashCache = new com . facebook . buck . testutil . FakeFileHashCache ( com . google . common . collect . ImmutableMap . of ( ) ) ; com . facebook . buck . rules . keys . RuleKeyFactory < com . facebook . buck . core . rulekey . RuleKey > ruleKeyFactory = new com . facebook . buck . rules . keys . TestDefaultRuleKeyFactory ( hashCache , pathResolver , ruleFinder ) ; com . facebook . buck . core . rulekey . RuleKey nullRuleKey = new NoopSetterRuleKeyBuilder ( ruleFinder , pathResolver , hashCache , ruleKeyFactory ) . build ( RuleKey :: new ) ; com . facebook . buck . core . rulekey . RuleKey noopRuleKey = new NoopSetterRuleKeyBuilder ( ruleFinder , pathResolver , hashCache , ruleKeyFactory ) . setReflectively ( "key" , com . facebook . buck . core . sourcepath . FakeSourcePath . of ( "value" ) ) . build ( RuleKey :: new ) ; "<AssertPlaceHolder>" ; } equalTo ( com . facebook . buck . query . QueryEnvironment$Argument ) { return ( ( ( type . equals ( other . type ) ) && ( ( integer ) == ( other . integer ) ) ) && ( java . util . Objects . equals ( expression , other . expression ) ) ) && ( java . util . Objects . equals ( word , other . word ) ) ; }
org . junit . Assert . assertThat ( noopRuleKey , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( nullRuleKey ) ) )
read ( ) { com . asakusafw . runtime . io . json . value . FloatOptionPropertyAdapter adapter = builder . build ( ) ; com . asakusafw . runtime . value . FloatOption option = new com . asakusafw . runtime . value . FloatOption ( ) ; adapter . read ( new com . asakusafw . runtime . io . json . value . MockValue ( 1.0F ) , option ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . asakusafw . dmdl . java . util . JavaName jn = com . asakusafw . dmdl . java . util . JavaName . of ( new com . asakusafw . dmdl . model . AstSimpleName ( null , name ) ) ; jn . addFirst ( "is" ) ; java . lang . Object result = invoke ( jn . toMemberName ( ) ) ; return ( ( java . lang . Boolean ) ( result ) ) ; }
org . junit . Assert . assertThat ( option , is ( new com . asakusafw . runtime . value . FloatOption ( 1.0F ) ) )
testBNode ( ) { org . openrdf . model . BNode node = f . createBNode ( "identifier" ) ; byte [ ] bytesNode = nl . erdf . datalayer . hbase . NodeSerializer . toBytes ( node ) ; org . openrdf . model . BNode nodeB = ( ( org . openrdf . model . BNode ) ( nl . erdf . datalayer . hbase . NodeSerializer . fromBytes ( bytesNode ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( obj instanceof nl . erdf . datalayer . sparql . EndPointExecutor ) ) return false ; nl . erdf . datalayer . sparql . EndPointExecutor other = ( ( nl . erdf . datalayer . sparql . EndPointExecutor ) ( obj ) ) ; return endPoint . equals ( other . endPoint ) ; }
org . junit . Assert . assertTrue ( node . equals ( nodeB ) )