input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testListRemote_Smart_UploadPackNeedsAuth ( ) { org . eclipse . jgit . lib . Repository dst = createBareRepository ( ) ; try ( org . eclipse . jgit . transport . Transport t = org . eclipse . jgit . transport . Transport . open ( dst , smartAuthBasicURI ) ) { try { t . openFetch ( ) ; org . junit . Assert . fail ( "connection<sp>opened<sp>even<sp>though<sp>service<sp>disabled" ) ; } catch ( org . eclipse . jgit . errors . TransportException err ) { java . lang . String exp = ( ( smartAuthBasicURI ) + ":<sp>" ) + ( org . eclipse . jgit . internal . JGitText . get ( ) . noCredentialsProvider ) ; "<AssertPlaceHolder>" ; } } } getMessage ( ) { return java . text . MessageFormat . format ( org . eclipse . jgit . internal . JGitText . get ( ) . commandRejectedByHook , hookName , super . getMessage ( ) ) ; }
org . junit . Assert . assertEquals ( exp , err . getMessage ( ) )
customConfigs ( ) { org . apache . ambari . server . topology . Configuration stackConfig = org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessorTest . createTestStack ( ) ; org . apache . ambari . server . topology . Configuration clusterConfig = stackConfig . copy ( ) ; org . apache . ambari . server . topology . Configuration customConfig = org . apache . ambari . server . topology . Configuration . newEmpty ( ) ; org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessorTest . customize ( clusterConfig , customConfig , "core-site" , "hadoop.security.authorization" , "true" ) ; org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessorTest . customize ( clusterConfig , customConfig , "core-site" , "fs.trash.interval" , "0" ) ; org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessorTest . customize ( clusterConfig , customConfig , "hdfs-site" , "dfs.webhdfs.enabled" , "false" ) ; org . apache . ambari . server . topology . ClusterTopology topology = createNiceMock ( org . apache . ambari . server . topology . ClusterTopology . class ) ; org . apache . ambari . server . controller . internal . Stack stack = createNiceMock ( org . apache . ambari . server . controller . internal . Stack . class ) ; java . util . Set < java . lang . String > services = com . google . common . collect . ImmutableSet . of ( "HDFS" ) ; expect ( stack . getServices ( ) ) . andReturn ( services ) . anyTimes ( ) ; expect ( stack . getConfiguration ( ) ) . andReturn ( stackConfig ) . anyTimes ( ) ; expect ( topology . getConfiguration ( ) ) . andReturn ( clusterConfig ) . anyTimes ( ) ; expect ( topology . getHostGroupInfo ( ) ) . andReturn ( java . util . Collections . emptyMap ( ) ) . anyTimes ( ) ; replay ( stack , topology ) ; org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessor updater = new org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessor ( topology ) ; updater . applyTypeSpecificFilter ( BlueprintExportType . MINIMAL , clusterConfig , stackConfig , services ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return properties ; }
org . junit . Assert . assertEquals ( customConfig . getProperties ( ) , clusterConfig . getProperties ( ) )
testFastEntrySetEmptyIteratorRemove ( ) { final it . unimi . dsi . fastutil . objects . ObjectSet < it . unimi . dsi . fastutil . ints . Int2ObjectMap . Entry < java . lang . Integer > > entries = m . int2ObjectEntrySet ( ) ; org . junit . Assume . assumeTrue ( ( entries instanceof it . unimi . dsi . fastutil . ints . Int2ObjectMap . FastEntrySet ) ) ; final it . unimi . dsi . fastutil . objects . ObjectIterator < it . unimi . dsi . fastutil . ints . Int2ObjectMap . Entry < java . lang . Integer > > iterator = ( ( it . unimi . dsi . fastutil . ints . Int2ObjectMap . FastEntrySet < java . lang . Integer > ) ( entries ) ) . fastIterator ( ) ; "<AssertPlaceHolder>" ; iterator . remove ( ) ; } int2ObjectEntrySet ( ) { return delegate . int2ObjectEntrySet ( ) ; }
org . junit . Assert . assertFalse ( iterator . hasNext ( ) )
keySet ( ) { final com . intellij . util . containers . hash . LinkedHashMap < java . lang . Integer , java . lang . String > tested = new com . intellij . util . containers . hash . LinkedHashMap ( ) ; for ( int i = 0 ; i < 10000 ; ++ i ) { tested . put ( i , java . lang . Integer . toString ( i ) ) ; } int i = 0 ; for ( java . lang . Integer key : tested . keySet ( ) ) { "<AssertPlaceHolder>" ; } } intValue ( ) { return myIntValue ; }
org . junit . Assert . assertEquals ( ( i ++ ) , key . intValue ( ) )
testHashCode ( ) { org . jfree . data . function . LineFunction2D f1 = new org . jfree . data . function . LineFunction2D ( 1.0 , 2.0 ) ; org . jfree . data . function . LineFunction2D f2 = new org . jfree . data . function . LineFunction2D ( 1.0 , 2.0 ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return getUuid ( ) . hashCode ( ) ; }
org . junit . Assert . assertEquals ( f1 . hashCode ( ) , f2 . hashCode ( ) )
becameEmptyEventIfAllowed ( ) { final jetbrains . jetpad . base . Value < java . lang . Boolean > becameEmptyFired = new jetbrains . jetpad . base . Value ( false ) ; rootMapper . getTarget ( ) . addTrait ( new jetbrains . jetpad . cell . trait . CellTrait ( ) { @ jetbrains . jetpad . projectional . cell . Override public java . lang . Object get ( jetbrains . jetpad . cell . Cell cell , jetbrains . jetpad . cell . trait . CellTraitPropertySpec < ? > spec ) { if ( spec == ( ProjectionalSynchronizers . DELETE_ON_EMPTY ) ) { return true ; } return super . get ( cell , spec ) ; } @ jetbrains . jetpad . projectional . cell . Override public void onCellTraitEvent ( jetbrains . jetpad . cell . Cell cell , jetbrains . jetpad . cell . trait . CellTraitEventSpec < ? > spec , jetbrains . jetpad . projectional . cell . Event event ) { if ( spec == ( jetbrains . jetpad . cell . util . Cells . BECAME_EMPTY ) ) { becameEmptyFired . set ( true ) ; event . consume ( ) ; return ; } super . onCellTraitEvent ( cell , spec , event ) ; } } ) ; jetbrains . jetpad . projectional . cell . ProjectionalPropertySynchronizerTest . Child2 child = new jetbrains . jetpad . projectional . cell . ProjectionalPropertySynchronizerTest . Child2 ( ) ; container . child . set ( child ) ; focusChild ( child ) ; press ( Key . DELETE , ModifierKey . CONTROL ) ; "<AssertPlaceHolder>" ; } get ( ) { return myValue . get ( ) ; }
org . junit . Assert . assertTrue ( becameEmptyFired . get ( ) )
testScoredSortedSetValueRangeNegativeInf ( ) { org . redisson . api . RScoredSortedSet < java . lang . String > set = redisson . < java . lang . String > getScoredSortedSet ( "simple" ) ; set . add ( 0 , "a" ) ; set . add ( 1 , "b" ) ; set . add ( 2 , "c" ) ; set . add ( 3 , "d" ) ; set . add ( 4 , "e" ) ; java . util . Collection < java . lang . String > r = set . valueRange ( Double . NEGATIVE_INFINITY , true , 4 , false , 1 , 2 ) ; java . lang . String [ ] a = r . toArray ( new java . lang . String [ 0 ] ) ; "<AssertPlaceHolder>" ; } toArray ( T [ ] ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "b" , "c" } , a )
testLiteralWithIntegers ( ) { org . apache . commons . jexl3 . JexlExpression e = org . apache . commons . jexl3 . JEXL . createExpression ( "[<sp>5<sp>,<sp>10<sp>]" ) ; org . apache . commons . jexl3 . JexlContext jc = new org . apache . commons . jexl3 . MapContext ( ) ; java . lang . Object o = e . evaluate ( jc ) ; int [ ] check = new int [ ] { 5 , 10 } ; "<AssertPlaceHolder>" ; } equals ( org . apache . commons . jexl3 . ArithmeticTest$Var , org . apache . commons . jexl3 . ArithmeticTest$Var ) { return ( lhs . value ) == ( rhs . value ) ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( check , ( ( int [ ] ) ( o ) ) ) )
testServicesRange ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = createBasicParams ( ) ; parameters . put ( "min-services" , "2" ) ; parameters . put ( "max-services" , "5" ) ; org . opennms . netmgt . poller . PollStatus status = monitor . poll ( createMonitor ( ) , parameters ) ; "<AssertPlaceHolder>" ; } isAvailable ( ) { return available ; }
org . junit . Assert . assertTrue ( status . isAvailable ( ) )
testGetElementByName_05 ( ) { org . eclipse . xtext . resource . IEObjectDescription objectElement = getConstructorScope ( ) . getSingleElement ( org . eclipse . xtext . naming . QualifiedName . create ( java . util . List . class . getName ( ) ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertNull ( objectElement )
testGetInstancesByNamespace ( ) { java . lang . String someAppId = "someAppId" ; java . lang . String someClusterName = "someClusterName" ; java . lang . String someNamespaceName = "someNamespaceName" ; java . lang . String someIp = "someIp" ; long someInstanceId = 1 ; long anotherInstanceId = 2 ; com . ctrip . framework . apollo . biz . entity . Instance someInstance = assembleInstance ( someInstanceId , someAppId , someClusterName , someNamespaceName , someIp ) ; com . ctrip . framework . apollo . biz . entity . Instance anotherInstance = assembleInstance ( anotherInstanceId , someAppId , someClusterName , someNamespaceName , someIp ) ; org . springframework . data . domain . Page < com . ctrip . framework . apollo . biz . entity . Instance > instances = new org . springframework . data . domain . PageImpl ( com . google . common . collect . Lists . newArrayList ( someInstance , anotherInstance ) , pageable , 2 ) ; when ( instanceService . findInstancesByNamespace ( someAppId , someClusterName , someNamespaceName , pageable ) ) . thenReturn ( instances ) ; com . ctrip . framework . apollo . common . dto . PageDTO < com . ctrip . framework . apollo . common . dto . InstanceDTO > result = instanceConfigController . getInstancesByNamespace ( someAppId , someClusterName , someNamespaceName , null , pageable ) ; "<AssertPlaceHolder>" ; com . ctrip . framework . apollo . common . dto . InstanceDTO someInstanceDto = null ; com . ctrip . framework . apollo . common . dto . InstanceDTO anotherInstanceDto = null ; for ( com . ctrip . framework . apollo . common . dto . InstanceDTO instanceDTO : result . getContent ( ) ) { if ( ( instanceDTO . getId ( ) ) == someInstanceId ) { someInstanceDto = instanceDTO ; } else if ( ( instanceDTO . getId ( ) ) == anotherInstanceId ) { anotherInstanceDto = instanceDTO ; } } verifyInstance ( someInstance , someInstanceDto ) ; verifyInstance ( anotherInstance , anotherInstanceDto ) ; } getContent ( ) { if ( ! ( this . hasContent ( ) ) ) { return null ; } return m_configProperties . get ( ) . getProperty ( ConfigConsts . CONFIG_FILE_CONTENT_KEY ) ; }
org . junit . Assert . assertEquals ( 2 , result . getContent ( ) . size ( ) )
testGetPassword ( ) { System . out . println ( "getPassword" ) ; team . bus . model . bean . DataBaseInfo instance = new team . bus . model . bean . DataBaseInfo ( ) ; java . lang . String expResult = "123456" ; instance . setPassword ( expResult ) ; java . lang . String result = instance . getPassword ( ) ; "<AssertPlaceHolder>" ; } getPassword ( ) { return this . password ; }
org . junit . Assert . assertEquals ( expResult , result )
testKModuleContainsXLS ( ) { java . net . URL url = this . getClass ( ) . getResource ( "/ExampleWithExcel" ) ; org . uberfire . java . nio . fs . file . SimpleFileSystemProvider p = new org . uberfire . java . nio . fs . file . SimpleFileSystemProvider ( ) ; org . uberfire . java . nio . file . Path path = p . getPath ( url . toURI ( ) ) ; final org . guvnor . common . services . project . model . Module module = moduleService . resolveModule ( org . uberfire . backend . server . util . Paths . convert ( path ) ) ; final org . kie . workbench . common . services . backend . builder . core . Builder builder = new org . kie . workbench . common . services . backend . builder . core . Builder ( module , ioService , moduleService , importsService , new java . util . ArrayList ( ) , dependenciesClassLoaderCache , pomModelCache , getPackageNameWhiteListService ( ) , alwaysTrue ) ; final org . guvnor . common . services . project . builder . model . BuildResults results = builder . build ( ) ; if ( ! ( results . getMessages ( ) . isEmpty ( ) ) ) { for ( org . guvnor . common . services . project . builder . model . BuildMessage m : results . getMessages ( ) ) { org . kie . workbench . common . services . backend . builder . core . BuilderTest . logger . debug ( m . getText ( ) ) ; } } "<AssertPlaceHolder>" ; } isEmpty ( ) { return commands . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( results . getMessages ( ) . isEmpty ( ) )
decodeZeroAtEnd ( ) { long val = 1311768465173141112L ; net . openhft . chronicle . bytes . Bytes < ? > bytes = cash . xcl . api . util . XCLBase32Test . bytesCache . get ( ) ; bytes . zeroOut ( 0 , bytes . realCapacity ( ) ) ; bytes . clear ( ) ; encode ( bytes , val ) ; bytes . writeByte ( ( ( byte ) ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } decode ( net . openhft . chronicle . bytes . Bytes ) { long n = 0 ; int shift = ( Long . SIZE ) - ( cash . xcl . util . XCLBase32 . BITS_PER_CHAR ) ; do { int ch = bytes . readUnsignedByte ( ) ; if ( ch == '-' ) continue ; if ( ch < 0 ) { return ~ n ; } long value = ( ch < ( cash . xcl . util . XCLBase32 . PARSING . length ) ) ? cash . xcl . util . XCLBase32 . PARSING [ ch ] : - 1 ; if ( value < 0 ) { return ~ n ; } n |= ( shift < 0 ) ? value > > ( - shift ) : value << shift ; shift -= cash . xcl . util . XCLBase32 . BITS_PER_CHAR ; } while ( shift >= ( - 1 ) ) ; int ch = bytes . readUnsignedByte ( ) ; if ( ch >= 0 ) { if ( ( ch < ( cash . xcl . util . XCLBase32 . PARSING . length ) ) && ( ( cash . xcl . util . XCLBase32 . PARSING [ ch ] ) >= 0 ) ) { throw new java . lang . IllegalArgumentException ( ( "Encoded<sp>number<sp>too<sp>long<sp>at<sp>" + ( ( char ) ( ch ) ) ) ) ; } } return ~ n ; }
org . junit . Assert . assertEquals ( val , decode ( bytes ) )
testAvroToDiString ( ) { java . lang . String expectedType = "id_String" ; org . apache . avro . Schema fieldSchema = org . talend . daikon . avro . AvroUtils . _string ( ) ; "<AssertPlaceHolder>" ; } avroToDi ( org . apache . avro . Schema ) { org . apache . avro . Schema typeSchema = org . talend . daikon . avro . AvroUtils . unwrapIfNullable ( fieldSchema ) ; java . lang . String logicalType = org . talend . daikon . avro . LogicalTypeUtils . getLogicalTypeName ( typeSchema ) ; if ( logicalType != null ) { return org . talend . codegen . converter . TypeConverter . getDiByLogicalType ( logicalType ) ; } java . lang . String javaClass = typeSchema . getProp ( SchemaConstants . JAVA_CLASS_FLAG ) ; if ( javaClass != null ) { return org . talend . codegen . converter . TypeConverter . getDiByJavaClass ( javaClass ) ; } return org . talend . codegen . converter . TypeConverter . getDiByAvroType ( typeSchema . getType ( ) ) ; }
org . junit . Assert . assertEquals ( expectedType , org . talend . codegen . converter . TypeConverter . avroToDi ( fieldSchema ) )
testAddReaction_IReaction_int ( ) { org . openscience . cdk . reaction . ReactionChain chain = new org . openscience . cdk . reaction . ReactionChain ( ) ; org . openscience . cdk . interfaces . IReaction reaction1 = org . openscience . cdk . reaction . ReactionChainTest . builder . newInstance ( org . openscience . cdk . interfaces . IReaction . class ) ; reaction1 . setID ( "reaction1" ) ; org . openscience . cdk . interfaces . IReaction reaction2 = org . openscience . cdk . reaction . ReactionChainTest . builder . newInstance ( org . openscience . cdk . interfaces . IReaction . class ) ; reaction1 . setID ( "reaction2" ) ; org . openscience . cdk . interfaces . IReaction reaction3 = org . openscience . cdk . reaction . ReactionChainTest . builder . newInstance ( org . openscience . cdk . interfaces . IReaction . class ) ; reaction1 . setID ( "reaction3" ) ; chain . addReaction ( reaction1 , 0 ) ; chain . addReaction ( reaction2 , 1 ) ; chain . addReaction ( reaction3 , 2 ) ; "<AssertPlaceHolder>" ; } addReaction ( org . openscience . cdk . interfaces . IReaction , int ) { hashMapChain . put ( reaction , position ) ; this . addReaction ( reaction ) ; }
org . junit . Assert . assertNotNull ( chain )
validate_typeAndConnectorIdIsSet_returnsTrue ( ) { request . setType ( AvailabilityType . Operative ) ; request . setConnectorId ( 0 ) ; boolean isValid = request . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; }
org . junit . Assert . assertThat ( isValid , org . hamcrest . CoreMatchers . is ( true ) )
manageActivationProcess_VSERVERS_STOPPING_CombinedStateNotOK ( ) { org . oscm . app . iaas . data . FlowState flowState = org . oscm . app . iaas . data . FlowState . VSERVERS_STOPPING ; paramHandler . getIaasContext ( ) . setVSystemStatus ( VSystemStatus . NORMAL ) ; doReturn ( Boolean . TRUE ) . when ( vSystemProcessor ) . checkNextStatus ( org . oscm . app . iaas . VSystemProcessorBeanTest . CONTROLLER_ID , org . oscm . app . iaas . VSystemProcessorBeanTest . INSTANCE_ID , FlowState . FINISHED , paramHandler ) ; doReturn ( Boolean . FALSE ) . when ( vSystemProcessor . vsysComm ) . getCombinedVServerState ( paramHandler , VSystemStatus . STOPPED ) ; org . oscm . app . iaas . data . FlowState newState = vSystemProcessor . manageActivationProcess ( org . oscm . app . iaas . VSystemProcessorBeanTest . CONTROLLER_ID , org . oscm . app . iaas . VSystemProcessorBeanTest . INSTANCE_ID , paramHandler , flowState ) ; "<AssertPlaceHolder>" ; } manageActivationProcess ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState ) { boolean vSysInNormalState = VSystemStatus . NORMAL . equals ( paramHandler . getIaasContext ( ) . getVSystemStatus ( ) ) ; if ( ! vSysInNormalState ) { return null ; } org . oscm . app . iaas . data . FlowState newState = null ; switch ( flowState ) { case VSYSTEM_ACTIVATION_REQUESTED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STARTING , paramHandler ) ) { vsysComm . startVServers ( paramHandler ) ; paramHandler . setVserverToBeStarted ( new java . util . ArrayList < java . lang . String > ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } break ; case VSYSTEM_DEACTIVATION_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STOPPING , paramHandler ) ) { java . util . List < java . lang . String > stoppedServers = vsysComm . stopAllVServers ( paramHandler ) ; paramHandler . setVserverToBeStarted ( stoppedServers ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVERS_STOPPING ; } break ; case VSERVERS_STOPPING : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { if ( vsysComm . getCombinedVServerState ( paramHandler , VSystemStatus . STOPPED ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } } break ; default : } return newState ; }
org . junit . Assert . assertNull ( newState )
testOkCycleReferences ( ) { sculptormetamodel . Reference refAB = factory . createReference ( ) ; refAB . setTo ( b ) ; b . getReferences ( ) . add ( refAB ) ; sculptormetamodel . Reference refBC = factory . createReference ( ) ; refBC . setTo ( c ) ; b . getReferences ( ) . add ( refBC ) ; sculptormetamodel . Reference refCA = factory . createReference ( ) ; refCA . setTo ( a ) ; c . getReferences ( ) . add ( refCA ) ; "<AssertPlaceHolder>" ; } checkAggregateReferences ( sculptormetamodel . Application ) { java . util . Map < sculptormetamodel . DomainObject , java . util . Set < sculptormetamodel . DomainObject > > aggregateGroups = org . sculptor . generator . check . AggregateConstraints . getAggregateGroups ( app ) ; for ( java . util . Set < sculptormetamodel . DomainObject > group1 : aggregateGroups . values ( ) ) { for ( java . util . Set < sculptormetamodel . DomainObject > group2 : aggregateGroups . values ( ) ) { if ( group1 == group2 ) { continue ; } java . util . Set < sculptormetamodel . DomainObject > intersection = new java . util . HashSet < sculptormetamodel . DomainObject > ( group1 ) ; intersection . retainAll ( group2 ) ; if ( ! ( intersection . isEmpty ( ) ) ) { org . sculptor . generator . check . AggregateConstraints . LOG . warn ( ( "checkAggregateReferences<sp>failed<sp>with<sp>intersection:<sp>" + intersection ) ) ; return false ; } } } return true ; }
org . junit . Assert . assertTrue ( org . sculptor . generator . check . AggregateConstraints . checkAggregateReferences ( app ) )
testFormatMissingBracket ( ) { java . lang . String fmt = "Some<sp>string<sp>1<sp>2<sp>3" ; "<AssertPlaceHolder>" ; } format ( java . lang . Object , int ) { return null ; }
org . junit . Assert . assertEquals ( "Some<sp>string<sp>1<sp>2<sp>3" , org . junit . Assert . format ( fmt , 7 ) )
recoveryNotNeededIfCurrentTimeSetToBackOffTime ( ) { rc . setCurrentTime ( ( ( now ) + ( RecoveryCoordinator . BACKOFF_COEFFICIENT_MIN ) ) ) ; "<AssertPlaceHolder>" ; } isTooSoon ( ) { long now = getCurrentTime ( ) ; if ( now > ( next ) ) { next = now + ( getBackoffCoefficient ( ) ) ; return false ; } else { return true ; } }
org . junit . Assert . assertTrue ( rc . isTooSoon ( ) )
testStandardizeOP ( ) { final org . nd4j . linalg . api . ndarray . INDArray random = org . nd4j . linalg . factory . Nd4j . rand ( new int [ ] { 10 , 4 } ) ; final int [ ] axis = new int [ ] { 1 } ; final org . nd4j . linalg . api . ndarray . INDArray means = random . mean ( axis ) ; final org . nd4j . linalg . api . ndarray . INDArray std = random . std ( false , axis ) ; final org . nd4j . linalg . api . ndarray . INDArray res = random . subColumnVector ( means ) . divColumnVector ( std ) ; final org . nd4j . linalg . api . ndarray . INDArray output = org . nd4j . linalg . factory . Nd4j . zerosLike ( res ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ops . impl . transforms . custom . Standardize ( random , output , 1 ) ) ; "<AssertPlaceHolder>" ; } exec ( java . lang . String , org . datavec . python . PythonVariables , org . datavec . python . PythonVariables ) { java . lang . String inputCode = org . datavec . python . PythonExecutioner . inputCode ( pyInputs ) ; org . datavec . python . PythonExecutioner . exec ( ( inputCode + code ) , pyOutputs ) ; }
org . junit . Assert . assertEquals ( res , output )
testChunkedResponseTooLarge ( ) { config . setMaxBodySize ( 8 ) ; com . jitlogic . netkit . test . unit . HttpDecoder d = new com . jitlogic . netkit . test . unit . HttpDecoder ( config , HttpDecoderState . READ_RESP_LINE , l ) ; java . nio . ByteBuffer b = sbuf ( "HTTP/1.1<sp>200<sp>OK" , "Transfer-Encoding:<sp>chunked" , "" , "0004" , "ABCD" , "0004" , "EFGH" , "0004" , "IJKL" , "0" , "" ) ; d . submit ( key , false , b ) ; "<AssertPlaceHolder>" ; l . check ( "error" , key , 400 , "too<sp>large" ) ; } hasError ( ) { return ( state ) == ( HttpDecoderState . ERROR ) ; }
org . junit . Assert . assertTrue ( d . hasError ( ) )
test ( ) { org . geppetto . model . GeppettoLibrary library = org . geppetto . core . manager . SharedLibraryManager . getSharedCommonLibrary ( ) ; "<AssertPlaceHolder>" ; } getSharedCommonLibrary ( ) { if ( ( org . geppetto . core . manager . SharedLibraryManager . commonLibrary ) == null ) { GeppettoPackage . eINSTANCE . eClass ( ) ; org . eclipse . emf . ecore . resource . Resource . Factory . Registry reg = Resource . Factory . Registry . INSTANCE ; java . util . Map < java . lang . String , java . lang . Object > m = reg . getExtensionToFactoryMap ( ) ; m . put ( "xmi" , new org . eclipse . emf . ecore . xmi . impl . XMIResourceFactoryImpl ( ) ) ; GeppettoPackage . Registry . INSTANCE . put ( GeppettoPackage . eNS_URI , GeppettoPackage . eINSTANCE ) ; java . lang . String [ ] versions = new java . lang . String [ ] { "master" , "development" } ; for ( java . lang . String version : versions ) { GeppettoPackage . Registry . INSTANCE . put ( GeppettoPackage . eNS_URI_TEMPLATE . replace ( "$VERSION$" , version ) , GeppettoPackage . eINSTANCE ) ; } org . eclipse . emf . ecore . resource . ResourceSet resSet = new org . eclipse . emf . ecore . resource . impl . ResourceSetImpl ( ) ; org . eclipse . emf . ecore . resource . Resource resource = resSet . createResource ( org . eclipse . emf . common . util . URI . createURI ( "/GeppettoCommonLibrary.xmi" ) ) ; try { resource . load ( org . geppetto . core . manager . SharedLibraryManager . class . getResourceAsStream ( "/GeppettoCommonLibrary.xmi" ) , null ) ; } catch ( java . io . IOException e ) { throw new org . geppetto . core . common . GeppettoInitializationException ( e ) ; } org . geppetto . core . manager . SharedLibraryManager . commonLibrary = ( ( org . geppetto . model . GeppettoLibrary ) ( resource . getContents ( ) . get ( 0 ) ) ) ; org . geppetto . core . manager . SharedLibraryManager . getLibraryManager ( ) . getLibraries ( ) . add ( org . geppetto . core . manager . SharedLibraryManager . commonLibrary ) ; } return org . geppetto . core . manager . SharedLibraryManager . commonLibrary ; }
org . junit . Assert . assertNotNull ( library )
testImplementation ( ) { org . apache . ivy . plugins . matcher . Matcher matcher = patternMatcher . getMatcher ( "abc-123_ABC" ) ; "<AssertPlaceHolder>" ; } isExact ( ) { if ( ( exact ) == null ) { exact = calculateExact ( ) ; } return exact ; }
org . junit . Assert . assertTrue ( matcher . isExact ( ) )
zouGeenMeldingMoetenGevenOmdatBurgerservicenummerGeenPersoonModelHeeft ( ) { nl . bzk . brp . model . objecttype . logisch . Relatie relatieBericht = mock ( nl . bzk . brp . model . objecttype . bericht . RelatieBericht . class ) ; nl . bzk . brp . model . objecttype . logisch . Relatie relatieModel = mock ( nl . bzk . brp . model . objecttype . operationeel . RelatieModel . class ) ; nl . bzk . brp . model . objecttype . operationeel . PersoonModel eersteOuderModel = mock ( nl . bzk . brp . model . objecttype . operationeel . PersoonModel . class ) ; java . util . Set < nl . bzk . brp . model . objecttype . bericht . BetrokkenheidBericht > betrokkenheidBerichten = new java . util . HashSet < nl . bzk . brp . model . objecttype . bericht . BetrokkenheidBericht > ( ) ; final nl . bzk . brp . model . objecttype . bericht . BetrokkenheidBericht eersteOuderBericht = new nl . bzk . brp . model . objecttype . bericht . BetrokkenheidBericht ( ) ; final nl . bzk . brp . model . objecttype . bericht . BetrokkenheidBericht tweedeOuderBericht = new nl . bzk . brp . model . objecttype . bericht . BetrokkenheidBericht ( ) ; final nl . bzk . brp . model . objecttype . bericht . PersoonBericht eersteOuder = new nl . bzk . brp . model . objecttype . bericht . PersoonBericht ( ) ; final nl . bzk . brp . model . objecttype . bericht . PersoonBericht tweedeOuder = new nl . bzk . brp . model . objecttype . bericht . PersoonBericht ( ) ; final nl . bzk . brp . model . groep . bericht . PersoonIdentificatienummersGroepBericht eersteOuderIdentificatienummers = new nl . bzk . brp . model . groep . bericht . PersoonIdentificatienummersGroepBericht ( ) ; final nl . bzk . brp . model . groep . bericht . PersoonIdentificatienummersGroepBericht tweedeOuderIdentificatienummers = new nl . bzk . brp . model . groep . bericht . PersoonIdentificatienummersGroepBericht ( ) ; final nl . bzk . brp . model . attribuuttype . Burgerservicenummer eersteOuderBurgerservicenummer = new nl . bzk . brp . model . attribuuttype . Burgerservicenummer ( "123" ) ; final nl . bzk . brp . model . attribuuttype . Burgerservicenummer tweedeOuderBurgerservicenummer = new nl . bzk . brp . model . attribuuttype . Burgerservicenummer ( "456" ) ; eersteOuderIdentificatienummers . setBurgerservicenummer ( eersteOuderBurgerservicenummer ) ; eersteOuder . setIdentificatienummers ( eersteOuderIdentificatienummers ) ; eersteOuderBericht . setBetrokkene ( eersteOuder ) ; tweedeOuderIdentificatienummers . setBurgerservicenummer ( tweedeOuderBurgerservicenummer ) ; tweedeOuder . setIdentificatienummers ( tweedeOuderIdentificatienummers ) ; tweedeOuderBericht . setBetrokkene ( tweedeOuder ) ; betrokkenheidBerichten . add ( eersteOuderBericht ) ; betrokkenheidBerichten . add ( tweedeOuderBericht ) ; doReturn ( betrokkenheidBerichten ) . when ( relatieBericht ) . getOuderBetrokkenheden ( ) ; when ( persoonRepository . findByBurgerservicenummer ( eq ( eersteOuderBurgerservicenummer ) ) ) . thenReturn ( eersteOuderModel ) ; when ( persoonRepository . findByBurgerservicenummer ( eq ( tweedeOuderBurgerservicenummer ) ) ) . thenReturn ( null ) ; java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = brby0134 . executeer ( relatieModel , relatieBericht , null ) ; "<AssertPlaceHolder>" ; verify ( relatieRepository , never ( ) ) . isVerwant ( anyInt ( ) , anyInt ( ) ) ; verify ( persoonRepository , times ( 2 ) ) . findByBurgerservicenummer ( isA ( nl . bzk . brp . model . attribuuttype . Burgerservicenummer . class ) ) ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertThat ( meldingen . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
bug47920 ( ) { org . apache . poi . poifs . filesystem . POIFSFileSystem fs1 = new org . apache . poi . poifs . filesystem . POIFSFileSystem ( org . apache . poi . POIDataSamples . getSpreadSheetInstance ( ) . openResourceAsStream ( "47920.xls" ) ) ; org . apache . poi . hssf . usermodel . HSSFWorkbook wb = new org . apache . poi . hssf . usermodel . HSSFWorkbook ( fs1 ) ; org . apache . poi . hpsf . ClassID clsid1 = fs1 . getRoot ( ) . getStorageClsid ( ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( 4096 ) ; wb . write ( out ) ; byte [ ] bytes = out . toByteArray ( ) ; org . apache . poi . poifs . filesystem . POIFSFileSystem fs2 = new org . apache . poi . poifs . filesystem . POIFSFileSystem ( new java . io . ByteArrayInputStream ( bytes ) ) ; org . apache . poi . hpsf . ClassID clsid2 = fs2 . getRoot ( ) . getStorageClsid ( ) ; "<AssertPlaceHolder>" ; fs2 . close ( ) ; wb . close ( ) ; fs1 . close ( ) ; } getStorageClsid ( ) { return directory . getStorageClsid ( ) ; }
org . junit . Assert . assertEquals ( clsid1 , clsid2 )
showWithFullSeasonListingTest ( ) { org . sickbeard . Show response = sick . show ( "71256" , true ) ; "<AssertPlaceHolder>" ; } show ( java . lang . String , boolean ) { if ( fullSeasonListing ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( "show|show.seasons" ) ; builder . append ( "&tvdbid=" ) ; builder . append ( tvdbid ) ; org . sickbeard . ShowWithFullSeasonListing results = this . < org . sickbeard . ShowWithFullSeasonListing > commandData ( builder . toString ( ) , new com . google . gson . reflect . TypeToken < org . sickbeard . JsonResponse < org . sickbeard . ShowWithFullSeasonListing > > ( ) { } . getType ( ) ) ; org . sickbeard . Show ret = new org . sickbeard . Show ( results . show . data ) ; ret . seasonList . clear ( ) ; for ( Map . Entry < java . lang . String , org . sickbeard . SeasonsJson > season : results . seasons . data . entrySet ( ) ) { ret . seasonList . add ( new org . sickbeard . Season ( season . getKey ( ) , season . getValue ( ) ) ) ; } return ret ; } else { return show ( tvdbid ) ; } }
org . junit . Assert . assertNotNull ( response )
givenEveningTime_ifEveningMessage_thenSuccess ( ) { java . lang . String expected = "Hello<sp>Baeldung,<sp>Good<sp>Evening" ; java . lang . String actual = greeter . greet ( java . time . LocalDateTime . of ( 2017 , 3 , 1 , 19 , 0 ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expected , actual )
poolValidationIntervalOptionalPresent ( ) { final io . trane . ndbc . Config c = io . trane . ndbc . Config . create ( dataSourceSupplierClass , host , port , user ) ; final java . time . Duration poolValidationInterval = java . time . Duration . ofSeconds ( 100 ) ; "<AssertPlaceHolder>" ; } poolValidationInterval ( java . time . Duration ) { return poolValidationInterval ( java . util . Optional . of ( poolValidationInterval ) ) ; }
org . junit . Assert . assertEquals ( java . util . Optional . of ( poolValidationInterval ) , c . poolValidationInterval ( java . util . Optional . of ( poolValidationInterval ) ) . poolValidationInterval ( ) )
testGetParameterStringNullEvalPassthrough ( ) { org . owasp . esapi . filters . SecurityWrapperRequestTest . ValidatorTestContainer validatorTester = new org . owasp . esapi . filters . SecurityWrapperRequestTest . ValidatorTestContainer ( mockValidator ) ; validatorTester . getValidInputReturns ( null ) ; org . powermock . api . mockito . PowerMockito . when ( mockSecConfig . getIntProp ( org . owasp . esapi . filters . SecurityWrapperRequestTest . SECURITY_CONFIGURATION_PARAMETER_STRING_LENGTH_KEY_NAME ) ) . thenReturn ( org . owasp . esapi . filters . SecurityWrapperRequestTest . SECURITY_CONFIGURATION_TEST_LENGTH ) ; org . powermock . api . mockito . PowerMockito . when ( mockRequest . getParameter ( testParameterName ) ) . thenReturn ( testParameterValue ) ; org . owasp . esapi . filters . SecurityWrapperRequest request = new org . owasp . esapi . filters . SecurityWrapperRequest ( mockRequest ) ; java . lang . String rval = request . getParameter ( testParameterName ) ; "<AssertPlaceHolder>" ; validatorTester . verify ( testParameterValue , org . owasp . esapi . filters . SecurityWrapperRequestTest . PARAMETER_STRING_CANONCALIZE_TYPE_KEY , org . owasp . esapi . filters . SecurityWrapperRequestTest . SECURITY_CONFIGURATION_TEST_LENGTH , true ) ; verify ( mockSecConfig , times ( 1 ) ) . getIntProp ( org . owasp . esapi . filters . SecurityWrapperRequestTest . SECURITY_CONFIGURATION_PARAMETER_STRING_LENGTH_KEY_NAME ) ; verify ( mockRequest , times ( 1 ) ) . getParameter ( testParameterName ) ; } getParameter ( java . lang . String ) { return getParameter ( getCurrentRequest ( ) , name ) ; }
org . junit . Assert . assertNull ( rval )
testWelOuwkivNietIngezeteneNietIngeschrevene ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > overtreders = brby0169 . voerRegelUit ( null , maakNieuweSituatie ( true ) , null , maakBestaandeBetrokkenen ( false , false ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , overtreders . size ( ) )
testTrim ( ) { org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . org . stringtemplate . v4 . ST ( "<trim(name)>" ) ; e . add ( "name" , "<sp>Ter<sp>\n" ) ; java . lang . String expecting = "Ter" ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
org . junit . Assert . assertEquals ( expecting , e . render ( ) )
testNoShimSpecified ( ) { java . lang . String testMessage = "testMessage" ; when ( hadoopConfigurationBootstrap . getProvider ( ) ) . thenThrow ( new org . pentaho . di . core . hadoop . NoShimSpecifiedException ( testMessage ) ) ; org . pentaho . runtime . test . result . RuntimeTestResultSummary runtimeTestResultSummary = testShimLoad . runTest ( namedCluster ) ; verifyRuntimeTestResultEntry ( runtimeTestResultSummary . getOverallStatusEntry ( ) , RuntimeTestEntrySeverity . ERROR , messageGetter . getMessage ( TestShimLoad . TEST_SHIM_LOAD_NO_SHIM_SPECIFIED_DESC ) , testMessage , org . pentaho . di . core . hadoop . NoShimSpecifiedException . class ) ; "<AssertPlaceHolder>" ; } getRuntimeTestResultEntries ( ) { return runtimeTestResultSummary . getRuntimeTestResultEntries ( ) ; }
org . junit . Assert . assertEquals ( 0 , runtimeTestResultSummary . getRuntimeTestResultEntries ( ) . size ( ) )
whenWriteUsingCharSink_thenWritten ( ) { final java . lang . String expectedValue = "Hello<sp>world" ; final java . io . File file = new java . io . File ( "src/test/resources/test.out" ) ; final com . google . common . io . CharSink sink = com . google . common . io . Files . asCharSink ( file , Charsets . UTF_8 ) ; sink . write ( expectedValue ) ; final java . lang . String result = com . google . common . io . Files . toString ( file , Charsets . UTF_8 ) ; "<AssertPlaceHolder>" ; } write ( java . io . OutputStream ) { wb . write ( os ) ; return this ; }
org . junit . Assert . assertEquals ( expectedValue , result )
testDealPendingNotifications ( ) { java . lang . String json_string = "{\"response\":{\"meta\":{\"v\":1,\"10.9\",\"status\":1,\"1OK\",\"code\":1,\"0timeRef\":1378384157632,\"msg\":1,\"1\"},\"data\":{\"startIndex\":0,\"itemsPerPage\":1,\"totalResults\":1,\"entry\":[{\"guid\":1,\"14dc60385-b4f1-4840-b9d8-3af886a5d118\",\"name\":1,\"11\",\"type\":1,\"1notification\",\"created\":1378384155722,\"operation\":1,\"1create\",\"element\":{\"guid\":1,\"11608\",\"type\":1,\"1usernotification\",\"userId\":1,\"1@me\"}}]}}}" ; org . codehaus . jettison . json . JSONObject j ; try { j = new org . codehaus . jettison . json . JSONObject ( json_string ) ; internalNotifySchedule . pushNotAtendedNotification ( j ) ; notificationDispacher . setTopic ( simpleBroadcaster ) ; notificationDispacher . setInternalNotifySchedule ( internalNotifySchedule ) ; internalNotifySchedule . addBroadcaster ( notificationDispacher , simpleBroadcaster , said ) ; notificationDispacher2 . setTopic ( simpleBroadcaster2 ) ; notificationDispacher2 . setInternalNotifySchedule ( internalNotifySchedule ) ; internalNotifySchedule . addBroadcaster ( notificationDispacher2 , simpleBroadcaster2 , said ) ; internalNotifySchedule . dealNotifications ( ) ; org . mockito . Mockito . verify ( notificationDispacher ) . publishIntern ( captor . capture ( ) , ( ( org . atmosphere . cpr . Broadcaster ) ( org . mockito . Mockito . anyObject ( ) ) ) ) ; org . mockito . Mockito . verify ( simpleBroadcaster ) . broadcast ( org . mockito . Mockito . anyObject ( ) ) ; org . mockito . Mockito . verify ( internalNotifySchedule ) . removeBroadcaster ( simpleBroadcaster ) ; java . lang . String json_sended = captor . getValue ( ) ; "<AssertPlaceHolder>" ; } catch ( org . codehaus . jettison . json . JSONException e ) { org . junit . Assert . fail ( ) ; } } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( json_string , json_sended )
setOwnerUserIsNullRemovesOldOwner ( ) { final boolean ownerSet = this . component . setOwner ( this . entity , null ) ; "<AssertPlaceHolder>" ; verify ( this . helper , times ( 1 ) ) . setProperty ( this . entityDoc , org . phenotips . data . permissions . internal . DefaultEntityAccessManagerTest . OWNER_CLASS , org . phenotips . data . permissions . internal . DefaultEntityAccessManagerTest . OWNER_LABEL , org . apache . commons . lang3 . StringUtils . EMPTY ) ; verify ( this . xwiki , times ( 1 ) ) . saveDocument ( this . entityDoc , ( "Set<sp>owner:<sp>" + ( org . apache . commons . lang3 . StringUtils . EMPTY ) ) , true , this . context ) ; } setOwner ( com . xpn . xwiki . doc . XWikiDocument , com . xpn . xwiki . doc . XWikiDocument ) { com . xpn . xwiki . objects . BaseObject owner = familyXDocument . newXObject ( Owner . CLASS_REFERENCE , this . context ) ; owner . setStringValue ( Owner . PROPERTY_NAME , this . getOwner ( patientXDoc ) ) ; }
org . junit . Assert . assertTrue ( ownerSet )
testUseSystemProperty ( ) { org . apache . bookkeeper . conf . ClientConfiguration clientConfiguration = new org . apache . bookkeeper . conf . ClientConfiguration ( ) ; "<AssertPlaceHolder>" ; } getThrottleValue ( ) { return this . getInt ( org . apache . bookkeeper . conf . ClientConfiguration . THROTTLE , 5000 ) ; }
org . junit . Assert . assertEquals ( 5000 , clientConfiguration . getThrottleValue ( ) )
testSessionFixationAvoidance ( ) { tester . startPage ( org . geoserver . web . GeoServerHomePage . class ) ; final org . apache . wicket . protocol . http . WebSession session = org . apache . wicket . protocol . http . WebSession . get ( ) ; session . bind ( ) ; session . setAttribute ( "test" , "whatever" ) ; tester . startPage ( org . geoserver . web . GeoServerHomePage . class ) ; org . springframework . mock . web . MockHttpServletRequest request = createRequest ( "login" ) ; request . setMethod ( "POST" ) ; request . setParameter ( "username" , "admin" ) ; request . setParameter ( "password" , "geoserver" ) ; dispatch ( request ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { if ( ( type . getDescriptor ( path ) ) == null ) return null ; return delegate . getAttribute ( path ) ; }
org . junit . Assert . assertNull ( session . getAttribute ( "test" ) )
getNicInfo_nodeNotInNodeMap ( ) { com . vmware . vrack . hms . rest . services . ServerRestServiceTest . clearNodeMapAndBoardService ( ) ; com . vmware . vrack . hms . rest . services . ServerRestService restService = new com . vmware . vrack . hms . rest . services . ServerRestService ( ) ; java . util . List < com . vmware . vrack . hms . common . resource . fru . EthernetController > ethernetControllers = restService . getNicInfo ( "N1" ) ; "<AssertPlaceHolder>" ; } getNicInfo ( java . lang . String ) { if ( ! ( serverConnector . getNodeMap ( ) . containsKey ( host_id ) ) ) throw new com . vmware . vrack . hms . common . exception . HMSRestException ( Status . NOT_FOUND . getStatusCode ( ) , "Invalid<sp>Request" , ( "Can't<sp>find<sp>host<sp>with<sp>id<sp>" + host_id ) ) ; else { com . vmware . vrack . hms . common . servernodes . api . ServerNode node = ( ( com . vmware . vrack . hms . common . servernodes . api . ServerNode ) ( serverConnector . getNodeMap ( ) . get ( host_id ) ) ) ; if ( ( ( ( node . getEthernetControllerList ( ) ) != null ) && ( ( node . getEthernetControllerList ( ) . size ( ) ) > 0 ) ) && ( useServerInfoCache ) ) return node . getEthernetControllerList ( ) ; try { executeTask ( node , TaskType . NicInfo ) ; } catch ( com . vmware . vrack . hms . common . exception . HmsResourceBusyException e ) { throw new com . vmware . vrack . hms . common . exception . HMSRestException ( Status . INTERNAL_SERVER_ERROR . getStatusCode ( ) , com . vmware . vrack . hms . common . util . Constants . RESOURCE_BUSY , e . getMessage ( ) ) ; } catch ( com . vmware . vrack . hms . common . exception . HmsException e ) { if ( e instanceof com . vmware . vrack . hms . common . exception . HMSRestException ) { throw e ; } else { throw new com . vmware . vrack . hms . common . exception . HMSRestException ( Status . INTERNAL_SERVER_ERROR . getStatusCode ( ) , "Server<sp>Error" , e . getMessage ( ) ) ; } } catch ( java . lang . Exception e ) { throw new com . vmware . vrack . hms . common . exception . HMSRestException ( Status . INTERNAL_SERVER_ERROR . getStatusCode ( ) , "Server<sp>Error" , e . getMessage ( ) ) ; } return node . getEthernetControllerList ( ) ; } }
org . junit . Assert . assertNotNull ( ethernetControllers )
testAddNotification_noFinalRecips_assertTxNotAdded ( ) { org . nhindirect . monitor . processor . impl . DefaultDuplicateNotificationStateManager mgr = new org . nhindirect . monitor . processor . impl . DefaultDuplicateNotificationStateManager ( ) ; mgr . setDao ( notifDao ) ; org . nhindirect . common . tx . model . Tx tx = org . nhindirect . monitor . util . TestUtils . makeMessage ( TxMessageType . DSN , "1234" , "5678" , "" , "" , "" ) ; mgr . addNotification ( tx ) ; java . util . Set < java . lang . String > addedAddr = notifDao . getReceivedAddresses ( "1234" , java . util . Arrays . asList ( "gm2552@cerner.com" ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 0 , addedAddr . size ( ) )
calculateNestedViewportDifferentFromParentTest ( ) { com . itextpdf . kernel . geom . Rectangle expected = new com . itextpdf . kernel . geom . Rectangle ( 0 , 0 , 500 , 500 ) ; com . itextpdf . svg . renderers . SvgDrawContext context = new com . itextpdf . svg . renderers . SvgDrawContext ( null , null ) ; com . itextpdf . kernel . pdf . PdfDocument document = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfWriter ( new java . io . ByteArrayOutputStream ( ) , new com . itextpdf . kernel . pdf . WriterProperties ( ) . setCompressionLevel ( 0 ) ) ) ; document . addNewPage ( ) ; com . itextpdf . kernel . pdf . xobject . PdfFormXObject pdfForm = new com . itextpdf . kernel . pdf . xobject . PdfFormXObject ( expected ) ; com . itextpdf . kernel . pdf . canvas . PdfCanvas canvas = new com . itextpdf . kernel . pdf . canvas . PdfCanvas ( pdfForm , document ) ; context . pushCanvas ( canvas ) ; context . addViewPort ( expected ) ; com . itextpdf . svg . renderers . impl . SvgTagSvgNodeRenderer parent = new com . itextpdf . svg . renderers . impl . SvgTagSvgNodeRenderer ( ) ; com . itextpdf . svg . renderers . impl . SvgTagSvgNodeRenderer renderer = new com . itextpdf . svg . renderers . impl . SvgTagSvgNodeRenderer ( ) ; com . itextpdf . svg . renderers . impl . PdfRootSvgNodeRenderer root = new com . itextpdf . svg . renderers . impl . PdfRootSvgNodeRenderer ( parent ) ; java . util . Map < java . lang . String , java . lang . String > styles = new java . util . HashMap ( ) ; styles . put ( "width" , "500" ) ; styles . put ( "height" , "500" ) ; renderer . setAttributesAndStyles ( styles ) ; renderer . setParent ( parent ) ; com . itextpdf . kernel . geom . Rectangle actual = root . calculateViewPort ( context ) ; "<AssertPlaceHolder>" ; } equalsWithEpsilon ( com . itextpdf . kernel . geom . Rectangle ) { return equalsWithEpsilon ( that , com . itextpdf . kernel . geom . Rectangle . EPS ) ; }
org . junit . Assert . assertTrue ( expected . equalsWithEpsilon ( actual ) )
zouGeenMeldingMoetenGevenWantGeenOudersInBericht ( ) { nl . bzk . brp . model . objecttype . logisch . Relatie relatieBericht = mock ( nl . bzk . brp . model . objecttype . bericht . RelatieBericht . class ) ; nl . bzk . brp . model . objecttype . logisch . Relatie relatieModel = mock ( nl . bzk . brp . model . objecttype . operationeel . RelatieModel . class ) ; when ( relatieBericht . getOuderBetrokkenheden ( ) ) . thenReturn ( Collections . EMPTY_SET ) ; java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = brby0134 . executeer ( relatieModel , relatieBericht , null ) ; "<AssertPlaceHolder>" ; verify ( persoonRepository , never ( ) ) . findByBurgerservicenummer ( isA ( nl . bzk . brp . model . attribuuttype . Burgerservicenummer . class ) ) ; verify ( relatieRepository , never ( ) ) . isVerwant ( anyInt ( ) , anyInt ( ) ) ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertThat ( meldingen . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
testModifyTicketExpireWithDateEmptyTicketId ( ) { java . util . Date now = new java . util . Date ( ) ; org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyExpiration ( "" , now ) ; "<AssertPlaceHolder>" ; } instanceForModifyExpiration ( java . lang . String , java . lang . String ) { if ( ( ticketId == null ) || ( ticketId . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>ticket<sp>id" ) ; } if ( ( expirationDate == null ) || ( expirationDate . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>expiration<sp>date" ) ; } if ( ! ( org . irods . jargon . ticket . packinstr . MODIFY_DATE_FORMAT . matcher ( expirationDate ) . matches ( ) ) ) { throw new java . lang . IllegalArgumentException ( "illegal<sp>expiration<sp>date" ) ; } return new org . irods . jargon . ticket . packinstr . TicketAdminInp ( TICKET_ADMIN_INP_API_NBR , "mod" , ticketId , "expire" , expirationDate , BLANK , BLANK ) ; }
org . junit . Assert . assertNotNull ( pi )
shouldIncreaseGreenMana ( ) { mage . Mana mana = new mage . Mana ( ) ; mana . increaseGreen ( ) ; "<AssertPlaceHolder>" ; } getGreen ( ) { return green ; }
org . junit . Assert . assertEquals ( 1 , mana . getGreen ( ) )
murmurhashThreeStringFieldsTest ( ) { if ( org . apache . hyracks . storage . am . bloomfilter . LOGGER . isInfoEnabled ( ) ) { org . apache . hyracks . storage . am . bloomfilter . LOGGER . info ( "TESTING<sp>MURMUR<sp>HASH<sp>THREE<sp>STRING<sp>FIELDS" ) ; } int fieldCount = 3 ; 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 ( ) , 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 ( ) ; java . lang . String s1 = randomString ( 40 , rnd ) ; java . lang . String s2 = randomString ( 60 , rnd ) ; java . lang . String s3 = randomString ( 20 , rnd ) ; org . apache . hyracks . dataflow . common . utils . TupleUtils . createTuple ( tupleBuilder , tuple , fieldSerdes , s1 , s2 , s3 ) ; int [ ] keyFields = new int [ ] { 2 , 0 , 1 } ; int length = getTupleSize ( tuple , keyFields ) ; long [ ] actuals = new long [ org . apache . hyracks . storage . am . bloomfilter . MurmurHashForITupleReferenceTest . NUM_LONG_VARS_FOR_128_BIT_HASH ] ; org . apache . hyracks . storage . am . bloomfilter . impls . MurmurHash128Bit . hash3_x64_128 ( tuple , keyFields , 0L , actuals ) ; byte [ ] array = new byte [ length ] ; java . nio . ByteBuffer buffer ; fillArrayWithData ( array , keyFields , tuple , length ) ; buffer = java . nio . ByteBuffer . wrap ( array ) ; long [ ] expecteds = org . apache . hyracks . storage . am . bloomfilter . MurmurHashForITupleReferenceTest . hash3_x64_128 ( buffer , 0 , length , 0L ) ; "<AssertPlaceHolder>" ; } hash3_x64_128 ( java . nio . ByteBuffer , int , int , long ) { final int nblocks = length > > 4 ; long h1 = seed ; long h2 = seed ; long c1 = - 8663945395140668459L ; long c2 = 5545529020109919103L ; for ( int i = 0 ; i < nblocks ; i ++ ) { long k1 = org . apache . hyracks . storage . am . bloomfilter . MurmurHashForITupleReferenceTest . getblock ( key , offset , ( ( i * 2 ) + 0 ) ) ; long k2 = org . apache . hyracks . storage . am . bloomfilter . MurmurHashForITupleReferenceTest . getblock ( key , offset , ( ( i * 2 ) + 1 ) ) ; k1 *= c1 ; k1 = org . apache . hyracks . storage . am . bloomfilter . impls . MurmurHash128Bit . rotl64 ( k1 , 31 ) ; k1 *= c2 ; h1 ^= k1 ; h1 = org . apache . hyracks . storage . am . bloomfilter . impls . MurmurHash128Bit . rotl64 ( h1 , 27 ) ; h1 += h2 ; h1 = ( h1 * 5 ) + 1390208809 ; k2 *= c2 ; k2 = org . apache . hyracks . storage . am . bloomfilter . impls . MurmurHash128Bit . rotl64 ( k2 , 33 ) ; k2 *= c1 ; h2 ^= k2 ; h2 = org . apache . hyracks . storage . am . bloomfilter . impls . MurmurHash128Bit . rotl64 ( h2 , 31 ) ; h2 += h1 ; h2 = ( h2 * 5 ) + 944331445 ; } offset += nblocks * 16 ; long k1 = 0 ; long k2 = 0 ; switch ( length & 15 ) { case 15 : k2 ^= ( ( long ) ( key . get ( ( offset + 14 ) ) ) ) << 48 ; case 14 : k2 ^= ( ( long ) ( key . get ( ( offset + 13 ) ) ) ) << 40 ; case 13 : k2 ^= ( ( long ) ( key . get ( ( offset + 12 ) ) ) ) << 32 ; case 12 : k2 ^= ( ( long ) ( key . get ( ( offset + 11 ) ) ) ) << 24 ; case 11 : k2 ^= ( ( long ) ( key . get ( ( offset + 10 ) ) ) ) << 16 ; case 10 : k2 ^= ( ( long ) ( key . get ( ( offset + 9 ) ) ) ) << 8 ; case 9 : k2 ^= ( ( long ) ( key . get ( ( offset + 8 ) ) ) ) << 0 ; k2 *= c2 ; k2 = org . apache . hyracks . storage . am . bloomfilter . impls . MurmurHash128Bit . rotl64 ( k2 , 33 ) ; k2 *= c1 ; h2 ^= k2 ; case 8 : k1 ^= ( ( long ) ( key . get ( ( offset + 7 ) ) ) ) << 56 ; case 7 : k1 ^= ( ( long ) ( key . get ( ( offset + 6 )
org . junit . Assert . assertArrayEquals ( expecteds , actuals )
testEmptyRecord ( ) { java . util . List < com . streamsets . pipeline . lib . jdbc . JdbcFieldColumnParamMapping > mappings = new java . util . ArrayList ( ) ; com . streamsets . pipeline . lib . jdbc . JdbcRecordWriter writer = new com . streamsets . pipeline . lib . jdbc . JdbcMultiRowRecordWriter ( com . streamsets . pipeline . lib . jdbc . TestJdbcMultiRowRecordWriter . connectionString , dataSource , "TEST" , "TEST_TABLE" , false , mappings , JdbcMultiRowRecordWriter . UNLIMITED_PARAMETERS , JDBCOperationType . INSERT . getCode ( ) , com . streamsets . pipeline . lib . operation . UnsupportedOperationAction . DISCARD , null , new com . streamsets . pipeline . lib . jdbc . JdbcRecordReader ( ) , false , java . util . Collections . emptyList ( ) ) ; java . util . List < com . streamsets . pipeline . api . Record > batch = java . util . Collections . singletonList ( com . streamsets . pipeline . sdk . RecordCreator . create ( ) ) ; java . util . List < com . streamsets . pipeline . api . base . OnRecordErrorException > errors = writer . writeBatch ( batch . iterator ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return false ; }
org . junit . Assert . assertTrue ( errors . isEmpty ( ) )
toSpdStringForOptionalAndNotEmpty ( ) { optionalSubject . setValue ( SpdConstants . NotificationRequest . NON_RECEIPT ) ; "<AssertPlaceHolder>" ; } toSpdString ( ) { return java . lang . String . format ( "%04d" , this . noOperationError ) ; }
org . junit . Assert . assertEquals ( "1" , optionalSubject . toSpdString ( ) )
testGetFormattedMACAddress_NullString ( ) { com . emc . storageos . driver . dellsc . scapi . objects . ScControllerPortIscsiConfiguration config = new com . emc . storageos . driver . dellsc . scapi . objects . ScControllerPortIscsiConfiguration ( ) ; "<AssertPlaceHolder>" ; } getFormattedMACAddress ( ) { java . lang . String defaultReturn = "00:00:00:00:00:00" ; if ( ( macAddress ) == null ) { return defaultReturn ; } java . lang . String mac = macAddress . replace ( "-" , "" ) ; if ( ( mac . length ( ) ) != 12 ) { return defaultReturn ; } java . util . List < java . lang . String > parts = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 6 ; i ++ ) { int offset = 2 * i ; parts . add ( mac . substring ( offset , ( offset + 2 ) ) ) ; } return java . lang . String . join ( ":" , parts ) ; }
org . junit . Assert . assertTrue ( "00:00:00:00:00:00" . equals ( config . getFormattedMACAddress ( ) ) )
testIsEnabledEnabledTable ( ) { createTable ( "enabledtable" , true ) ; "<AssertPlaceHolder>" ; new org . apache . blur . manager . clusterstatus . ZookeeperClusterStatusTest . WaitForAnswerToBeCorrect ( 20L ) { @ org . apache . blur . manager . clusterstatus . Override public java . lang . Object run ( ) { return clusterStatus2 . isEnabled ( true , org . apache . blur . manager . clusterstatus . ZookeeperClusterStatusTest . DEFAULT , "enabledtable" ) ; } } . test ( true ) ; } isEnabled ( boolean , java . lang . String , java . lang . String ) { org . apache . blur . thrift . generated . TableDescriptor tableDescriptor = getTableDescriptor ( useCache , cluster , table ) ; return tableDescriptor . isEnabled ( ) ; }
org . junit . Assert . assertTrue ( clusterStatus2 . isEnabled ( false , org . apache . blur . manager . clusterstatus . ZookeeperClusterStatusTest . DEFAULT , "enabledtable" ) )
testAlpha ( ) { tested . setAlpha ( 0.53 ) ; "<AssertPlaceHolder>" ; } getAlpha ( ) { return alpha ; }
org . junit . Assert . assertEquals ( 0.53 , tested . getAlpha ( ) , 0.0 )
testIfUserCanDeleteSubscription ( ) { com . datasift . client . DataSiftResult delete = datasift . push ( ) . delete ( id ) . sync ( ) ; "<AssertPlaceHolder>" ; } isSuccessful ( ) { return ( ( ( ( ! ( failed ) ) && ( ( response ) != null ) ) && ( ( error ) == null ) ) && ( ( response . status ( ) ) > 199 ) ) && ( ( response . status ( ) ) < 400 ) ; }
org . junit . Assert . assertTrue ( delete . isSuccessful ( ) )
ZeroToZeroNP_ ( ) { java . lang . String token = com . fujitsu . dc . test . jersey . AbstractCase . MASTER_TOKEN_NAME ; java . lang . String cellName = "userDataDeepComplexTypeTestCell" ; java . lang . String boxName = "box" ; java . lang . String odataColName = "col" ; java . lang . String entityTypeName = "entity" ; try { createODataCollection ( token , cellName , boxName , odataColName ) ; createSchema ( token , cellName , boxName , odataColName , entityTypeName ) ; java . lang . String entityTypeNameNP = "entityNP" ; java . lang . String sourceMultiplicity = "0..1" ; java . lang . String targetMultiplicity = "0..1" ; createLinkedEntityType ( token , cellName , boxName , odataColName , entityTypeName , entityTypeNameNP , sourceMultiplicity , targetMultiplicity ) ; java . lang . String srcId = "id001" ; createUserData ( token , cellName , boxName , odataColName , entityTypeName , srcId ) ; com . fujitsu . dc . test . utils . TResponse response = com . fujitsu . dc . test . utils . UserDataUtils . get ( cellName , token , boxName , odataColName , entityTypeName , srcId , HttpStatus . SC_OK ) ; com . fujitsu . dc . test . utils . UserDataUtils . createViaNP ( token , parseStringToJSONObject ( "{\"__id\":\"idNp\"}" ) , cellName , boxName , odataColName , entityTypeName , srcId , entityTypeNameNP , HttpStatus . SC_CREATED ) ; com . fujitsu . dc . test . utils . TResponse modResponse = com . fujitsu . dc . test . utils . UserDataUtils . get ( cellName , token , boxName , odataColName , entityTypeName , srcId , HttpStatus . SC_OK ) ; com . fujitsu . dc . test . CompareJSON . Result res = com . fujitsu . dc . test . CompareJSON . compareJSON ( response . getBody ( ) , modResponse . getBody ( ) ) ; "<AssertPlaceHolder>" ; } catch ( org . json . simple . parser . ParseException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } finally { com . fujitsu . dc . test . setup . Setup . cellBulkDeletion ( cellName ) ; } } getBody ( ) { return body ; }
org . junit . Assert . assertNull ( res )
testResolveEntity ( ) { org . pentaho . platform . config . DtdEntityResolver entityResolver = new org . pentaho . platform . config . DtdEntityResolver ( ) ; org . xml . sax . InputSource inputSource = entityResolver . resolveEntity ( "id" , "system/sid" ) ; "<AssertPlaceHolder>" ; } resolveEntity ( java . lang . String , java . lang . String ) { int idx = systemId . lastIndexOf ( '/' ) ; java . lang . String dtdName = systemId . substring ( ( idx + 1 ) ) ; try { java . io . File f = new java . io . File ( ( ( ( org . pentaho . platform . config . AppConfigProperties . getInstance ( ) . getSolutionPath ( ) ) + "/system/dtd/" ) + dtdName ) ) ; if ( ( f . exists ( ) ) && ( f . isFile ( ) ) ) { return new org . xml . sax . InputSource ( new java . io . FileInputStream ( f ) ) ; } } catch ( java . io . IOException e ) { } return null ; }
org . junit . Assert . assertNull ( inputSource )
testCommit ( ) { final java . util . concurrent . atomic . AtomicInteger i = new java . util . concurrent . atomic . AtomicInteger ( 1 ) ; ch . maxant . generic_jca_adapter . MicroserviceXAResource xa = new ch . maxant . generic_jca_adapter . MicroserviceXAResource ( "a" , new ch . maxant . generic_jca_adapter . CommitRollbackCallback ( ) { private static final long serialVersionUID = 1L ; @ ch . maxant . generic_jca_adapter . Override public void rollback ( java . lang . String txid ) throws ch . maxant . generic_jca_adapter . Exception { org . junit . Assert . fail ( "not<sp>expected<sp>here" ) ; } @ ch . maxant . generic_jca_adapter . Override public void commit ( java . lang . String txid ) throws ch . maxant . generic_jca_adapter . Exception { i . incrementAndGet ( ) ; } } ) ; xa . commit ( new javax . transaction . xa . Xid ( ) { @ ch . maxant . generic_jca_adapter . Override public byte [ ] getGlobalTransactionId ( ) { return "gtxid" . getBytes ( ) ; } @ ch . maxant . generic_jca_adapter . Override public int getFormatId ( ) { return 99 ; } @ ch . maxant . generic_jca_adapter . Override public byte [ ] getBranchQualifier ( ) { return "bq" . getBytes ( ) ; } } , false ) ; "<AssertPlaceHolder>" ; } getBranchQualifier ( ) { return bq ; }
org . junit . Assert . assertEquals ( 2 , i . get ( ) )
testDeclaredSlidingWindowOnEventInTypeDeclaration ( ) { java . lang . String str = "declare<sp>String\n" + ( ( ( ( ( ( ( ( ( "<sp>@role(<sp>event<sp>)\n" + "rule<sp>R<sp>when\n" 1 ) + "declare<sp>window<sp>DeclaredWindow\n" ) + "rule<sp>R<sp>when\n" 0 ) + "rule<sp>R<sp>when\n" 1 ) + "rule<sp>R<sp>when\n" ) + "<sp>$a<sp>:<sp>String(<sp>this<sp>==<sp>\"DROO\"<sp>)<sp>from<sp>window<sp>DeclaredWindow\n" ) + "then\n" ) + "<sp>System.out.println($a);\n" ) + "rule<sp>R<sp>when\n" 1 ) ; org . kie . api . runtime . KieSession ksession = getKieSession ( org . drools . modelcompiler . CepTest . getCepKieModuleModel ( ) , str ) ; org . kie . api . time . SessionPseudoClock clock = ksession . getSessionClock ( ) ; ksession . insert ( "ACME" ) ; ksession . insert ( "DROO" ) ; "<AssertPlaceHolder>" ; } fireAllRules ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) )
mergeWithSameList ( ) { puck . thrifty . datatype . ListElement elem = new puck . thrifty . datatype . ListElement ( new puck . thrifty . datatype . StringElement ( "test" ) ) ; puck . thrifty . datatype . Element mergeElem = elem . merge ( elem ) ; "<AssertPlaceHolder>" ; } merge ( puck . thrifty . datatype . Element ) { if ( ( ( ( element == null ) || ( ( this ) == element ) ) || ( element . isUnknown ( ) ) ) || ( this . getClass ( ) . equals ( element . getClass ( ) ) ) ) { return this ; } else if ( element instanceof puck . thrifty . datatype . NumberElement ) { return element ; } throw new puck . thrifty . MergerException ( this , element ) ; }
org . junit . Assert . assertSame ( elem , mergeElem )
testSimpleCFSCRIPTCommentInScript ( ) { final java . lang . String cfcSrc = "<cfcomponent>\r\n" + ( ( ( ( ( ( ( ( ( "<cffunction<sp>name=\"test\">\r\n" + "\t<cfscript>\r\n" ) + "<sp>//<sp>Set<sp>Rate<sp>Event<sp>Fields;\r\n" ) + "\tvar<sp>x={};\r\n" ) + "\tx.xx=123;\r\n" 0 ) + "\t<cfscript>\r\n" ) + "\tx.xx=123;\r\n" ) + "\tx.xx=123;\r\n" 0 ) + "\tx.xx=123;\r\n" 1 ) + "</cfcomponent>" ) ; com . cflint . api . CFLintResult lintresult = cfBugs . scan ( cfcSrc , "test" ) ; java . util . Collection < java . util . List < com . cflint . BugInfo > > result = lintresult . getIssues ( ) . values ( ) ; "<AssertPlaceHolder>" ; } size ( ) { int size = 0 ; for ( final java . util . List < ? > list : bugs . values ( ) ) { size += list . size ( ) ; } return size ; }
org . junit . Assert . assertEquals ( ( "" + result ) , 0 , result . size ( ) )
fixtureSharedSequence ( ) { br . com . six2six . fixturefactory . model . Student oneStudent = br . com . six2six . fixturefactory . Fixture . from ( br . com . six2six . fixturefactory . model . Student . class ) . gimme ( "sharedSequence" ) ; br . com . six2six . fixturefactory . model . Student otherStudent = br . com . six2six . fixturefactory . Fixture . from ( br . com . six2six . fixturefactory . model . Student . class ) . gimme ( "otherSharedSequence" ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertTrue ( ( ( oneStudent . getId ( ) ) < ( otherStudent . getId ( ) ) ) )
testGetServletMapping ( ) { webXml = new org . pentaho . platform . config . WebXml ( document ) ; org . dom4j . Node node = mock ( org . dom4j . Node . class ) ; org . dom4j . Node subNode = mock ( org . dom4j . Node . class ) ; when ( subNode . getText ( ) ) . thenReturn ( "test<sp>node<sp>content" ) ; when ( node . selectSingleNode ( "../jsp-file" ) ) . thenReturn ( subNode ) ; when ( document . selectSingleNode ( anyString ( ) ) ) . thenReturn ( node ) ; java . lang . String test = webXml . getServletMapping ( "test" ) ; "<AssertPlaceHolder>" ; verify ( node ) . selectSingleNode ( "../jsp-file" ) ; verify ( subNode ) . getText ( ) ; } getServletMapping ( java . lang . String ) { java . lang . String xPath = java . text . MessageFormat . format ( org . pentaho . platform . config . WebXml . SERVLET_NAME_TEMPLATE_XPATH , name ) ; org . dom4j . Node node = document . selectSingleNode ( xPath ) ; java . lang . String value = null ; if ( node != null ) { node = node . selectSingleNode ( "../jsp-file" ) ; } if ( node != null ) { value = node . getText ( ) ; } return value ; }
org . junit . Assert . assertEquals ( "test<sp>node<sp>content" , test )
makeIndirectPdfAnnotationTest ( ) { com . itextpdf . kernel . pdf . PdfDictionary object = new com . itextpdf . kernel . pdf . PdfDictionary ( ) ; try ( com . itextpdf . kernel . pdf . PdfDocument doc = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfWriter ( new java . io . ByteArrayOutputStream ( ) ) ) ) { doc . addNewPage ( ) ; com . itextpdf . kernel . pdf . PdfObject indirect = object . makeIndirect ( doc ) ; object . put ( PdfName . Subtype , PdfName . Text ) ; com . itextpdf . kernel . pdf . annot . PdfAnnotation result = com . itextpdf . kernel . pdf . annot . PdfAnnotation . makeAnnotation ( indirect ) ; "<AssertPlaceHolder>" ; } } makeAnnotation ( com . itextpdf . kernel . pdf . PdfObject ) { com . itextpdf . kernel . pdf . annot . PdfAnnotation annotation = null ; if ( pdfObject . isIndirectReference ( ) ) pdfObject = ( ( com . itextpdf . kernel . pdf . PdfIndirectReference ) ( pdfObject ) ) . getRefersTo ( ) ; if ( pdfObject . isDictionary ( ) ) { com . itextpdf . kernel . pdf . PdfDictionary dictionary = ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ; com . itextpdf . kernel . pdf . PdfName subtype = dictionary . getAsName ( PdfName . Subtype ) ; if ( PdfName . Link . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfLinkAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . Popup . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfPopupAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . Widget . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfWidgetAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . Screen . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfScreenAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . _3D . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . Pdf3DAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( ( ( ( PdfName . Highlight . equals ( subtype ) ) || ( PdfName . Underline . equals ( subtype ) ) ) || ( PdfName . Squiggly . equals ( subtype ) ) ) || ( PdfName . StrikeOut . equals ( subtype ) ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfTextMarkupAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . Caret . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfCaretAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . Text . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfTextAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . Sound . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfSoundAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . Stamp . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfStampAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . FileAttachment . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfFileAttachmentAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . Ink . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfInkAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . PrinterMark . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfPrinterMarkAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . TrapNet . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfTrapNetworkAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject ) ) ) ; } else if ( PdfName . FreeText . equals ( subtype ) ) { annotation = new com . itextpdf . kernel . pdf . annot . PdfFreeTextAnnotation ( ( ( com . itextpdf . kernel . pdf . PdfDictionary ) ( pdfObject
org . junit . Assert . assertTrue ( ( result instanceof com . itextpdf . kernel . pdf . annot . PdfTextAnnotation ) )
testDependencyLogFactory ( ) { ca . uhn . fhir . util . jar . IDependencyLog logger = ca . uhn . fhir . util . jar . DependencyLogFactory . createJarLogger ( ) ; "<AssertPlaceHolder>" ; logger . logStaxImplementation ( ca . uhn . fhir . util . DependencyLogUtilTest . class ) ; } createJarLogger ( ) { return ca . uhn . fhir . util . ReflectionUtil . newInstanceOrReturnNull ( "ca.uhn.fhir.util.jar.DependencyLogImpl" , ca . uhn . fhir . util . jar . IDependencyLog . class ) ; }
org . junit . Assert . assertNotNull ( logger )
testWeixinBundle ( ) { com . foxinmy . weixin4j . api . MchApi mchApi = new com . foxinmy . weixin4j . api . MchApi ( new com . foxinmy . weixin4j . model . WeixinPayAccount ( null , null , null ) ) ; "<AssertPlaceHolder>" ; } weixinBundle ( ) { return com . foxinmy . weixin4j . mp . api . MpApi . WEIXIN_BUNDLE ; }
org . junit . Assert . assertNotNull ( mchApi . weixinBundle ( ) )
testValidateAndTrimBusinessObjectFormatExternalInterfaceKey ( ) { org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceKey businessObjectFormatExternalInterfaceKey = new org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceKey ( NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , EXTERNAL_INTERFACE ) ; when ( alternateKeyHelper . validateStringParameter ( "namespace" , org . finra . herd . service . helper . NAMESPACE ) ) . thenReturn ( org . finra . herd . service . helper . NAMESPACE_2 ) ; when ( alternateKeyHelper . validateStringParameter ( "business<sp>object<sp>definition<sp>name" , org . finra . herd . service . helper . BDEF_NAME ) ) . thenReturn ( org . finra . herd . service . helper . BDEF_NAME_2 ) ; when ( alternateKeyHelper . validateStringParameter ( "business<sp>object<sp>format<sp>usage" , org . finra . herd . service . helper . FORMAT_USAGE_CODE ) ) . thenReturn ( org . finra . herd . service . helper . FORMAT_USAGE_CODE_2 ) ; when ( alternateKeyHelper . validateStringParameter ( "business<sp>object<sp>format<sp>file<sp>type" , org . finra . herd . service . helper . FORMAT_FILE_TYPE_CODE ) ) . thenReturn ( org . finra . herd . service . helper . FORMAT_FILE_TYPE_CODE_2 ) ; when ( alternateKeyHelper . validateStringParameter ( "An" , "external<sp>interface<sp>name" , org . finra . herd . service . helper . EXTERNAL_INTERFACE ) ) . thenReturn ( org . finra . herd . service . helper . EXTERNAL_INTERFACE_2 ) ; businessObjectFormatExternalInterfaceHelper . validateAndTrimBusinessObjectFormatExternalInterfaceKey ( businessObjectFormatExternalInterfaceKey ) ; "<AssertPlaceHolder>" ; verify ( alternateKeyHelper ) . validateStringParameter ( "namespace" , org . finra . herd . service . helper . NAMESPACE ) ; verify ( alternateKeyHelper ) . validateStringParameter ( "business<sp>object<sp>definition<sp>name" , org . finra . herd . service . helper . BDEF_NAME ) ; verify ( alternateKeyHelper ) . validateStringParameter ( "business<sp>object<sp>format<sp>usage" , org . finra . herd . service . helper . FORMAT_USAGE_CODE ) ; verify ( alternateKeyHelper ) . validateStringParameter ( "business<sp>object<sp>format<sp>file<sp>type" , org . finra . herd . service . helper . FORMAT_FILE_TYPE_CODE ) ; verify ( alternateKeyHelper ) . validateStringParameter ( "An" , "external<sp>interface<sp>name" , org . finra . herd . service . helper . EXTERNAL_INTERFACE ) ; verifyNoMoreInteractions ( alternateKeyHelper ) ; } validateAndTrimBusinessObjectFormatExternalInterfaceKey ( org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceKey ) { org . springframework . util . Assert . notNull ( businessObjectFormatExternalInterfaceKey , "A<sp>business<sp>object<sp>format<sp>to<sp>external<sp>interface<sp>mapping<sp>key<sp>must<sp>be<sp>specified." ) ; businessObjectFormatExternalInterfaceKey . setNamespace ( alternateKeyHelper . validateStringParameter ( "namespace" , businessObjectFormatExternalInterfaceKey . getNamespace ( ) ) ) ; businessObjectFormatExternalInterfaceKey . setBusinessObjectDefinitionName ( alternateKeyHelper . validateStringParameter ( "business<sp>object<sp>definition<sp>name" , businessObjectFormatExternalInterfaceKey . getBusinessObjectDefinitionName ( ) ) ) ; businessObjectFormatExternalInterfaceKey . setBusinessObjectFormatUsage ( alternateKeyHelper . validateStringParameter ( "business<sp>object<sp>format<sp>usage" , businessObjectFormatExternalInterfaceKey . getBusinessObjectFormatUsage ( ) ) ) ; businessObjectFormatExternalInterfaceKey . setBusinessObjectFormatFileType ( alternateKeyHelper . validateStringParameter ( "business<sp>object<sp>format<sp>file<sp>type" , businessObjectFormatExternalInterfaceKey . getBusinessObjectFormatFileType ( ) ) ) ; businessObjectFormatExternalInterfaceKey . setExternalInterfaceName ( alternateKeyHelper . validateStringParameter ( "An" , "external<sp>interface<sp>name" , businessObjectFormatExternalInterfaceKey . getExternalInterfaceName ( ) ) ) ; }
org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceKey ( NAMESPACE_2 , BDEF_NAME_2 , FORMAT_USAGE_CODE_2 , FORMAT_FILE_TYPE_CODE_2 , EXTERNAL_INTERFACE_2 ) , businessObjectFormatExternalInterfaceKey )
testScanning_EmptyPath ( ) { java . util . List < com . nhl . link . move . runtime . json . query . Token > tokens = com . nhl . link . move . runtime . json . query . ScannerTest . tokenizeQuery ( "" ) ; "<AssertPlaceHolder>" ; } tokenizeQuery ( java . lang . String ) { java . util . List < com . nhl . link . move . runtime . json . query . Token > tokens = new java . util . ArrayList ( ) ; com . nhl . link . move . runtime . json . query . Scanner scanner = new com . nhl . link . move . runtime . json . query . Scanner ( query ) ; while ( scanner . hasNext ( ) ) { tokens . add ( scanner . nextToken ( ) ) ; } return tokens ; }
org . junit . Assert . assertEquals ( 0 , tokens . size ( ) )
senateHearingTitleParses ( ) { java . util . List < java . util . List < java . lang . String > > pages = gov . nysenate . openleg . processor . hearing . PublicHearingTestHelper . getPagesFromFileName ( "05-23-11<sp>NY<sp>Senate<sp>Flanagan<sp>Education<sp>Hearing<sp>FINAL_AMENDED<sp>COVER<sp>SHEET<sp>ONLY.txt" ) ; java . lang . String expected = "A<sp>NEW<sp>YORK<sp>STATE<sp>SENATE<sp>HEARING<sp>" + ( ( "DUE<sp>PROCESS<sp>TEACHER<sp>DISCIPLINE<sp>WITHOUT<sp>DELAY:<sp>" + "REFORMING<sp>SECTION<sp>3020-A<sp>OF<sp>THE<sp>EDUCATION<sp>LAW<sp>" ) + "TO<sp>MEET<sp>THE<sp>NEEDS<sp>OF<sp>THE<sp>21st<sp>CENTURY" ) ; java . lang . String actual = titleParser . parse ( pages . get ( 0 ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { if ( ( gov . nysenate . openleg . service . shiro . shiroCacheManager . cache . get ( key ) ) == null ) return null ; else return gov . nysenate . openleg . service . shiro . shiroCacheManager . cache . get ( key ) . getObjectValue ( ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) )
testGetPrototypeEntityForHashKey_DelegatesToDynamoDBEntityMetadata_IrrespectiveOfEntityInformationSetup ( ) { org . socialsignin . spring . data . dynamodb . domain . sample . Playlist playlistPrototypeEntity = new org . socialsignin . spring . data . dynamodb . domain . sample . Playlist ( ) ; org . mockito . Mockito . when ( mockPlaylistEntityMetadata . getHashKeyPropotypeEntityForHashKey ( "someHashKey" ) ) . thenReturn ( playlistPrototypeEntity ) ; java . lang . Object returnedPlaylistEntity = dynamoDBPlaylistEntityInformation . getHashKeyPropotypeEntityForHashKey ( "someHashKey" ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( mockPlaylistEntityMetadata ) . getHashKeyPropotypeEntityForHashKey ( "someHashKey" ) ; } getHashKeyPropotypeEntityForHashKey ( H ) { return metadata . getHashKeyPropotypeEntityForHashKey ( hashKey ) ; }
org . junit . Assert . assertEquals ( playlistPrototypeEntity , returnedPlaylistEntity )
testNonRepeatableEntityResponseReturnedImmediately ( ) { final org . apache . hc . client5 . http . HttpRoute route = new org . apache . hc . client5 . http . HttpRoute ( target ) ; final org . apache . hc . client5 . http . classic . methods . HttpPost request = new org . apache . hc . client5 . http . classic . methods . HttpPost ( "/test" ) ; request . setEntity ( org . apache . hc . client5 . http . entity . EntityBuilder . create ( ) . setStream ( new java . io . ByteArrayInputStream ( new byte [ ] { } ) ) . build ( ) ) ; final org . apache . hc . client5 . http . protocol . HttpClientContext context = org . apache . hc . client5 . http . protocol . HttpClientContext . create ( ) ; final org . apache . hc . core5 . http . ClassicHttpResponse response = org . mockito . Mockito . mock ( org . apache . hc . core5 . http . ClassicHttpResponse . class ) ; org . mockito . Mockito . when ( chain . proceed ( org . mockito . Mockito . < org . apache . hc . core5 . http . ClassicHttpRequest > any ( ) , org . mockito . Mockito . < org . apache . hc . client5 . http . classic . ExecChain . Scope > any ( ) ) ) . thenReturn ( response ) ; org . mockito . Mockito . when ( retryStrategy . retryRequest ( org . mockito . Mockito . < org . apache . hc . core5 . http . HttpResponse > any ( ) , org . mockito . Mockito . anyInt ( ) , org . mockito . Mockito . < org . apache . hc . core5 . http . protocol . HttpContext > any ( ) ) ) . thenReturn ( Boolean . TRUE , Boolean . FALSE ) ; final org . apache . hc . client5 . http . classic . ExecChain . Scope scope = new org . apache . hc . client5 . http . classic . ExecChain . Scope ( "test" , route , request , endpoint , context ) ; final org . apache . hc . core5 . http . ClassicHttpResponse finalResponse = retryExec . execute ( request , scope , chain ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( response , org . mockito . Mockito . times ( 0 ) ) . close ( ) ; } execute ( org . apache . hc . core5 . http . ClassicHttpRequest , org . apache . hc . core5 . http . io . HttpClientConnection , org . apache . hc . core5 . http . protocol . HttpContext ) { final org . apache . hc . core5 . http . ClassicHttpResponse response = super . execute ( request , conn , context ) ; final java . lang . Object marker = context . getAttribute ( org . apache . hc . client5 . testing . sync . TestClientRequestExecution . FaultyHttpRequestExecutor . MARKER ) ; if ( marker == null ) { context . setAttribute ( org . apache . hc . client5 . testing . sync . TestClientRequestExecution . FaultyHttpRequestExecutor . MARKER , Boolean . TRUE ) ; throw new java . io . IOException ( failureMsg ) ; } return response ; }
org . junit . Assert . assertSame ( response , finalResponse )
availableShouldReturnNonZero ( ) { final java . io . File input = org . apache . commons . compress . AbstractTestCase . getFile ( "bla.tar.deflatez" ) ; try ( java . io . InputStream is = new java . io . FileInputStream ( input ) ) { final org . apache . commons . compress . compressors . deflate . DeflateCompressorInputStream in = new org . apache . commons . compress . compressors . deflate . DeflateCompressorInputStream ( is ) ; "<AssertPlaceHolder>" ; in . close ( ) ; } } available ( ) { return in . available ( ) ; }
org . junit . Assert . assertTrue ( ( ( in . available ( ) ) > 0 ) )
getExpandedMessageWithPageFormat ( ) { System . out . println ( "getExpandedMessage" ) ; org . krysalis . barcode4j . tools . PageInfo page = new org . krysalis . barcode4j . tools . PageInfo ( 42 , "42" ) ; java . lang . String msg = "Hallo<sp>Welt<sp>#page-number:0000#" ; java . lang . String expResult = "Hallo<sp>Welt<sp>0042" ; java . lang . String result = org . krysalis . barcode4j . tools . VariableUtil . getExpandedMessage ( page , msg ) ; "<AssertPlaceHolder>" ; } getExpandedMessage ( org . krysalis . barcode4j . tools . PageInfo , java . lang . String ) { java . lang . String s = msg ; int idx ; while ( ( idx = s . indexOf ( org . krysalis . barcode4j . tools . VariableUtil . PAGE_NUMBER_WITH_FORMAT ) ) >= 0 ) { final int endidx = s . indexOf ( '#' , ( idx + ( org . krysalis . barcode4j . tools . VariableUtil . PAGE_NUMBER_WITH_FORMAT . length ( ) ) ) ) ; if ( endidx < 0 ) { break ; } final java . lang . String fmt = s . substring ( ( idx + ( org . krysalis . barcode4j . tools . VariableUtil . PAGE_NUMBER_WITH_FORMAT . length ( ) ) ) , endidx ) ; final java . lang . StringBuilder sb = new java . lang . StringBuilder ( s ) ; java . lang . String value ; if ( page == null ) { final java . lang . StringBuilder blanks = new java . lang . StringBuilder ( fmt . length ( ) ) ; blanks . setLength ( fmt . length ( ) ) ; for ( int i = 0 ; i < ( blanks . length ( ) ) ; i ++ ) { blanks . setCharAt ( i , '0' ) ; } value = blanks . toString ( ) ; } else { final java . text . NumberFormat nf = new java . text . DecimalFormat ( fmt ) ; value = nf . format ( page . getPageNumber ( ) ) ; } sb . replace ( idx , ( endidx + 1 ) , value ) ; s = sb . toString ( ) ; } if ( page == null ) { s = org . krysalis . barcode4j . tools . VariableUtil . replace ( s , org . krysalis . barcode4j . tools . VariableUtil . PAGE_NUMBER , "000" ) ; s = org . krysalis . barcode4j . tools . VariableUtil . replace ( s , org . krysalis . barcode4j . tools . VariableUtil . FORMATTED_PAGE_NUMBER , "000" ) ; } else { s = org . krysalis . barcode4j . tools . VariableUtil . replace ( s , org . krysalis . barcode4j . tools . VariableUtil . PAGE_NUMBER , java . lang . Integer . toString ( page . getPageNumber ( ) ) ) ; s = org . krysalis . barcode4j . tools . VariableUtil . replace ( s , org . krysalis . barcode4j . tools . VariableUtil . FORMATTED_PAGE_NUMBER , page . getPageNumberString ( ) ) ; } return s ; }
org . junit . Assert . assertEquals ( expResult , result )
testIsDone_True ( ) { initializeExpectedJob ( 2 ) ; com . google . cloud . bigquery . BigQuery [ ] expectedOptions = new BigQuery . JobOption [ ] { BigQuery . JobOption . fields ( BigQuery . JobField . STATUS ) } ; com . google . cloud . bigquery . JobStatus status = createStrictMock ( com . google . cloud . bigquery . JobStatus . class ) ; expect ( status . getState ( ) ) . andReturn ( JobStatus . State . DONE ) ; expect ( bigquery . getOptions ( ) ) . andReturn ( mockOptions ) ; expect ( bigquery . getJob ( com . google . cloud . bigquery . JobTest . JOB_INFO . getJobId ( ) , expectedOptions ) ) . andReturn ( expectedJob . toBuilder ( ) . setStatus ( status ) . build ( ) ) ; replay ( status , bigquery ) ; initializeJob ( ) ; "<AssertPlaceHolder>" ; verify ( status ) ; } isDone ( ) { while ( ! ( job . isDone ( ) ) ) { java . lang . Thread . sleep ( 1000L ) ; }
org . junit . Assert . assertTrue ( job . isDone ( ) )
testLaunch ( ) { org . apache . hadoop . util . ExitUtil . disableSystemExit ( ) ; try { auxService = org . apache . hadoop . yarn . server . timelineservice . collector . PerNodeTimelineCollectorsAuxService . launchServer ( new java . lang . String [ 0 ] , createCollectorManager ( ) , conf ) ; } catch ( org . apache . hadoop . util . ExitUtil e ) { "<AssertPlaceHolder>" ; org . apache . hadoop . util . ExitUtil . resetFirstExitException ( ) ; org . junit . Assert . fail ( ) ; } } createCollectorManager ( ) { org . apache . hadoop . yarn . server . timelineservice . collector . NodeTimelineCollectorManager collectorManager = spy ( new org . apache . hadoop . yarn . server . timelineservice . collector . NodeTimelineCollectorManager ( ) ) ; doReturn ( new org . apache . hadoop . conf . Configuration ( ) ) . when ( collectorManager ) . getConfig ( ) ; org . apache . hadoop . yarn . server . api . CollectorNodemanagerProtocol nmCollectorService = mock ( org . apache . hadoop . yarn . server . api . CollectorNodemanagerProtocol . class ) ; org . apache . hadoop . yarn . server . api . protocolrecords . GetTimelineCollectorContextResponse response = org . apache . hadoop . yarn . server . api . protocolrecords . GetTimelineCollectorContextResponse . newInstance ( null , null , null , 0L ) ; try { when ( nmCollectorService . getTimelineCollectorContext ( any ( org . apache . hadoop . yarn . server . api . protocolrecords . GetTimelineCollectorContextRequest . class ) ) ) . thenReturn ( response ) ; } catch ( org . apache . hadoop . yarn . exceptions . YarnException | java . io . IOException e ) { org . junit . Assert . fail ( ) ; } doReturn ( nmCollectorService ) . when ( collectorManager ) . getNMCollectorService ( ) ; return collectorManager ; }
org . junit . Assert . assertEquals ( 0 , e . status )
shouldProperlyReadNestedImmutableObject ( ) { org . springframework . data . redis . repository . RedisRepositoryIntegrationTestBase . Immutable nested = new org . springframework . data . redis . repository . RedisRepositoryIntegrationTestBase . Immutable ( "heisenberg" , "White" , null ) ; org . springframework . data . redis . repository . RedisRepositoryIntegrationTestBase . Immutable object = new org . springframework . data . redis . repository . RedisRepositoryIntegrationTestBase . Immutable ( null , "Walter" , nested ) ; org . springframework . data . redis . repository . RedisRepositoryIntegrationTestBase . Immutable saved = immutableObjectRepo . save ( object ) ; org . springframework . data . redis . repository . RedisRepositoryIntegrationTestBase . Immutable loaded = immutableObjectRepo . findById ( saved . id ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { K key = keyFactory . instance ( ) ; V value = valueFactory . instance ( ) ; reactor . test . StepVerifier . create ( valueOperations . get ( key ) ) . verifyComplete ( ) ; reactor . test . StepVerifier . create ( valueOperations . set ( key , value ) ) . expectNext ( true ) . verifyComplete ( ) ; reactor . test . StepVerifier . create ( valueOperations . get ( key ) ) . expectNext ( value ) . verifyComplete ( ) ; }
org . junit . Assert . assertThat ( loaded . nested , is ( nested ) )
testIO ( ) { com . milaboratory . mixcr . util . RunMiXCR . RunMiXCRAnalysis params = new com . milaboratory . mixcr . util . RunMiXCR . RunMiXCRAnalysis ( com . milaboratory . mixcr . util . RunMiXCR . class . getResource ( "/sequences/test_R1.fastq" ) . getFile ( ) , com . milaboratory . mixcr . util . RunMiXCR . class . getResource ( "/sequences/test_R2.fastq" ) . getFile ( ) ) ; com . milaboratory . mixcr . util . RunMiXCR . AlignResult align = com . milaboratory . mixcr . util . RunMiXCR . align ( params ) ; com . milaboratory . mixcr . util . RunMiXCR . AssembleResult assemble = com . milaboratory . mixcr . util . RunMiXCR . assemble ( align ) ; java . io . File tempFile = com . milaboratory . util . TempFileManager . getTempFile ( ) ; try ( com . milaboratory . mixcr . util . ClnsWriter writer = new com . milaboratory . mixcr . util . ClnsWriter ( null , assemble . cloneSet , tempFile ) ) { writer . write ( ) ; } com . milaboratory . mixcr . util . CloneSet read = com . milaboratory . mixcr . util . CloneSetIO . read ( tempFile ) ; System . out . println ( ( "Clns<sp>file<sp>size:<sp>" + ( tempFile . length ( ) ) ) ) ; for ( int i = 0 ; i < ( read . size ( ) ) ; i ++ ) "<AssertPlaceHolder>" ; } get ( int ) { assert ( i == 0 ) || ( i == 1 ) ; if ( i == 0 ) return hit0 ; else return hit1 ; }
org . junit . Assert . assertEquals ( assemble . cloneSet . get ( i ) , read . get ( i ) )
testGetBooleanPropetry ( ) { javax . jms . JMSProducer producer = context . createProducer ( ) ; producer . setProperty ( BOOLEAN_PROPERTY_NAME , BOOLEAN_PROPERTY_VALUE ) ; "<AssertPlaceHolder>" ; } getBooleanProperty ( java . lang . String ) { try { return convertPropertyTo ( name , messageProperties . get ( name ) , org . apache . qpid . jms . Boolean . class ) ; } catch ( javax . jms . JMSException jmse ) { throw org . apache . qpid . jms . exceptions . JmsExceptionSupport . createRuntimeException ( jmse ) ; } }
org . junit . Assert . assertEquals ( BOOLEAN_PROPERTY_VALUE , producer . getBooleanProperty ( BOOLEAN_PROPERTY_NAME ) )
testFindTopKHeap4 ( ) { java . util . Collection < org . neo4j . graphalgo . impl . util . TopKConsumerTest . Item > topItems = org . neo4j . graphalgo . similarity . TopKConsumer . topK ( asList ( org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM1 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM3 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM2 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM4 ) , 4 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . Item :: compareTo ) ; "<AssertPlaceHolder>" ; for ( org . neo4j . graphalgo . impl . util . TopKConsumerTest . Item topItem : topItems ) { System . out . println ( topItem ) ; } }
org . junit . Assert . assertEquals ( asList ( org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM4 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM3 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM2 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM1 ) , topItems )
executeJarExit2 ( ) { int [ ] exitCode = new int [ ] { - 1 } ; org . spincast . plugins . processutils . JarExecutionHandlerDefault handler = new org . spincast . plugins . processutils . JarExecutionHandlerDefault ( ) { @ org . spincast . plugins . processutils . tests . Override public void onExit ( int exitVal ) { exitCode [ 0 ] = exitVal ; } } ; getSpincastProcessUtils ( ) . executeJar ( getMavenProjectJarFile ( ) . getAbsolutePath ( ) , com . google . common . collect . Lists . newArrayList ( "2" ) , handler ) ; try { org . spincast . testing . core . utils . SpincastTestingUtils . waitForTrue ( new org . spincast . testing . core . utils . TrueChecker ( ) { @ org . spincast . plugins . processutils . tests . Override public boolean check ( ) { return ( exitCode [ 0 ] ) > ( - 1 ) ; } } , 5000 ) ; "<AssertPlaceHolder>" ; } finally { handler . killJarProcess ( ) ; } } check ( ) { return ( getServer ( ) . getWebsocketEndpointManager ( "endpoint1" ) . getPeersIds ( ) . size ( ) ) == 1 ; }
org . junit . Assert . assertEquals ( 2 , exitCode [ 0 ] )
testFindAllAssociations ( ) { org . oscarehr . common . model . DxAssociation dx1 = new org . oscarehr . common . model . DxAssociation ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( dx1 ) ; dx1 . setDxCodeType ( "A" ) ; dx1 . setDxCode ( "D" ) ; org . oscarehr . common . model . DxAssociation dx2 = new org . oscarehr . common . model . DxAssociation ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( dx2 ) ; dx2 . setDxCodeType ( "A" ) ; dx2 . setDxCode ( "B" ) ; org . oscarehr . common . model . DxAssociation dx3 = new org . oscarehr . common . model . DxAssociation ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( dx3 ) ; dx3 . setDxCodeType ( "A" ) ; dx3 . setDxCode ( "C" ) ; org . oscarehr . common . model . DxAssociation dx4 = new org . oscarehr . common . model . DxAssociation ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( dx4 ) ; dx4 . setDxCodeType ( "A" ) ; dx4 . setDxCode ( "A" ) ; dao . persist ( dx1 ) ; dao . persist ( dx2 ) ; dao . persist ( dx3 ) ; dao . persist ( dx4 ) ; java . util . List < org . oscarehr . common . model . DxAssociation > result = dao . findAllAssociations ( ) ; java . util . List < org . oscarehr . common . model . DxAssociation > expectedResult = new java . util . ArrayList < org . oscarehr . common . model . DxAssociation > ( java . util . Arrays . asList ( dx4 , dx2 , dx3 , dx1 ) ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>not<sp>ordered<sp>by<sp>CodeType<sp>and<sp>Code." ) ; org . junit . Assert . fail ( "Items<sp>not<sp>sorted<sp>by<sp>CodeType<sp>and<sp>Code." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
org . junit . Assert . assertTrue ( true )
indicatesUnexistentKeyOnRetrieveError ( ) { final java . lang . String nonExistentKey = "nonExistentKey" ; try { partition . retrieve ( nonExistentKey ) ; org . junit . Assert . fail ( "Supposed<sp>to<sp>thrown<sp>an<sp>exception<sp>as<sp>key<sp>is<sp>not<sp>valid" ) ; } catch ( org . mule . runtime . api . store . ObjectDoesNotExistException e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return interceptedInput . getMessage ( ) ; }
org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( nonExistentKey ) )
testHasRegex4 ( ) { if ( ! ( resolver . isUseRegex ( ) ) ) { return ; } java . lang . String perm = "test.test1.test2" ; java . util . List < java . lang . String > perms = new java . util . ArrayList ( ) ; perms . add ( "test.test1.(test1|*)" ) ; "<AssertPlaceHolder>" ; } has ( java . util . List , java . lang . String ) { if ( useRegex ) { return net . alpenblock . bungeeperms . PermissionsResolver . hasRegex ( perms , perm ) ; } else { return net . alpenblock . bungeeperms . PermissionsResolver . hasNormal ( perms , perm ) ; } }
org . junit . Assert . assertTrue ( resolver . has ( perms , perm ) )
invalidColMapping ( ) { java . util . Properties properties = new java . util . Properties ( ) ; org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; properties . setProperty ( AccumuloSerDeParameters . COLUMN_MAPPINGS , "cf,cf:f2,cf:f3" ) ; properties . setProperty ( serdeConstants . LIST_COLUMNS , "field2,field3,field4" ) ; serde . initialize ( conf , properties ) ; org . apache . hadoop . hive . accumulo . AccumuloHiveRow row = new org . apache . hadoop . hive . accumulo . AccumuloHiveRow ( ) ; row . setRowId ( "r1" ) ; java . lang . Object obj = serde . deserialize ( row ) ; "<AssertPlaceHolder>" ; org . apache . hadoop . hive . accumulo . LazyAccumuloRow lazyRow = ( ( org . apache . hadoop . hive . accumulo . LazyAccumuloRow ) ( obj ) ) ; lazyRow . getField ( 0 ) ; } deserialize ( org . apache . hadoop . io . Writable ) { final org . apache . hadoop . hive . druid . serde . DruidWritable input = ( ( org . apache . hadoop . hive . druid . serde . DruidWritable ) ( writable ) ) ; final java . util . List < java . lang . Object > output = com . google . common . collect . Lists . newArrayListWithExpectedSize ( columns . length ) ; for ( int i = 0 ; i < ( columns . length ) ; i ++ ) { final java . lang . Object value = ( input . isCompacted ( ) ) ? input . getCompactedValue ( ) . get ( i ) : input . getValue ( ) . get ( columns [ i ] ) ; if ( value == null ) { output . add ( null ) ; } else { output . add ( org . apache . hadoop . hive . druid . serde . DruidSerDe . convertAsPrimitive ( value , types [ i ] ) ) ; } } return output ; }
org . junit . Assert . assertTrue ( ( obj instanceof org . apache . hadoop . hive . accumulo . LazyAccumuloRow ) )
canGetOriginalRequestDate ( ) { final java . util . Date requestDate = new java . util . Date ( ) ; entry = new org . apache . hc . client5 . http . cache . HttpCacheEntry ( requestDate , new java . util . Date ( ) , org . apache . hc . core5 . http . HttpStatus . SC_OK , new org . apache . hc . core5 . http . Header [ ] { } , mockResource ) ; "<AssertPlaceHolder>" ; } getRequestDate ( ) { return requestDate ; }
org . junit . Assert . assertSame ( requestDate , entry . getRequestDate ( ) )
setName_validName_builrPropertyHasThatName ( ) { java . lang . String name = "The<sp>Name" ; builder . setName ( name ) ; P nestedProperty = builder . build ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( name , nestedProperty . getName ( ) )
testEnrollTrackedEntityInstance ( ) { org . hisp . dhis . program . ProgramInstance programInstance = programInstanceService . enrollTrackedEntityInstance ( entityInstanceA , programB , enrollmentDate , incidenDate , organisationUnitA ) ; "<AssertPlaceHolder>" ; } getProgramInstance ( org . hisp . dhis . program . message . ProgramMessage ) { if ( ( programMessage . getProgramInstance ( ) ) != null ) { return manager . get ( org . hisp . dhis . program . ProgramInstance . class , programMessage . getProgramInstance ( ) . getUid ( ) ) ; } return null ; }
org . junit . Assert . assertNotNull ( programInstanceService . getProgramInstance ( programInstance . getId ( ) ) )
testSetterWorks ( ) { java . lang . String text = "bla<sp>bla<sp>bla" ; n . setNodeValue ( text ) ; "<AssertPlaceHolder>" ; } getNodeValue ( ) { return getData ( ) ; }
org . junit . Assert . assertEquals ( text , n . getNodeValue ( ) )
testCreateReasonForReferralSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . hitsp . ReasonForReferralSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . hitsp . builder . HITSPBuilderFactory . createReasonForReferralSectionBuilder ( ) ; org . openhealthtools . mdht . uml . cda . hitsp . ReasonForReferralSection section = sectionBuilder . buildSection ( ) ; "<AssertPlaceHolder>" ; Diagnostician . INSTANCE . validate ( section ) ; org . openhealthtools . mdht . uml . cda . util . CDAUtil . saveSnippet ( section , System . out ) ; } buildSection ( ) { org . openhealthtools . mdht . uml . cda . Section section = CDAFactory . eINSTANCE . createSection ( ) ; construct ( section ) ; return section ; }
org . junit . Assert . assertNotNull ( section )
testAppendObjectWithEmptyTitleLeavesBufferUnchanged ( ) { t1 . append ( objectWithEmptyTitle ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getActionMemento ( ) . getNameParmsId ( ) ) + "#" ) + ( getNumber ( ) ) ; }
org . junit . Assert . assertEquals ( name , t1 . toString ( ) )
testDepthFirstSearch ( ) { edu . illinois . cs . cogcomp . core . search . DepthFirstSearch < edu . illinois . cs . cogcomp . core . datastructures . Pair < java . lang . Integer , java . lang . Integer > > dfs = new edu . illinois . cs . cogcomp . core . search . DepthFirstSearch ( ) ; edu . illinois . cs . cogcomp . core . datastructures . Pair < java . lang . Integer , java . lang . Integer > result = dfs . search ( new edu . illinois . cs . cogcomp . core . datastructures . Pair ( 0 , 0 ) , stateManager ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( result , new edu . illinois . cs . cogcomp . core . datastructures . Pair ( 0 , 4 ) )
testCreate ( ) { org . oscarehr . common . model . Favorite entity = new org . oscarehr . common . model . Favorite ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
org . junit . Assert . assertNotNull ( entity . getId ( ) )
testConnectJNDI ( ) { javax . naming . InitialContext ctx = new javax . naming . InitialContext ( ) ; java . lang . String jndiName = "testJNDIName" ; when ( meta . getName ( ) ) . thenReturn ( "testName" ) ; when ( meta . getDatabaseName ( ) ) . thenReturn ( jndiName ) ; when ( meta . getDisplayName ( ) ) . thenReturn ( "testDisplayName" ) ; when ( meta . getAccessType ( ) ) . thenReturn ( DatabaseMeta . TYPE_ACCESS_JNDI ) ; when ( meta . environmentSubstitute ( jndiName ) ) . thenReturn ( jndiName ) ; javax . sql . DataSource ds = mock ( javax . sql . DataSource . class ) ; when ( ds . getConnection ( ) ) . thenReturn ( conn ) ; ctx . bind ( fullJndiName , ds ) ; org . pentaho . di . core . database . Database db = new org . pentaho . di . core . database . Database ( log , meta ) ; db . connect ( ) ; "<AssertPlaceHolder>" ; } getConnection ( ) { return connection ; }
org . junit . Assert . assertEquals ( conn , db . getConnection ( ) )
testGetAllRosterStatuses ( ) { "<AssertPlaceHolder>" ; } getAllRosterStatuses ( ) { java . util . List < java . lang . String > results = getHibernateTemplate ( ) . find ( "SELECT<sp>DISTINCT<sp>d.RosterStatus<sp>FROM<sp>Demographic<sp>d<sp>where<sp>d.RosterStatus<sp>is<sp>not<sp>null<sp>order<sp>by<sp>d.RosterStatus" ) ; return results ; }
org . junit . Assert . assertNotNull ( dao . getAllRosterStatuses ( ) )
testGetIssuedAt_1 ( ) { final long result = org . apache . shindig . gadgets . oauth2 . persistence . OAuth2TokenPersistenceTest . accessToken . getIssuedAt ( ) ; "<AssertPlaceHolder>" ; } getIssuedAt ( ) { return this . issuedAt ; }
org . junit . Assert . assertEquals ( 0L , result )
testCalendarTimezoneRespected ( ) { final java . util . Calendar cal = java . util . Calendar . getInstance ( timeZone ) ; final java . text . SimpleDateFormat sdf = new java . text . SimpleDateFormat ( org . apache . commons . lang3 . time . FastDatePrinterTimeZonesTest . PATTERN ) ; sdf . setTimeZone ( timeZone ) ; final java . lang . String expectedValue = sdf . format ( cal . getTime ( ) ) ; final java . lang . String actualValue = org . apache . commons . lang3 . time . FastDateFormat . getInstance ( org . apache . commons . lang3 . time . FastDatePrinterTimeZonesTest . PATTERN , this . timeZone ) . format ( cal ) ; "<AssertPlaceHolder>" ; } format ( long ) { return printer . format ( millis ) ; }
org . junit . Assert . assertEquals ( expectedValue , actualValue )
renderConfluencePage_asciiDocWithParagraph_returnsConfluencePageContentHavingCorrectParagraphMarkup ( ) { java . lang . String adoc = "some<sp>paragraph" ; org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePage asciidocConfluencePage = org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePage . newAsciidocConfluencePage ( asciidocPage ( org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePageTest . prependTitle ( adoc ) ) , org . sahli . asciidoc . confluence . publisher . converter . UTF_8 , org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePageTest . TEMPLATES_FOLDER , org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePageTest . dummyAssetsTargetPath ( ) ) ; java . lang . String expectedContent = "<p>some<sp>paragraph</p>" ; "<AssertPlaceHolder>" ; } content ( ) { return this . htmlContent ; }
org . junit . Assert . assertThat ( asciidocConfluencePage . content ( ) , org . hamcrest . Matchers . is ( expectedContent ) )
testSerializationSignatureValue ( ) { eu . europa . esig . dss . SignatureValue signatureValue = new eu . europa . esig . dss . SignatureValue ( ) ; signatureValue . setAlgorithm ( SignatureAlgorithm . DSA_SHA256 ) ; signatureValue . setValue ( new byte [ ] { 1 , 2 , 3 , 4 } ) ; byte [ ] serialized = eu . europa . esig . dss . SerializationTest . serialize ( signatureValue ) ; eu . europa . esig . dss . SignatureValue unserialized = eu . europa . esig . dss . SerializationTest . unserialize ( serialized , eu . europa . esig . dss . SignatureValue . class ) ; "<AssertPlaceHolder>" ; } unserialize ( byte [ ] , java . lang . Class ) { java . io . ByteArrayInputStream bais = new java . io . ByteArrayInputStream ( b ) ; java . io . ObjectInputStream ois = new java . io . ObjectInputStream ( bais ) ; java . lang . Object o = ois . readObject ( ) ; return clazz . cast ( o ) ; }
org . junit . Assert . assertEquals ( signatureValue , unserialized )
defaultGroupCardinalityWithZeroToOneAttributeCardinality ( ) { generateDrugsWithGroups ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:<sp>{<sp>[0..1]<sp>%s<sp>=<sp><%s<sp>}" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . HAS_ACTIVE_INGREDIENT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . SUBSTANCE ) ) ; final com . b2international . index . query . Expression expected = com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . and ( descendantsOf ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT ) , ids ( com . google . common . collect . ImmutableSet . of ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . ASPIRIN_TABLET , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . TRIPLEX_TABLET , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . ALGOFLEX_TABLET ) ) ) ; "<AssertPlaceHolder>" ; } of ( A , B , C ) { return new com . b2international . commons . Triple < A , B , C > ( a , b , c ) ; }
org . junit . Assert . assertEquals ( expected , actual )
withDescription_shouldSetDescription ( ) { org . eclipse . smarthome . core . thing . type . ChannelType channelType = stateBuilder . withDescription ( org . eclipse . smarthome . core . thing . type . ChannelTypeBuilderTest . DESCRIPTION ) . build ( ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { return description ; }
org . junit . Assert . assertThat ( channelType . getDescription ( ) , org . hamcrest . CoreMatchers . is ( org . eclipse . smarthome . core . thing . type . ChannelTypeBuilderTest . DESCRIPTION ) )
returnsTrueIfMemDemandLow ( ) { com . microsoft . dhalion . conf . PolicyConfig policyConf = new com . microsoft . dhalion . conf . PolicyConfig ( "policy" , java . util . Collections . emptyMap ( ) ) ; com . microsoft . dhalion . detectors . ExcessMemoryDetector detector = new com . microsoft . dhalion . detectors . ExcessMemoryDetector ( policyConf ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . String , double , double ) { if ( demand <= 0 ) { return false ; } if ( free <= 0 ) { return true ; } return ( demand / free ) >= ( thresholdRatio ) ; }
org . junit . Assert . assertTrue ( detector . evaluate ( "" , 10 , 5 ) )
shouldValidateNull ( ) { boolean valid = validator . isValid ( null , context ) ; "<AssertPlaceHolder>" ; } isValid ( java . lang . Object , javax . validation . ConstraintValidatorContext ) { java . lang . Class < ? extends java . lang . Object > type = toValidate . getClass ( ) ; if ( ! ( hasChoiceItens ( toValidate ) ) ) { return validateChoice ( toValidate , new net . vidageek . mirror . dsl . Mirror ( ) . on ( type ) . reflectAll ( ) . fields ( ) ) ; } return validateChoice ( toValidate , getChoiceItemAnnotatedFields ( type ) ) ; }
org . junit . Assert . assertTrue ( valid )
testIterator ( ) { org . apache . commons . math3 . linear . RealVector v = new org . apache . commons . math3 . linear . RealVectorTest . TestVectorImpl ( vec2 . clone ( ) ) ; org . apache . commons . math3 . linear . RealVector . Entry e ; int i = 0 ; for ( java . util . Iterator < org . apache . commons . math3 . linear . RealVector . Entry > it = v . iterator ( ) ; ( it . hasNext ( ) ) && ( ( e = it . next ( ) ) != null ) ; i ++ ) { "<AssertPlaceHolder>" ; } } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( vec2 [ i ] , e . getValue ( ) , 0 )