input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
lockShouldReturnTrueItTheTableIsNotLocked ( ) { initShouldNotCreateTheSchemaIfItAlreadyExists ( ) ; reset ( connection , metaData , statement , preparedStatement , resultSet ) ; expect ( connection . isClosed ( ) ) . andReturn ( false ) ; expect ( connection . prepareStatement ( ( ( "SELECT<sp>*<sp>FROM<sp>" + ( tableName ) ) + "<sp>FOR<sp>UPDATE" ) ) ) . andReturn ( preparedStatement ) ; preparedStatement . setQueryTimeout ( 10 ) ; expect ( preparedStatement . execute ( ) ) . andReturn ( true ) ; preparedStatement . close ( ) ; expect ( connection . isClosed ( ) ) . andReturn ( false ) ; expect ( connection . prepareStatement ( ( ( "UPDATE<sp>" + ( tableName ) ) + "<sp>SET<sp>MOMENT<sp>=<sp>1" ) ) ) . andReturn ( preparedStatement ) ; preparedStatement . setQueryTimeout ( 10 ) ; expect ( preparedStatement . executeUpdate ( ) ) . andReturn ( 1 ) ; preparedStatement . close ( ) ; replay ( connection , metaData , statement , preparedStatement , resultSet ) ; boolean lockAcquired = lock . lock ( ) ; verify ( connection , metaData , statement , preparedStatement , resultSet ) ; "<AssertPlaceHolder>" ; } lock ( ) { return acquireLock ( ) ; }
org . junit . Assert . assertTrue ( lockAcquired )
testToAlternateNull ( ) { com . sun . mail . util . logging . CompactFormatter cf = new com . sun . mail . util . logging . CompactFormatter ( ) ; "<AssertPlaceHolder>" ; } toAlternate ( java . lang . String ) { return s != null ? s . replaceAll ( "[\\x00-\\x1F\\x7F]+" , "" ) : null ; }
org . junit . Assert . assertNull ( cf . toAlternate ( ( ( java . lang . String ) ( null ) ) ) )
simpleAPI ( ) { java . lang . Long key = 1L ; java . lang . String value1 = "key" ; cache . put ( key , value1 ) ; java . lang . String value2 = cache . get ( key ) ; "<AssertPlaceHolder>" ; } get ( K ) { return writtenKeys . get ( key ) ; }
org . junit . Assert . assertEquals ( value1 , value2 )
testSortLongArray ( ) { for ( int r = 0 ; r < ( REPEAT_WITH_RANDOMNESS ) ; r ++ ) { for ( int size : ARRAY_SIZES_TO_TEST ) { long [ ] array = new long [ size ] ; for ( int i = 0 ; i < ( array . length ) ; i ++ ) { array [ i ] = rng . nextLong ( ) ; if ( rng . nextBoolean ( ) ) { array [ i ] *= - 1 ; } } for ( boolean stable : new boolean [ ] { false , true } ) { long [ ] actual = array . clone ( ) ; net . mintern . primitive . Primitive . sort ( actual , new net . mintern . primitive . PrimitiveTest . ReverseLongComparator ( ) , stable ) ; long [ ] expected = array . clone ( ) ; java . util . Arrays . sort ( expected ) ; reverse ( expected ) ; "<AssertPlaceHolder>" ; } } } } reverse ( int [ ] ) { for ( int i = 0 ; i < ( ( array . length ) / 2 ) ; i ++ ) { int temp = array [ i ] ; array [ i ] = array [ ( ( array . length ) - ( i + 1 ) ) ] ; array [ ( ( array . length ) - ( i + 1 ) ) ] = temp ; } }
org . junit . Assert . assertArrayEquals ( actual , expected )
testGetTextBeforeBufferStart ( ) { org . antlr . v4 . runtime . CharStream input = org . antlr . v4 . test . tool . TestUnbufferedCharStream . createStream ( "xyz" ) ; input . consume ( ) ; int m1 = input . mark ( ) ; "<AssertPlaceHolder>" ; input . getText ( new org . antlr . v4 . runtime . misc . Interval ( 0 , 1 ) ) ; } index ( ) { return source . index ( ) ; }
org . junit . Assert . assertEquals ( 1 , input . index ( ) )
testIterator1 ( ) { java . util . Iterator < java . lang . Integer > i = org . opencastproject . util . data . Collections . iterator ( new java . lang . Integer [ 0 ] ) ; "<AssertPlaceHolder>" ; i . next ( ) ; } hasNext ( ) { return ( index ) < ( nl . getLength ( ) ) ; }
org . junit . Assert . assertFalse ( i . hasNext ( ) )
synchronizeSteps ( ) { final java . lang . String stepName = "SharedStep" ; org . pentaho . di . trans . TransMeta transformarion1 = createTransMeta ( ) ; org . pentaho . di . trans . step . StepMeta step1 = org . pentaho . di . ui . spoon . SharedObjectSyncUtilTest . createStepMeta ( stepName , true ) ; transformarion1 . addStep ( step1 ) ; spoonDelegates . trans . addTransformation ( transformarion1 ) ; org . pentaho . di . trans . TransMeta transformarion2 = createTransMeta ( ) ; org . pentaho . di . trans . step . StepMeta step2 = org . pentaho . di . ui . spoon . SharedObjectSyncUtilTest . createStepMeta ( stepName , true ) ; transformarion2 . addStep ( step2 ) ; spoonDelegates . trans . addTransformation ( transformarion2 ) ; step2 . setDescription ( org . pentaho . di . ui . spoon . SharedObjectSyncUtilTest . AFTER_SYNC_VALUE ) ; sharedUtil . synchronizeSteps ( step2 ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { return description ; }
org . junit . Assert . assertThat ( step1 . getDescription ( ) , org . hamcrest . CoreMatchers . equalTo ( org . pentaho . di . ui . spoon . SharedObjectSyncUtilTest . AFTER_SYNC_VALUE ) )
testCreateTokenInfoName06 ( ) { org . terasoluna . gfw . web . token . transaction . TransactionTokenCheck methodAnnotation = mock ( org . terasoluna . gfw . web . token . transaction . TransactionTokenCheck . class ) ; org . terasoluna . gfw . web . token . transaction . TransactionTokenCheck classAnnotation = mock ( org . terasoluna . gfw . web . token . transaction . TransactionTokenCheck . class ) ; when ( methodAnnotation . value ( ) ) . thenReturn ( "test" ) ; when ( classAnnotation . value ( ) ) . thenReturn ( null ) ; "<AssertPlaceHolder>" ; } createTokenName ( org . terasoluna . gfw . web . token . transaction . TransactionTokenCheck , org . terasoluna . gfw . web . token . transaction . TransactionTokenCheck ) { java . lang . String methodTokenName = methodAnnotation . value ( ) ; java . lang . String classTokenName = ( classAnnotation == null ) ? "" : classAnnotation . value ( ) ; java . lang . StringBuilder tokenNameStringBuilder = new java . lang . StringBuilder ( ) ; if ( ( classTokenName != null ) && ( ! ( classTokenName . isEmpty ( ) ) ) ) { tokenNameStringBuilder . append ( classTokenName ) ; } if ( ( methodTokenName != null ) && ( ! ( methodTokenName . isEmpty ( ) ) ) ) { if ( ( tokenNameStringBuilder . length ( ) ) != 0 ) { tokenNameStringBuilder . append ( "/" ) ; } tokenNameStringBuilder . append ( methodTokenName ) ; } if ( ( tokenNameStringBuilder . length ( ) ) == 0 ) { tokenNameStringBuilder . append ( globalTokenName ) ; } return tokenNameStringBuilder . toString ( ) ; }
org . junit . Assert . assertNotNull ( store . createTokenName ( classAnnotation , methodAnnotation ) )
updateUnits ( ) { stackUnitIs ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . HEAPSIZE , "MB" ) ; setUpStack ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE , org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE_ENV ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . String > > properties = map ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE_ENV , map ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . HEAPSIZE , "1024" ) , "core-site" , map ( "fs.trash.interval" , "360" ) ) ; org . apache . ambari . server . topology . Configuration configuration = new org . apache . ambari . server . topology . Configuration ( properties , new java . util . HashMap ( ) ) ; org . apache . ambari . server . controller . internal . UnitUpdater . updateUnits ( configuration , stack ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . String > > expected = map ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE_ENV , map ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . HEAPSIZE , "1024m" ) , "core-site" , map ( "fs.trash.interval" , "360" ) ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return new java . util . Properties ( properties ) ; }
org . junit . Assert . assertEquals ( expected , configuration . getProperties ( ) )
testEmptyDocument ( ) { com . sjl . dsl4xml . DocumentReader < java . lang . Object > _r = newDocumentReader ( defs . emptyDocument ( ) ) ; java . lang . Object _result = _r . read ( newReader ( "{}" ) ) ; "<AssertPlaceHolder>" ; } read ( com . sjl . dsl4xml . gson . Reader ) { com . google . gson . stream . JsonReader _reader = null ; try { _reader = new com . google . gson . stream . JsonReader ( aReader ) ; return new com . sjl . dsl4xml . gson . GsonContext ( _reader ) . build ( builder ) ; } catch ( com . sjl . dsl4xml . ParsingException anExc ) { throw anExc ; } catch ( java . lang . Exception anExc ) { throw new com . sjl . dsl4xml . ParsingException ( anExc ) ; } finally { if ( _reader != null ) { try { _reader . close ( ) ; } catch ( com . sjl . dsl4xml . gson . IOException anExc ) { throw new com . sjl . dsl4xml . ParsingException ( "Exception<sp>while<sp>closing<sp>the<sp>reader" , anExc ) ; } } } }
org . junit . Assert . assertNotNull ( _result )
testMigratePhoneNumberSuccess ( ) { com . sun . jersey . api . client . Client jerseyClient = com . sun . jersey . api . client . Client . create ( ) ; jerseyClient . addFilter ( new com . sun . jersey . api . client . filter . HTTPBasicAuthFilter ( adminUsername , adminAuthToken ) ) ; java . lang . String provisioningURL = ( ( deploymentUrl ) + ( migrateURL ) ) + "IncomingPhoneNumbers/migrate" ; com . sun . jersey . api . client . WebResource webResource = jerseyClient . resource ( provisioningURL ) ; javax . ws . rs . core . MultivaluedMap < java . lang . String , java . lang . String > formData = new com . sun . jersey . core . util . MultivaluedMapImpl ( ) ; formData = new com . sun . jersey . core . util . MultivaluedMapImpl ( ) ; formData . add ( "OrganizationSid" , "ORafbe225ad37541eba518a74248f0ac4c" ) ; com . sun . jersey . api . client . ClientResponse clientResponse = webResource . type ( MediaType . APPLICATION_FORM_URLENCODED_TYPE ) . accept ( "application/json" ) . post ( com . sun . jersey . api . client . ClientResponse . class , formData ) ; org . restcomm . connect . testsuite . provisioning . number . vi . IncomingPhoneNumbersEndpointTest . logger . info ( clientResponse ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; }
org . junit . Assert . assertEquals ( 200 , clientResponse . getStatus ( ) )
testSequenceFlowExecutionSetPriorityEmpty ( ) { org . kie . workbench . common . stunner . bpmn . definition . property . connectors . SequenceFlowExecutionSet sequenceFlowExecutionSet = new org . kie . workbench . common . stunner . bpmn . definition . property . connectors . SequenceFlowExecutionSet ( ) ; sequenceFlowExecutionSet . setPriority ( new org . kie . workbench . common . stunner . bpmn . definition . property . connectors . Priority ( "" ) ) ; java . util . Set < javax . validation . ConstraintViolation < org . kie . workbench . common . stunner . bpmn . definition . property . connectors . SequenceFlowExecutionSet > > violations = this . validator . validate ( sequenceFlowExecutionSet ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return violations . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( violations . isEmpty ( ) )
testGetParamteresWithoutSecurity ( ) { unit . setSecurity ( false ) ; java . lang . Long personId = 1L ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; person . setId ( personId ) ; java . lang . Long contactTypeId = 2L ; org . lnu . is . domain . contact . type . ContactType contactType = new org . lnu . is . domain . contact . type . ContactType ( ) ; contactType . setId ( contactTypeId ) ; java . lang . String value = "value" ; org . lnu . is . domain . person . contact . PersonContact entity = new org . lnu . is . domain . person . contact . PersonContact ( ) ; entity . setPerson ( person ) ; entity . setContactType ( contactType ) ; entity . setValue ( value ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; expected . put ( "person" , person ) ; expected . put ( "contactType" , contactType ) ; expected . put ( "value" , value ) ; when ( personDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( person ) ; when ( contactTypeDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( contactType ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; verify ( personDao ) . getEntityById ( personId ) ; verify ( contactTypeDao ) . getEntityById ( contactTypeId ) ; verify ( sessionService , times ( 0 ) ) . getGroups ( ) ; "<AssertPlaceHolder>" ; } getGroups ( ) { return groups ; }
org . junit . Assert . assertEquals ( expected , actual )
testConvertReplyOneDoc ( ) { final java . util . List < com . allanbank . mongodb . bson . Document > docs = java . util . Arrays . asList ( com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . build ( ) ) ; final com . allanbank . mongodb . client . message . Reply reply = new com . allanbank . mongodb . client . message . Reply ( 0 , 0 , 0 , docs , false , false , false , true ) ; final com . allanbank . mongodb . Callback < com . allanbank . mongodb . bson . Document > mockCallback = createMock ( com . allanbank . mongodb . Callback . class ) ; replay ( mockCallback ) ; final com . allanbank . mongodb . client . callback . SingleDocumentReplyCallback callback = new com . allanbank . mongodb . client . callback . SingleDocumentReplyCallback ( mockCallback ) ; "<AssertPlaceHolder>" ; verify ( mockCallback ) ; } get ( long ) { if ( ! ( com . allanbank . mongodb . client . FutureCallback . Sync . tryAcquireSharedNanos ( com . allanbank . mongodb . client . FutureCallback . Sync . UNUSED , nanos ) ) ) { throw new java . util . concurrent . TimeoutException ( "Timeout<sp>waiting<sp>for<sp>task." ) ; } return getValue ( ) ; }
org . junit . Assert . assertSame ( docs . get ( 0 ) , callback . convert ( reply ) )
givenResourceExists_whenResourceIsRetrieved_thenResourceIsRetrievedCorrectly ( ) { final com . baeldung . domain . Foo existingResource = persistNewEntity ( ) ; final com . baeldung . domain . Foo retrievedResource = getApi ( ) . findOne ( existingResource . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( existingResource , retrievedResource )
testVarAndArgs_Cfscript_OK2 ( ) { final java . lang . String cfcSrc = "component<sp>{<sp>\r\n" + ( ( "public<sp>void<sp>function<sp>foo(any<sp>arg1=\"123\")<sp>{<sp>\r\n" + "}<sp>\r\n" ) + "}" ) ; com . cflint . api . CFLintResult lintresult = cfBugs . scan ( cfcSrc , "test" ) ; final java . util . Map < java . lang . String , java . util . List < com . cflint . BugInfo > > result = lintresult . getIssues ( ) ; "<AssertPlaceHolder>" ; } size ( ) { int size = 0 ; for ( final java . util . List < ? > list : bugs . values ( ) ) { size += list . size ( ) ; } return size ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
defaultExecution_noRetryRule_testcaseRunOnce ( ) { ( count ) ++ ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 2 , count )
shouldRaiseConstraintViolationCausePriceLow ( ) { org . agoncal . book . javaee7 . chapter03 . ex02 . Book02 book = new org . agoncal . book . javaee7 . chapter03 . ex02 . Book02 ( "H2G2" , 0.5F , "Best<sp>IT<sp>Scifi<sp>Book" , "1234-4566-9876" , 247 , false ) ; java . util . Set < javax . validation . ConstraintViolation < org . agoncal . book . javaee7 . chapter03 . ex02 . Book02 > > violations = org . agoncal . book . javaee7 . chapter03 . ex02 . Book02Test . validator . validate ( book ) ; displayContraintViolations ( violations ) ; "<AssertPlaceHolder>" ; } displayContraintViolations ( java . util . Set ) { for ( org . agoncal . book . javaee7 . chapter03 . ex12 . ConstraintViolation constraintViolation : constraintViolations ) { System . out . println ( ( ( ( ( ( ( ( "###<sp>" + ( constraintViolation . getRootBeanClass ( ) . getSimpleName ( ) ) ) + "." ) + ( constraintViolation . getPropertyPath ( ) ) ) + "<sp>-<sp>Invalid<sp>Value<sp>=<sp>" ) + ( constraintViolation . getInvalidValue ( ) ) ) + "<sp>-<sp>Error<sp>Msg<sp>=<sp>" ) + ( constraintViolation . getMessage ( ) ) ) ) ; } }
org . junit . Assert . assertEquals ( 1 , violations . size ( ) )
testPutForceCheckpointCommitReplay ( ) { java . util . Map < java . lang . String , java . lang . String > overrides = com . google . common . collect . Maps . newHashMap ( ) ; overrides . put ( FileChannelConfiguration . CAPACITY , java . lang . String . valueOf ( 2 ) ) ; overrides . put ( FileChannelConfiguration . TRANSACTION_CAPACITY , java . lang . String . valueOf ( 2 ) ) ; overrides . put ( FileChannelConfiguration . CHECKPOINT_INTERVAL , "10000" ) ; org . apache . flume . channel . file . FileChannel channel = createFileChannel ( overrides ) ; channel . start ( ) ; org . apache . flume . Transaction tx = channel . getTransaction ( ) ; java . util . Set < java . lang . String > in = org . apache . flume . channel . file . TestUtils . putWithoutCommit ( channel , tx , "putWithoutCommit" , 1 ) ; org . apache . flume . channel . file . TestUtils . forceCheckpoint ( channel ) ; tx . commit ( ) ; tx . close ( ) ; channel . stop ( ) ; channel = createFileChannel ( overrides ) ; channel . start ( ) ; "<AssertPlaceHolder>" ; java . util . Set < java . lang . String > out = org . apache . flume . channel . file . TestUtils . takeEvents ( channel , 1 ) ; org . apache . flume . channel . file . TestUtils . compareInputAndOut ( in , out ) ; channel . stop ( ) ; } isOpen ( ) { return open ; }
org . junit . Assert . assertTrue ( channel . isOpen ( ) )
testGetJointAdmission ( ) { boolean isArchived = true ; int clientId1 = 101 ; int clientId2 = 202 ; org . oscarehr . common . model . JointAdmission jointAdmission1 = new org . oscarehr . common . model . JointAdmission ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( jointAdmission1 ) ; jointAdmission1 . setArchived ( ( ! isArchived ) ) ; jointAdmission1 . setClientId ( clientId2 ) ; dao . persist ( jointAdmission1 ) ; org . oscarehr . common . model . JointAdmission jointAdmission2 = new org . oscarehr . common . model . JointAdmission ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( jointAdmission2 ) ; jointAdmission2 . setArchived ( ( ! isArchived ) ) ; jointAdmission2 . setClientId ( clientId1 ) ; dao . persist ( jointAdmission2 ) ; org . oscarehr . common . model . JointAdmission jointAdmission3 = new org . oscarehr . common . model . JointAdmission ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( jointAdmission3 ) ; jointAdmission3 . setArchived ( isArchived ) ; jointAdmission3 . setClientId ( clientId1 ) ; dao . persist ( jointAdmission3 ) ; org . oscarehr . common . model . JointAdmission expectedResult = jointAdmission2 ; org . oscarehr . common . model . JointAdmission result = dao . getJointAdmission ( clientId1 ) ; "<AssertPlaceHolder>" ; } getJointAdmission ( java . lang . Integer ) { javax . persistence . Query query = entityManager . createQuery ( "SELECT<sp>x<sp>FROM<sp>JointAdmission<sp>x<sp>WHERE<sp>x.archived=0<sp>and<sp>x.clientId=?" ) ; query . setParameter ( 1 , clientId ) ; @ org . oscarehr . common . dao . SuppressWarnings ( "unchecked" ) java . util . List < org . oscarehr . common . model . JointAdmission > results = query . getResultList ( ) ; java . util . ListIterator < org . oscarehr . common . model . JointAdmission > li = results . listIterator ( ) ; if ( li . hasNext ( ) ) { return li . next ( ) ; } else { return null ; } }
org . junit . Assert . assertEquals ( expectedResult , result )
testSpaceToBatch ( ) { org . nd4j . OpValidationSuite . ignoreFailing ( ) ; org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 7331 ) ; int miniBatch = 4 ; int [ ] inputShape = new int [ ] { 1 , 2 , 2 , 1 } ; int M = 2 ; int [ ] blockShape = new int [ ] { M , 1 } ; int [ ] paddingShape = new int [ ] { M , 2 } ; org . nd4j . linalg . api . ndarray . INDArray input = org . nd4j . linalg . factory . Nd4j . randn ( inputShape ) . castTo ( DataType . DOUBLE ) ; org . nd4j . linalg . api . ndarray . INDArray blocks = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 2 , 2 } , blockShape ) . castTo ( DataType . INT ) ; org . nd4j . linalg . api . ndarray . INDArray padding = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 0 , 0 , 0 , 0 } , paddingShape ) . castTo ( DataType . INT ) ; org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . samediff . SDVariable sdInput = sd . var ( "in" , inputShape ) ; org . nd4j . linalg . api . ndarray . INDArray expOut = org . nd4j . linalg . factory . Nd4j . create ( DataType . DOUBLE , miniBatch , 1 , 1 , 1 ) ; org . nd4j . linalg . api . ops . DynamicCustomOp op = org . nd4j . linalg . api . ops . DynamicCustomOp . builder ( "space_to_batch" ) . addInputs ( input , blocks , padding ) . addOutputs ( expOut ) . build ( ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( op ) ; sd . associateArrayWithVariable ( input , sdInput ) ; org . nd4j . autodiff . samediff . SDVariable t = sd . cnn ( ) . spaceToBatch ( "stb" , sdInput , new int [ ] { 2 , 2 } , new int [ ] [ ] { new int [ ] { 0 , 0 } , new int [ ] { 0 , 0 } } ) ; org . nd4j . autodiff . samediff . SDVariable loss = sd . mean ( "loss" , t ) ; java . lang . String err = org . nd4j . autodiff . validation . OpValidation . validate ( new org . nd4j . autodiff . validation . TestCase ( sd ) . expectedOutput ( "stb" , expOut ) . gradientCheck ( true ) ) ; "<AssertPlaceHolder>" ; } gradientCheck ( boolean ) { this . setGradientCheck ( isGradientCheck ) ; return this ; }
org . junit . Assert . assertNull ( err , err )
testShouldBeAbleToPassABooleanAsArgument ( ) { driver . get ( pages . javascriptPage ) ; boolean value = ( ( java . lang . Boolean ) ( executeScript ( "return<sp>arguments[0]<sp>==<sp>true;" , true ) ) ) ; "<AssertPlaceHolder>" ; } executeScript ( java . lang . String , java . lang . Object [ ] ) { return null ; }
org . junit . Assert . assertTrue ( value )
testUnitaryOnSphere ( ) { for ( int phi = - 90 ; phi <= 90 ; phi += 15 ) { transform = org . geotoolkit . referencing . operation . projection . LambertAzimuthalEqualAreaTest . create ( false , phi ) ; tolerance = org . geotoolkit . referencing . operation . projection . LambertAzimuthalEqualAreaTest . TOLERANCE ; validate ( ) ; "<AssertPlaceHolder>" ; final double delta = ( toRadians ( ( 100.0 / 60 ) ) ) / 1852 ; derivativeDeltas = new double [ ] { delta , delta } ; verifyInDomain ( CoordinateDomain . GEOGRAPHIC_RADIANS , 862247543 ) ; } } isSpherical ( ) { return org . geotoolkit . referencing . operation . projection . ProjectionTestBase . isSpherical ( transform ) ; }
org . junit . Assert . assertTrue ( isSpherical ( ) )
set_boolean_enablesChaining ( ) { array . add ( false ) ; "<AssertPlaceHolder>" ; } set ( java . lang . String , com . restfb . json . JsonValue ) { if ( name == null ) { throw new java . lang . NullPointerException ( com . restfb . json . JsonObject . NAME_IS_NULL ) ; } if ( value == null ) { throw new java . lang . NullPointerException ( com . restfb . json . JsonObject . VALUE_IS_NULL ) ; } int index = indexOf ( name ) ; if ( index != ( - 1 ) ) { values . set ( index , value ) ; } else { table . add ( name , names . size ( ) ) ; names . add ( name ) ; values . add ( value ) ; } return this ; }
org . junit . Assert . assertSame ( array , array . set ( 0 , true ) )
testRouterDeployPathLookUp ( ) { java . lang . String path = "/v3/namespaces/default//apps/" ; io . netty . handler . codec . http . HttpRequest httpRequest = new io . netty . handler . codec . http . DefaultHttpRequest ( io . cdap . cdap . gateway . router . RouterPathLookupTest . VERSION , new io . netty . handler . codec . http . HttpMethod ( "PUT" ) , path ) ; io . cdap . cdap . gateway . router . RouteDestination result = io . cdap . cdap . gateway . router . RouterPathLookupTest . pathLookup . getRoutingService ( path , httpRequest ) ; "<AssertPlaceHolder>" ; } getRoutingService ( java . lang . String , io . netty . handler . codec . http . HttpRequest ) { try { java . lang . String method = httpRequest . method ( ) . name ( ) ; io . cdap . cdap . gateway . router . RouterPathLookup . AllowedMethod requestMethod = io . cdap . cdap . gateway . router . RouterPathLookup . AllowedMethod . valueOf ( method ) ; java . lang . String [ ] uriParts = org . apache . commons . lang . StringUtils . split ( requestPath , '/' ) ; if ( uriParts [ 0 ] . equals ( Constants . Gateway . API_VERSION_3_TOKEN ) ) { return getV3RoutingService ( uriParts , requestMethod ) ; } } catch ( java . lang . Exception e ) { } return io . cdap . cdap . gateway . router . RouterPathLookup . APP_FABRIC_HTTP ; }
org . junit . Assert . assertEquals ( RouterPathLookup . APP_FABRIC_HTTP , result )
testQueueIsEmptyAfterCreation ( ) { queue = new org . apache . flume . channel . file . FlumeEventQueue ( backingStore , backingStoreSupplier . getInflightTakes ( ) , backingStoreSupplier . getInflightPuts ( ) , backingStoreSupplier . getQueueSetDir ( ) ) ; "<AssertPlaceHolder>" ; } removeHead ( long ) { if ( ( backingStore . getSize ( ) ) == 0 ) { return null ; } long value = remove ( 0 , transactionID ) ; com . google . common . base . Preconditions . checkState ( ( value != ( org . apache . flume . channel . file . FlumeEventQueue . EMPTY ) ) , ( "Empty<sp>value<sp>" + ( channelNameDescriptor ) ) ) ; org . apache . flume . channel . file . FlumeEventPointer ptr = org . apache . flume . channel . file . FlumeEventPointer . fromLong ( value ) ; backingStore . decrementFileID ( ptr . getFileID ( ) ) ; return ptr ; }
org . junit . Assert . assertNull ( queue . removeHead ( 0L ) )
testOwnerInfoEntitlementsConsumedByFamilySeperatesVirtAndPhysical ( ) { owner . addEntitlementPool ( pool1 ) ; org . candlepin . model . Product product = org . candlepin . test . TestUtil . createProduct ( ) ; product . setAttribute ( Pool . Attributes . VIRT_ONLY , "true" ) ; createProduct ( product , owner ) ; pool1 . setProduct ( product ) ; org . candlepin . model . ConsumerType type = consumerTypeCurator . getByLabel ( "system" ) ; org . candlepin . model . Consumer consumer = new org . candlepin . model . Consumer ( "test-consumer" , "test-user" , owner , type ) ; consumerCurator . create ( consumer ) ; org . candlepin . model . EntitlementCertificate cert = createEntitlementCertificate ( "fake" , "fake" ) ; org . candlepin . model . Entitlement entitlement = createEntitlement ( owner , consumer , pool1 , cert ) ; entitlement . setQuantity ( 1 ) ; entitlementCurator . create ( entitlement ) ; pool1 . getEntitlements ( ) . add ( entitlement ) ; org . candlepin . model . OwnerInfo info = ownerInfoCurator . getByOwner ( owner ) ; java . util . Map < java . lang . String , org . candlepin . model . OwnerInfo . ConsumptionTypeCounts > expected = new java . util . HashMap < java . lang . String , org . candlepin . model . OwnerInfo . ConsumptionTypeCounts > ( ) { { put ( "none" , new org . candlepin . model . OwnerInfo . ConsumptionTypeCounts ( 0 , 1 ) ) ; } } ; "<AssertPlaceHolder>" ; } getEntitlementsConsumedByFamily ( ) { return entitlementsConsumedByFamily ; }
org . junit . Assert . assertEquals ( expected , info . getEntitlementsConsumedByFamily ( ) )
test ( ) { java . util . Vector xaRecoveryNodes = new java . util . Vector ( ) ; xaRecoveryNodes . add ( "2" ) ; System . err . println ( ( "Bogus<sp>XA<sp>node<sp>name:<sp>" + "2" ) ) ; com . arjuna . ats . jta . xa . XidImple xid = new com . arjuna . ats . jta . xa . XidImple ( new com . arjuna . ats . arjuna . common . Uid ( ) ) ; java . lang . String nodeName = com . arjuna . ats . internal . jta . utils . XAUtils . getXANodeName ( xid ) ; System . err . println ( ( "XA<sp>node<sp>name:<sp>" + nodeName ) ) ; System . err . println ( ( "Xid<sp>to<sp>recover:<sp>" + xid ) ) ; "<AssertPlaceHolder>" ; } contains ( javax . transaction . xa . Xid ) { com . arjuna . ats . jta . xa . XidImple xidImple = new com . arjuna . ats . jta . xa . XidImple ( xid ) ; return _whenFirstSeen . containsKey ( xidImple ) ; }
org . junit . Assert . assertFalse ( xaRecoveryNodes . contains ( nodeName ) )
testDelete ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>ID<sp>;\n" ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "a" 0 ) + "a" 1 ) ; java . lang . String treeGrammar = "tree<sp>grammar<sp>TP;\n" + ( ( "options<sp>{output=AST;<sp>ASTLabelType=CommonTree;<sp>tokenVocab=T;}\n" + "a" 5 ) + "<sp>;\n" ) ; java . lang . String found = execTreeParser ( "a" 7 , grammar , "TParser" , "a" 6 , treeGrammar , "TP" , "a" 2 , "a" , "a" , "a" 3 ) ; "<AssertPlaceHolder>" ; } execTreeParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { return execTreeParser ( parserGrammarFileName , parserGrammarStr , parserName , treeParserGrammarFileName , treeParserGrammarStr , treeParserName , lexerName , parserStartRuleName , treeParserStartRuleName , input , false ) ; }
org . junit . Assert . assertEquals ( "a" 4 , found )
testIsSerializable ( ) { shell . setText ( "text" ) ; org . eclipse . swt . widgets . Shell deserializedShell = serializeAndDeserialize ( shell ) ; "<AssertPlaceHolder>" ; } getText ( ) { checkWidget ( ) ; return getText ( 0 ) ; }
org . junit . Assert . assertEquals ( shell . getText ( ) , deserializedShell . getText ( ) )
testExceptionRecovery ( ) { when ( connectionFactory . createTopicConnection ( ) ) . thenReturn ( connection ) . thenThrow ( new javax . jms . JMSException ( "some<sp>problem<sp>4" ) ) . thenReturn ( connection ) ; when ( connection . createTopicSession ( false , Session . AUTO_ACKNOWLEDGE ) ) . thenReturn ( session ) . thenThrow ( new javax . jms . JMSException ( "some<sp>problem<sp>5" ) ) . thenReturn ( session ) ; when ( session . createDurableSubscriber ( any ( javax . jms . Topic . class ) , anyString ( ) ) ) . thenReturn ( subscriber ) . thenThrow ( new javax . jms . JMSException ( "some<sp>problem<sp>6" ) ) . thenReturn ( subscriber ) ; when ( subscriber . receive ( ) ) . thenThrow ( new javax . jms . JMSException ( "some<sp>problem<sp>0" ) ) . thenReturn ( message ) . thenThrow ( new javax . jms . JMSException ( "some<sp>problem<sp>1" ) ) . thenReturn ( message ) . thenThrow ( new javax . jms . JMSException ( "some<sp>problem<sp>2" ) ) . thenThrow ( new javax . jms . JMSException ( "some<sp>problem<sp>3" ) ) . thenReturn ( message ) ; provider . setJMSErrorBackOffTime ( 1 ) ; final java . util . concurrent . atomic . AtomicBoolean failed = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; provider . setDataConsumer ( new proj . zoie . api . DataConsumer < java . lang . Object > ( ) { private volatile java . lang . String version = null ; private long v = 1 ; @ proj . zoie . dataprovider . jms . Override public void consume ( java . util . Collection < proj . zoie . api . DataConsumer . DataEvent < java . lang . Object > > data ) throws proj . zoie . api . ZoieException { for ( proj . zoie . api . DataConsumer . DataEvent < java . lang . Object > e : data ) { if ( ( java . lang . Long . valueOf ( e . getVersion ( ) ) ) != ( v ) ) { failed . set ( true ) ; } ( v ) ++ ; version = e . getVersion ( ) ; } } @ proj . zoie . dataprovider . jms . Override public java . lang . String getVersion ( ) { return version ; } @ proj . zoie . dataprovider . jms . Override public java . util . Comparator < java . lang . String > getVersionComparator ( ) { return proj . zoie . impl . indexing . ZoieConfig . DEFAULT_VERSION_COMPARATOR ; } } ) ; provider . start ( ) ; java . lang . String versionToSync = "100" ; provider . syncWithVersion ( 5000 , versionToSync ) ; "<AssertPlaceHolder>" ; provider . stop ( ) ; } get ( ) { return ( ( E ) ( proj . zoie . api . impl . ZoieContext . getContext ( ) . getReaderContext ( _reader ) . get ( _key ) ) ) ; }
org . junit . Assert . assertFalse ( failed . get ( ) )
getOrganizationalUnits ( ) { int limit = 1 ; int offset = 0 ; org . oscm . paginator . Pagination pagination = new org . oscm . paginator . Pagination ( offset , limit ) ; java . util . List < org . oscm . domobjects . UserGroup > users = spy ( new java . util . ArrayList < org . oscm . domobjects . UserGroup > ( ) ) ; users . add ( new org . oscm . domobjects . UserGroup ( ) ) ; users . add ( new org . oscm . domobjects . UserGroup ( ) ) ; doReturn ( users . subList ( 0 , 1 ) ) . when ( userGroupService . getUserGroupDao ( ) ) . getUserGroupsForOrganization ( pagination ) ; java . util . List < org . oscm . domobjects . UserGroup > result = userGroupService . getOrganizationalUnits ( pagination ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , result . size ( ) )
testDefaultVolledigeVerstrekkingsbeperking ( ) { final nl . bzk . brp . model . algemeen . stamgegeven . kern . Partij partij = nl . bzk . brp . business . regels . impl . levering . definitieregels . BRLV0035Test . VERSTREKKINGSBEPERKING_MOGELIJK_JA_PARTIJ ; final boolean verstrekkingsbeperkingAanwezig = brlv0035 . isErEenGeldigeVerstrekkingsBeperking ( new nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView ( persoon ) , partij ) ; "<AssertPlaceHolder>" ; } isErEenGeldigeVerstrekkingsBeperking ( nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView , nl . bzk . brp . model . algemeen . stamgegeven . kern . Partij ) { if ( ( verstrekkingsBeperkingMogelijk ( partij ) ) && ( ( heeftVolledigeVerstrekkingsbeperking ( persoonView ) ) || ( heeftVerstrekkingsbeperkingOpPartij ( persoonView , partij ) ) ) ) { nl . bzk . brp . business . regels . impl . levering . definitieregels . BRLV0035 . LOGGER . info ( FunctioneleMelding . LEVERING_BEDRIJFSREGEL_BRLV0035 , "Persoon<sp>met<sp>id<sp>{}<sp>heeft<sp>een<sp>verstrekkingsbeperking<sp>voor<sp>partij<sp>met<sp>code<sp>{}." , persoonView . getID ( ) , partij . getCode ( ) ) ; return true ; } else if ( ( ! ( verstrekkingsBeperkingMogelijk ( partij ) ) ) && ( heeftVerstrekkingsbeperkingOpPartij ( persoonView , partij ) ) ) { nl . bzk . brp . business . regels . impl . levering . definitieregels . BRLV0035 . LOGGER . info ( ( "De<sp>persoon<sp>met<sp>id<sp>{}<sp>heeft<sp>een<sp>verstrekkingsbeperking<sp>op<sp>partij<sp>met<sp>code<sp>{},<sp>terwijl<sp>" + "op<sp>deze<sp>partij<sp>geen<sp>verstrekkingsbeperking<sp>mogelijk<sp>is." ) , persoonView . getID ( ) , partij . getCode ( ) ) ; } return false ; }
org . junit . Assert . assertFalse ( verstrekkingsbeperkingAanwezig )
testImportStatement ( ) { script = "component<sp>{<sp>import<sp>projectshen.core.*;<sp>}" ; scriptStatement = null ; scriptStatement = parseScript ( script ) ; if ( ( fCfmlParser . getMessages ( ) . size ( ) ) > 0 ) { org . junit . Assert . fail ( ( "whoops!<sp>" + ( fCfmlParser . getMessages ( ) ) ) ) ; } "<AssertPlaceHolder>" ; } getMessages ( ) { return messages ; }
org . junit . Assert . assertNotNull ( scriptStatement )
testSettings ( ) { final boolean [ ] success = new boolean [ 1 ] ; boolean oldValue = nom . tam . fits . FitsFactory . getUseHierarch ( ) ; try { java . lang . Thread thread = new java . lang . Thread ( new java . lang . Runnable ( ) { @ nom . tam . fits . test . Override public void run ( ) { nom . tam . fits . FitsFactory . setUseHierarch ( true ) ; nom . tam . fits . FitsFactory . useThreadLocalSettings ( true ) ; nom . tam . fits . FitsFactory . setUseHierarch ( false ) ; nom . tam . fits . FitsFactory . useThreadLocalSettings ( false ) ; success [ 0 ] = nom . tam . fits . FitsFactory . getUseHierarch ( ) ; } } ) ; thread . start ( ) ; thread . join ( ) ; } finally { nom . tam . fits . FitsFactory . setUseHierarch ( oldValue ) ; } "<AssertPlaceHolder>" ; } setUseHierarch ( boolean ) { nom . tam . fits . FitsFactory . current ( ) . useHierarch = useHierarch ; }
org . junit . Assert . assertTrue ( success [ 0 ] )
syncInvokeIOExceptionTest ( ) { com . aliyuncs . http . clients . HttpClientConfig config = mock ( com . aliyuncs . http . clients . HttpClientConfig . class ) ; when ( config . isIgnoreSSLCerts ( ) ) . thenReturn ( true ) ; com . aliyuncs . http . clients . CompatibleUrlConnClient client0 = new com . aliyuncs . http . clients . CompatibleUrlConnClient ( config ) ; com . aliyuncs . http . clients . CompatibleUrlConnClient client = org . powermock . api . mockito . PowerMockito . spy ( client0 ) ; com . aliyuncs . http . clients . HttpRequest request = mock ( com . aliyuncs . http . clients . HttpRequest . class ) ; java . net . HttpURLConnection connection = mock ( java . net . HttpURLConnection . class ) ; doThrow ( new java . io . IOException ( ) ) . when ( connection ) . connect ( ) ; org . powermock . api . mockito . PowerMockito . doReturn ( connection ) . when ( client , "buildHttpConnection" , request ) ; java . net . URL url = org . powermock . api . mockito . PowerMockito . mock ( java . net . URL . class ) ; when ( url . toString ( ) ) . thenReturn ( "http://www.aliyun.com" ) ; when ( connection . getURL ( ) ) . thenReturn ( url ) ; java . io . InputStream errorStream = mock ( java . io . InputStream . class ) ; when ( connection . getErrorStream ( ) ) . thenReturn ( errorStream ) ; org . powermock . api . mockito . PowerMockito . doNothing ( ) . when ( client , "parseHttpConn" , any ( com . aliyuncs . http . clients . HttpResponse . class ) , any ( java . net . HttpURLConnection . class ) , any ( java . io . InputStream . class ) ) ; com . aliyuncs . http . clients . HttpResponse response = client . syncInvoke ( request ) ; verifyPrivate ( client , times ( 1 ) ) . invoke ( "parseHttpConn" , any ( com . aliyuncs . http . clients . HttpResponse . class ) , any ( java . net . HttpURLConnection . class ) , any ( java . io . InputStream . class ) ) ; "<AssertPlaceHolder>" ; } getSysUrl ( ) { return url ; }
org . junit . Assert . assertEquals ( "http://www.aliyun.com" , response . getSysUrl ( ) )
date ( ) { model . setMyDate ( new java . util . Date ( 0 ) ) ; com . google . appengine . api . datastore . Entity entity = meta . modelToEntity ( model ) ; com . google . appengine . api . datastore . Key key = ds . put ( entity ) ; com . google . appengine . api . datastore . Entity entity2 = ds . get ( key ) ; org . slim3 . datastore . model . Hoge model2 = meta . entityToModel ( entity2 ) ; "<AssertPlaceHolder>" ; } getMyDate ( ) { return myDate ; }
org . junit . Assert . assertThat ( model2 . getMyDate ( ) , org . hamcrest . CoreMatchers . is ( new java . util . Date ( 0 ) ) )
equalsContractNull ( ) { final org . jboss . aerogear . simplepush . protocol . Ack x = new org . jboss . aerogear . simplepush . protocol . impl . AckImpl ( "ch1" , 10L ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ! ( obj instanceof org . jboss . aerogear . simplepush . protocol . Ack ) ) { return false ; } final org . jboss . aerogear . simplepush . protocol . impl . AckImpl other = ( ( org . jboss . aerogear . simplepush . protocol . impl . AckImpl ) ( obj ) ) ; return ( channelId ) == null ? ( other . channelId ) == null : channelId . equals ( other . channelId ) ; }
org . junit . Assert . assertThat ( x . equals ( null ) , org . hamcrest . CoreMatchers . is ( false ) )
areAllLinksOpenReturnsFalseIfAuthClosed ( ) { final tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionManager amqpsSessionManager = new tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionManager ( mockDeviceClientConfig , mockScheduledExecutorService ) ; new tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . Expectations ( tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionManager . class ) { { tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . Deencapsulation . invoke ( amqpsSessionManager , "isAuthenticationOpened" ) ; result = false ; } } ; boolean result = tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . Deencapsulation . invoke ( amqpsSessionManager , "areAllLinksOpen" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertFalse ( result )
testRetrievalLastBackupVersion_emptyResult ( ) { java . util . Optional < java . lang . String > lastBackupVersion = fr . gouv . vitam . storage . engine . client . RestoreBackupIT . recoverBackupService . getLatestSavedFileName ( fr . gouv . vitam . storage . engine . client . RestoreBackupIT . STRATEGY_ID , DataCategory . RULES , FunctionalAdminCollections . RULES ) ; fr . gouv . vitam . storage . engine . client . RestoreBackupIT . LOGGER . debug ( "No<sp>backup<sp>version<sp>found." ) ; "<AssertPlaceHolder>" ; } empty ( ) { return new fr . gouv . vitam . metadata . core . utils . OriginatingAgencyBucketResult ( "" , 0L , new org . elasticsearch . search . aggregations . metrics . valuecount . ParsedValueCount ( ) , new org . elasticsearch . search . aggregations . metrics . sum . ParsedSum ( ) ) ; }
org . junit . Assert . assertEquals ( java . util . Optional . empty ( ) , lastBackupVersion )
testNotificationCount ( ) { java . util . List < org . opennms . web . filter . Filter > filterList = new java . util . ArrayList ( ) ; org . opennms . web . filter . Filter [ ] filters = filterList . toArray ( new org . opennms . web . filter . Filter [ 0 ] ) ; org . opennms . web . notification . AcknowledgeType ackType = AcknowledgeType . UNACKNOWLEDGED ; int notificationCount = m_daoNotificationRepo . countMatchingNotifications ( new org . opennms . web . notification . filter . NotificationCriteria ( ackType , filters ) ) ; "<AssertPlaceHolder>" ; } toArray ( T [ ] ) { return m_objects . toArray ( type ) ; }
org . junit . Assert . assertEquals ( 1 , notificationCount )
notAdjacent ( ) { java . lang . String h = "<ol><li<sp>id=1>One<li<sp>id=2>Two<li<sp>id=3>Three</ol>" ; com . itextpdf . styledxmlparser . jsoup . nodes . Document doc = com . itextpdf . styledxmlparser . jsoup . Jsoup . parse ( h ) ; com . itextpdf . styledxmlparser . jsoup . select . Elements sibs = doc . select ( "li#1<sp>+<sp>li#3" ) ; "<AssertPlaceHolder>" ; } size ( ) { return segments . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , sibs . size ( ) )
test_null_height_input ( ) { java . lang . Double result = instance . calculate ( 75.0 , null ) ; "<AssertPlaceHolder>" ; } calculate ( java . lang . Double , java . lang . Double ) { java . lang . Double result = null ; if ( ( ( ( weight != null ) && ( height != null ) ) && ( weight > 0.0 ) ) && ( height > 0.0 ) ) { java . lang . Double tmp = weight / ( height * height ) ; java . math . BigDecimal bd = new java . math . BigDecimal ( tmp ) ; java . math . MathContext mathContext = new java . math . MathContext ( 4 ) ; bd = bd . round ( mathContext ) ; result = bd . doubleValue ( ) ; } return result ; }
org . junit . Assert . assertNull ( result )
testEvaluationPhraseBasic ( ) { java . lang . String query = buildFunction ( ContentFunctions . CONTENT_PHRASE_FUNCTION_NAME , Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , "'dog'" , "'cat'" ) ; org . apache . commons . jexl2 . Expression expr = datawave . query . jexl . functions . ContentFunctionsTest . engine . createExpression ( query ) ; java . util . List < datawave . ingest . protobuf . TermWeightPosition > list1 ; java . util . List < datawave . ingest . protobuf . TermWeightPosition > list2 ; list1 = asList ( 1 , 2 , 3 ) ; list2 = asList ( 3 , 4 , 5 ) ; termOffSetMap . put ( "dog" , new datawave . query . jexl . functions . TermFrequencyList ( com . google . common . collect . Maps . immutableEntry ( new datawave . query . jexl . functions . TermFrequencyList . Zone ( "CONTENT" , true , eventId ) , list1 ) ) ) ; termOffSetMap . put ( "cat" , new datawave . query . jexl . functions . TermFrequencyList ( com . google . common . collect . Maps . immutableEntry ( new datawave . query . jexl . functions . TermFrequencyList . Zone ( "CONTENT" , true , eventId ) , list2 ) ) ) ; context . set ( Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , termOffSetMap ) ; java . lang . Object o = expr . evaluate ( context ) ; "<AssertPlaceHolder>" ; } expect ( java . lang . Object , java . lang . Boolean ) { if ( null == result ) { return Boolean . FALSE . equals ( expected ) ; } if ( result instanceof java . lang . Boolean ) { return result . equals ( expected ) ; } return false ; }
org . junit . Assert . assertTrue ( datawave . query . jexl . functions . ContentFunctionsTest . expect ( o , true ) )
testApply ( ) { org . opentripplanner . model . Trip trip = new org . opentripplanner . model . Trip ( ) ; trip . setId ( org . opentripplanner . routing . trippattern . TripTimesTest . tripId ) ; java . util . List < org . opentripplanner . model . StopTime > stopTimes = new java . util . LinkedList < org . opentripplanner . model . StopTime > ( ) ; org . opentripplanner . model . StopTime stopTime0 = new org . opentripplanner . model . StopTime ( ) ; org . opentripplanner . model . StopTime stopTime1 = new org . opentripplanner . model . StopTime ( ) ; org . opentripplanner . model . StopTime stopTime2 = new org . opentripplanner . model . StopTime ( ) ; org . opentripplanner . model . Stop stop0 = new org . opentripplanner . model . Stop ( ) ; org . opentripplanner . model . Stop stop1 = new org . opentripplanner . model . Stop ( ) ; org . opentripplanner . model . Stop stop2 = new org . opentripplanner . model . Stop ( ) ; stop0 . setId ( org . opentripplanner . routing . trippattern . TripTimesTest . stops [ 0 ] ) ; stop1 . setId ( org . opentripplanner . routing . trippattern . TripTimesTest . stops [ 1 ] ) ; stop2 . setId ( org . opentripplanner . routing . trippattern . TripTimesTest . stops [ 2 ] ) ; stopTime0 . setStop ( stop0 ) ; stopTime0 . setDepartureTime ( 0 ) ; stopTime0 . setStopSequence ( 0 ) ; stopTime1 . setStop ( stop1 ) ; stopTime1 . setArrivalTime ( 30 ) ; stopTime1 . setDepartureTime ( 60 ) ; stopTime1 . setStopSequence ( 1 ) ; stopTime2 . setStop ( stop2 ) ; stopTime2 . setArrivalTime ( 90 ) ; stopTime2 . setStopSequence ( 2 ) ; stopTimes . add ( stopTime0 ) ; stopTimes . add ( stopTime1 ) ; stopTimes . add ( stopTime2 ) ; org . opentripplanner . routing . trippattern . TripTimes differingTripTimes = new org . opentripplanner . routing . trippattern . TripTimes ( trip , stopTimes , new org . opentripplanner . routing . trippattern . Deduplicator ( ) ) ; org . opentripplanner . routing . trippattern . TripTimes updatedTripTimesA = new org . opentripplanner . routing . trippattern . TripTimes ( differingTripTimes ) ; updatedTripTimesA . updateArrivalTime ( 1 , 89 ) ; updatedTripTimesA . updateDepartureTime ( 1 , 98 ) ; "<AssertPlaceHolder>" ; } timesIncreasing ( ) { final int nStops = scheduledArrivalTimes . length ; int prevDep = - 1 ; for ( int s = 0 ; s < nStops ; s ++ ) { final int arr = getArrivalTime ( s ) ; final int dep = getDepartureTime ( s ) ; if ( dep < arr ) { org . opentripplanner . routing . trippattern . TripTimes . LOG . error ( "Negative<sp>dwell<sp>time<sp>in<sp>TripTimes<sp>at<sp>stop<sp>index<sp>{}." , s ) ; return false ; } if ( prevDep > arr ) { org . opentripplanner . routing . trippattern . TripTimes . LOG . error ( "Negative<sp>running<sp>time<sp>in<sp>TripTimes<sp>after<sp>stop<sp>index<sp>{}." , s ) ; return false ; } prevDep = dep ; } return true ; }
org . junit . Assert . assertFalse ( updatedTripTimesA . timesIncreasing ( ) )
testRowValueConstructorOnLHSBuiltInFunctionOperatingOnIntegerLiteralRHS ( ) { long ts = nextTimestamp ( ) ; java . lang . String tenantId = getOrganizationId ( ) ; initATableValues ( tenantId , getDefaultSplits ( tenantId ) , null , ts ) ; java . lang . String query = "SELECT<sp>a_integer,<sp>x_integer<sp>FROM<sp>aTable<sp>WHERE<sp>?=organization_id<sp>AND<sp>(a_integer,<sp>x_integer)<sp>>=<sp>to_number('7')" ; java . util . Properties props = new java . util . Properties ( TEST_PROPERTIES ) ; props . setProperty ( PhoenixRuntime . CURRENT_SCN_ATTRIB , java . lang . Long . toString ( ( ts + 2 ) ) ) ; java . sql . Connection conn = java . sql . DriverManager . getConnection ( com . salesforce . phoenix . end2end . PHOENIX_JDBC_URL , props ) ; try { java . sql . PreparedStatement statement = conn . prepareStatement ( query ) ; statement . setString ( 1 , tenantId ) ; java . sql . ResultSet rs = statement . executeQuery ( ) ; int count = 0 ; while ( rs . next ( ) ) { count ++ ; } "<AssertPlaceHolder>" ; } finally { conn . close ( ) ; } } next ( ) { if ( ! ( hasNext ( ) ) ) { throw new com . salesforce . phoenix . expression . visitor . NoSuchElementException ( ) ; } return children . get ( ( ( position ) ++ ) ) ; }
org . junit . Assert . assertEquals ( 3 , count )
invalidKeyOps ( ) { com . microsoft . azure . keyvault . webkey . JsonWebKey key = com . microsoft . azure . keyvault . webkey . test . AesValidationTests . getAes ( ) ; key . withKeyOps ( java . util . Arrays . asList ( JsonWebKeyOperation . ENCRYPT , new com . microsoft . azure . keyvault . webkey . JsonWebKeyOperation ( "foo" ) ) ) ; "<AssertPlaceHolder>" ; } isValid ( ) { if ( ( kty ) == null ) { return false ; } if ( ( keyOps ) != null ) { final java . util . Set < com . microsoft . azure . keyvault . webkey . JsonWebKeyOperation > set = new java . util . HashSet < com . microsoft . azure . keyvault . webkey . JsonWebKeyOperation > ( JsonWebKeyOperation . ALL_OPERATIONS ) ; for ( int i = 0 ; i < ( keyOps . size ( ) ) ; i ++ ) { if ( ! ( set . contains ( keyOps . get ( i ) ) ) ) { return false ; } } } if ( JsonWebKeyType . OCT . equals ( kty ) ) { return isValidOctet ( ) ; } else if ( JsonWebKeyType . RSA . equals ( kty ) ) { return isValidRsa ( ) ; } else if ( JsonWebKeyType . RSA_HSM . equals ( kty ) ) { return isValidRsaHsm ( ) ; } else if ( JsonWebKeyType . EC . equals ( kty ) ) { return isValidEc ( ) ; } else if ( JsonWebKeyType . EC_HSM . equals ( kty ) ) { return isValidEcHsm ( ) ; } return false ; }
org . junit . Assert . assertFalse ( key . isValid ( ) )
canConvertAuthority ( ) { converter = new edu . zipcloud . cloudstreetmarket . core . converters . IdentifiableToIdConverter ( edu . zipcloud . cloudstreetmarket . core . converters . Authority . class ) ; "<AssertPlaceHolder>" ; } canConvert ( java . lang . Class ) { return type . isAssignableFrom ( this . type ) ; }
org . junit . Assert . assertTrue ( converter . canConvert ( edu . zipcloud . cloudstreetmarket . core . converters . Authority . class ) )
testFamilieRechtelijkeBetrekking ( ) { nl . bzk . brp . model . objecttype . bericht . RelatieBericht familie = new nl . bzk . brp . util . RelatieBuilder ( ) . bouwFamilieRechtelijkeBetrekkingRelatie ( ) . voegOuderToe ( nl . bzk . brp . util . PersoonBuilder . bouwPersoon ( "papa" , null , 19840404 , null , null , null , null ) ) . voegOuderToe ( nl . bzk . brp . util . PersoonBuilder . bouwPersoon ( "mama" , null , 19850404 , null , null , null , null ) ) . voegKindToe ( nl . bzk . brp . util . PersoonBuilder . bouwPersoon ( "kind" , null , 19850404 , null , null , null , null ) ) . getRelatie ( ) ; java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = bral0202 . executeer ( null , familie , null , null ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( meldingen . isEmpty ( ) )
testGetAnonymizedClientId_useSavedId ( ) { when ( preferences . get ( eq ( AnalyticsPreferences . ANALYTICS_CLIENT_ID ) , anyString ( ) ) ) . thenReturn ( "some-unique-client-id" ) ; java . lang . String clientId = com . google . cloud . tools . eclipse . usagetracker . AnalyticsPingManager . getAnonymizedClientId ( preferences ) ; "<AssertPlaceHolder>" ; verify ( preferences , never ( ) ) . put ( AnalyticsPreferences . ANALYTICS_CLIENT_ID , clientId ) ; } getAnonymizedClientId ( org . eclipse . core . runtime . preferences . IEclipsePreferences ) { java . lang . String clientId = preferences . get ( AnalyticsPreferences . ANALYTICS_CLIENT_ID , null ) ; if ( clientId == null ) { clientId = java . util . UUID . randomUUID ( ) . toString ( ) ; preferences . put ( AnalyticsPreferences . ANALYTICS_CLIENT_ID , clientId ) ; com . google . cloud . tools . eclipse . usagetracker . AnalyticsPingManager . flushPreferences ( preferences ) ; } return clientId ; }
org . junit . Assert . assertEquals ( "some-unique-client-id" , clientId )
testIntPrimitiveReturnType ( ) { a . org . fakereplace . test . replacement . staticmethod . StaticAccessingClass ns = new a . org . fakereplace . test . replacement . staticmethod . StaticAccessingClass ( ) ; java . lang . Class c = a . org . fakereplace . test . replacement . staticmethod . StaticAccessingClass . class ; java . lang . reflect . Method m = c . getMethod ( "getInt" ) ; java . lang . Integer res = ( ( java . lang . Integer ) ( m . invoke ( null ) ) ) ; "<AssertPlaceHolder>" ; } getMethod ( java . lang . Class ) { org . fakereplace . data . Class < ? > [ ] methodDesc = org . fakereplace . util . DescriptorUtils . argumentStringToClassArray ( descriptor , actualClass ) ; return actualClass . getDeclaredMethod ( methodName , methodDesc ) ; }
org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 10 ) ) , res )
parametersInBody ( ) { final net . jadler . Request req = net . jadler . Request . builder ( ) . method ( "POST" ) . requestURI ( java . net . URI . create ( "http://localhost/" ) ) . body ( java . lang . String . format ( "%s=%s&%s=%s&%s=%s" , net . jadler . RequestTest . PARAM1_NAME , net . jadler . RequestTest . PARAM1_VALUE1 , net . jadler . RequestTest . PARAM1_NAME , net . jadler . RequestTest . PARAM1_VALUE2 , net . jadler . RequestTest . PARAM2_NAME , net . jadler . RequestTest . PARAM2_VALUE ) . getBytes ( ) ) . header ( "content-type" , "application/x-www-form-urlencoded" ) . build ( ) ; final net . jadler . KeyValues expected = new net . jadler . KeyValues ( ) . add ( net . jadler . RequestTest . PARAM1_NAME , net . jadler . RequestTest . PARAM1_VALUE1 ) . add ( net . jadler . RequestTest . PARAM1_NAME , net . jadler . RequestTest . PARAM1_VALUE2 ) . add ( net . jadler . RequestTest . PARAM2_NAME , net . jadler . RequestTest . PARAM2_VALUE ) ; "<AssertPlaceHolder>" ; } getParameters ( ) { return this . parameters ; }
org . junit . Assert . assertThat ( req . getParameters ( ) , is ( expected ) )
fetchItems ( ) { itemProvider . addItems ( book . twju . chapter_3 . Listing_2_Stub_TimelineTest . FIRST_ITEM , book . twju . chapter_3 . Listing_2_Stub_TimelineTest . SECOND_ITEM , book . twju . chapter_3 . Listing_2_Stub_TimelineTest . THIRD_ITEM ) ; timeline . setFetchCount ( 1 ) ; timeline . fetchItems ( ) ; timeline . fetchItems ( ) ; java . util . List < book . twju . chapter_3 . Item > actual = timeline . getItems ( ) ; "<AssertPlaceHolder>" ; } getItems ( ) { java . util . Set < book . twju . timeline . model . FakeItem > actual = memento . getItems ( ) ; book . twju . timeline . model . MementoAssert . assertThat ( actual ) . isEqualTo ( book . twju . timeline . model . FakeItems . ALL_ITEMS ) ; }
org . junit . Assert . assertArrayEquals ( new book . twju . chapter_3 . Item [ ] { book . twju . chapter_3 . Listing_2_Stub_TimelineTest . THIRD_ITEM , book . twju . chapter_3 . Listing_2_Stub_TimelineTest . SECOND_ITEM } , actual . toArray ( new book . twju . chapter_3 . Item [ 2 ] ) )
assertFindJobRegisterStatisticsWhenRdbIsNotConfigured ( ) { org . unitils . util . ReflectionUtils . setFieldValue ( statisticManager , "rdbRepository" , null ) ; "<AssertPlaceHolder>" ; } findJobRegisterStatisticsSinceOnline ( ) { if ( ! ( isRdbConfigured ( ) ) ) { return java . util . Collections . emptyList ( ) ; } return rdbRepository . findJobRegisterStatistics ( getOnlineDate ( ) ) ; }
org . junit . Assert . assertTrue ( statisticManager . findJobRegisterStatisticsSinceOnline ( ) . isEmpty ( ) )
testTwo ( ) { org . terrier . matching . MatchingQueryTerms mqt = new org . terrier . matching . MatchingQueryTerms ( ) ; mqt . add ( org . terrier . querying . parser . Query . QTPBuilder . of ( new org . terrier . matching . matchops . SingleTermOp ( "a" ) ) . build ( ) ) ; mqt . add ( org . terrier . querying . parser . Query . QTPBuilder . of ( new org . terrier . matching . matchops . SingleTermOp ( "b" ) ) . build ( ) ) ; new org . terrier . querying . DependenceModelPreProcess ( ) . process ( mqt , "pBiL" ) ; System . out . println ( mqt . toString ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return location . length ; }
org . junit . Assert . assertEquals ( 5 , mqt . size ( ) )
testAcceptInValidParameter5 ( ) { final org . openspotlight . graph . query . console . ConsoleState state = new org . openspotlight . graph . query . console . ConsoleState ( null ) ; state . setInput ( "/<sp>><sp>" ) ; "<AssertPlaceHolder>" ; } accept ( org . openspotlight . graph . query . console . ConsoleState ) { org . openspotlight . common . util . Assertions . checkNotNull ( "state" , state ) ; if ( ( ( state . getActiveCommand ( ) ) == null ) && ( state . getInput ( ) . trim ( ) . equals ( "display<sp>properties" ) ) ) { return true ; } return false ; }
org . junit . Assert . assertThat ( command . accept ( state ) , org . hamcrest . core . Is . is ( false ) )
deleteInvalidBlocksPeriodically ( ) { alluxio . AlluxioURI uri = new alluxio . AlluxioURI ( "/test" ) ; int len = 10 ; alluxio . client . file . FileSystem fs = mCluster . getClient ( ) ; alluxio . worker . block . BlockWorker worker = mCluster . getWorkerProcess ( ) . getWorker ( alluxio . worker . block . BlockWorker . class ) ; alluxio . client . file . FileSystemTestUtils . createByteFile ( fs , uri , WritePType . MUST_CACHE , len ) ; "<AssertPlaceHolder>" ; removeFileMetadata ( uri ) ; alluxio . util . CommonUtils . waitFor ( "invalid<sp>blocks<sp>to<sp>be<sp>deleted" , ( ) -> ( worker . getStoreMetaFull ( ) . getNumberOfBlocks ( ) ) == 0 , alluxio . util . WaitForOptions . defaults ( ) . setTimeoutMs ( 2000 ) ) ; } getStoreMetaFull ( ) { return mBlockStore . getBlockStoreMetaFull ( ) ; }
org . junit . Assert . assertEquals ( 1 , worker . getStoreMetaFull ( ) . getNumberOfBlocks ( ) )
testBlockMatrix ( ) { final double [ ] [ ] input = new double [ ] [ ] { new double [ ] { 2.0 , 1.0 , 2.0 } , new double [ ] { 1.0 , 2.0 , 1.0 } , new double [ ] { 0.0 , 0.0 , 0.0 } } ; final double [ ] [ ] expected = new double [ ] [ ] { new double [ ] { 1.0 , 1.0 / 3.0 , 1.0 } , new double [ ] { 1.0 / 3.0 , 1.0 , 1.0 / 3.0 } , new double [ ] { 1.0 , 1.0 / 3.0 , 1.0 } } ; "<AssertPlaceHolder>" ; } computeCorrelationMatrix ( org . hipparchus . linear . RealMatrix ) { int nVars = matrix . getColumnDimension ( ) ; org . hipparchus . linear . RealMatrix outMatrix = new org . hipparchus . linear . BlockRealMatrix ( nVars , nVars ) ; for ( int i = 0 ; i < nVars ; i ++ ) { for ( int j = 0 ; j < i ; j ++ ) { double corr = correlation ( matrix . getColumn ( i ) , matrix . getColumn ( j ) ) ; outMatrix . setEntry ( i , j , corr ) ; outMatrix . setEntry ( j , i , corr ) ; } outMatrix . setEntry ( i , i , 1.0 ) ; } return outMatrix ; }
org . junit . Assert . assertEquals ( correlation . computeCorrelationMatrix ( new org . hipparchus . linear . BlockRealMatrix ( input ) ) , new org . hipparchus . linear . BlockRealMatrix ( expected ) )
testValidAndNullIdModifiesRoot ( ) { try { testGroup . addMembers ( getTestUser ( ) . getID ( ) , null ) ; } catch ( javax . jcr . nodetype . ConstraintViolationException e ) { } "<AssertPlaceHolder>" ; } hasPendingChanges ( ) { return base . hasPendingChanges ( ) ; }
org . junit . Assert . assertFalse ( root . hasPendingChanges ( ) )
testIsValidEncryptedBackupFilename_withInvalidFilename_fails ( ) { java . lang . String givenFilename = "/example/filename.dbb123" ; boolean result = this . target . isValidEncryptedBackupFilename ( givenFilename ) ; "<AssertPlaceHolder>" ; } isValidEncryptedBackupFilename ( java . lang . String ) { return ( "." + ( org . apache . commons . io . FilenameUtils . getExtension ( filename ) ) ) . equals ( org . osc . core . broker . service . BackupFileService . EXT_ENCRYPTED_BACKUP ) ; }
org . junit . Assert . assertFalse ( result )
testTenantRoutingContentStoreMayBeNullWhenProxyingAndInterfaceNotImplemented ( ) { org . alfresco . repo . content . ContentStore contentStore = new org . alfresco . repo . tenant . MultiTAdminServiceImplTest . FakeSubsystemProxy ( true ) ; org . alfresco . repo . tenant . TenantRoutingContentStore router = tenantAdmin . tenantRoutingContentStore ( contentStore ) ; "<AssertPlaceHolder>" ; } tenantRoutingContentStore ( org . alfresco . repo . content . ContentStore ) { if ( contentStore instanceof org . alfresco . repo . tenant . TenantRoutingContentStore ) { return ( ( org . alfresco . repo . tenant . TenantRoutingContentStore ) ( contentStore ) ) ; } else if ( contentStore instanceof org . alfresco . repo . content . ContentStoreCaps ) { org . alfresco . repo . content . ContentStoreCaps capabilities = ( ( org . alfresco . repo . content . ContentStoreCaps ) ( contentStore ) ) ; return ( ( org . alfresco . repo . tenant . TenantRoutingContentStore ) ( capabilities . getTenantRoutingContentStore ( ) ) ) ; } return null ; }
org . junit . Assert . assertNull ( router )
getYear_A$Calendar ( ) { java . lang . Integer expected = 2009 ; java . util . Calendar arg0 = java . util . Calendar . getInstance ( ) ; arg0 . set ( Calendar . YEAR , expected ) ; java . lang . Integer actual = com . github . seratch . taskun . util . CalendarUtil . getYear ( arg0 ) ; "<AssertPlaceHolder>" ; } getYear ( java . util . Calendar ) { java . lang . Integer year = calendar . get ( Calendar . YEAR ) ; return year ; }
org . junit . Assert . assertEquals ( expected , actual )
testCompare ( ) { java . util . Set < com . pearson . statsagg . metric_aggregation . MetricTimestampAndValue > sortedMetricTimestampsAndValuesSet = new java . util . TreeSet ( MetricTimestampAndValue . COMPARE_BY_TIMESTAMP ) ; for ( com . pearson . statsagg . metric_aggregation . MetricTimestampAndValue metricTimestampAndValue : com . pearson . statsagg . metric_aggregation . MetricTimestampAndValueTest . metricTimestampsAndValues_ ) { sortedMetricTimestampsAndValuesSet . add ( metricTimestampAndValue ) ; } java . util . List < com . pearson . statsagg . metric_aggregation . MetricTimestampAndValue > sortedMetricTimestampsAndValuesList = new java . util . ArrayList ( sortedMetricTimestampsAndValuesSet ) ; for ( int i = 0 ; i < ( sortedMetricTimestampsAndValuesList . size ( ) ) ; i ++ ) { if ( i > 0 ) { "<AssertPlaceHolder>" ; } } } getTimestamp ( ) { return timestamp_ ; }
org . junit . Assert . assertTrue ( ( ( sortedMetricTimestampsAndValuesList . get ( i ) . getTimestamp ( ) ) > ( sortedMetricTimestampsAndValuesList . get ( ( i - 1 ) ) . getTimestamp ( ) ) ) )
testScalarMultiply ( ) { org . apache . commons . math . complex . Complex x = new org . apache . commons . math . complex . Complex ( 3.0 , 4.0 ) ; double yDouble = 2.0 ; org . apache . commons . math . complex . Complex yComplex = new org . apache . commons . math . complex . Complex ( yDouble ) ; "<AssertPlaceHolder>" ; } multiply ( org . mozilla . javascript . v8dtoa . DiyFp ) { final long kM32 = 4294967295L ; long a = ( f ) > > > 32 ; long b = ( f ) & kM32 ; long c = ( other . f ) > > > 32 ; long d = ( other . f ) & kM32 ; long ac = a * c ; long bc = b * c ; long ad = a * d ; long bd = b * d ; long tmp = ( ( bd > > > 32 ) + ( ad & kM32 ) ) + ( bc & kM32 ) ; tmp += 1L << 31 ; long result_f = ( ( ac + ( ad > > > 32 ) ) + ( bc > > > 32 ) ) + ( tmp > > > 32 ) ; e += ( other . e ) + 64 ; f = result_f ; }
org . junit . Assert . assertEquals ( x . multiply ( yComplex ) , x . multiply ( yDouble ) )
testSkipTokenNoSystemOptions ( ) { org . teiid . adminapi . impl . ModelMetaData mmd = new org . teiid . adminapi . impl . ModelMetaData ( ) ; mmd . setName ( "vw" ) ; mmd . addSourceMetadata ( "ddl" , ( "create<sp>view<sp>x<sp>(a<sp>string<sp>primary<sp>key,<sp>b<sp>integer)<sp>" + "as<sp>select<sp>'xyz',<sp>123<sp>union<sp>all<sp>select<sp>'abc',<sp>456;" ) ) ; mmd . setModelType ( Model . Type . VIRTUAL ) ; org . teiid . olingo . TestODataIntegration . teiid . deployVDB ( "northwind" , mmd ) ; java . util . Map < java . lang . String , java . lang . String > props = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; props . put ( "batch-size" , "1" ) ; createContext ( "/odata4" , props ) ; org . eclipse . jetty . client . api . ContentResponse response = org . teiid . olingo . TestODataIntegration . http . GET ( ( ( org . teiid . olingo . TestODataIntegration . baseURL ) + "/northwind/vw/x" ) ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; }
org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) )
visitDocuments ( ) { org . xwiki . model . reference . SpaceReference sourceReference = new org . xwiki . model . reference . SpaceReference ( "wiki" , "Path" , "To" , "Space" ) ; org . xwiki . model . reference . SpaceReference destinationReference = new org . xwiki . model . reference . SpaceReference ( "wiki" , "Other" , "Space" ) ; org . xwiki . model . reference . SpaceReference nestedSpaceReference = new org . xwiki . model . reference . SpaceReference ( "WebPreferences" , sourceReference ) ; org . xwiki . model . reference . DocumentReference one = new org . xwiki . model . reference . DocumentReference ( "WebPreference" , nestedSpaceReference ) ; org . xwiki . model . reference . DocumentReference two = new org . xwiki . model . reference . DocumentReference ( "WebHome" , nestedSpaceReference ) ; org . xwiki . model . reference . DocumentReference three = new org . xwiki . model . reference . DocumentReference ( "ZZZ" , sourceReference ) ; org . xwiki . model . reference . DocumentReference four = new org . xwiki . model . reference . DocumentReference ( "WebPreferences" , sourceReference ) ; org . xwiki . model . reference . DocumentReference five = new org . xwiki . model . reference . DocumentReference ( "AAA" , sourceReference ) ; org . xwiki . model . reference . DocumentReference six = new org . xwiki . model . reference . DocumentReference ( "WebHome" , sourceReference ) ; when ( this . modelBridge . getDocumentReferences ( sourceReference ) ) . thenReturn ( java . util . Arrays . asList ( one , two , three , four , five , six ) ) ; org . xwiki . refactoring . internal . job . MoveJob job = ( ( org . xwiki . refactoring . internal . job . MoveJob ) ( getMocker ( ) . getComponentUnderTest ( ) ) ) ; job . initialize ( createRequest ( sourceReference , destinationReference ) ) ; java . util . List < org . xwiki . model . reference . DocumentReference > visitedPages = new java . util . ArrayList ( ) ; job . visitDocuments ( sourceReference , new org . xwiki . refactoring . internal . job . AbstractEntityJob . Visitor < org . xwiki . model . reference . DocumentReference > ( ) { @ org . xwiki . refactoring . internal . job . Override public void visit ( org . xwiki . model . reference . DocumentReference node ) { visitedPages . add ( node ) ; } } ) ; "<AssertPlaceHolder>" ; } add ( org . xwiki . rest . model . jaxb . Object ) { add ( obj , true ) ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( five , six , two , one , three , four ) , visitedPages )
should_N_pad_at_start_of_variant ( ) { au . edu . wehi . idsv . sim . SequentialVariantPlacer svp = new au . edu . wehi . idsv . sim . SequentialVariantPlacer ( B ( "NNNNNNAAAAAAAAAA" ) ) ; svp . setDistanceBetweenVariants ( 0 ) ; svp . setMinimumDistanceFromN ( 2 ) ; "<AssertPlaceHolder>" ; } getNext ( int ) { if ( featureSize <= 0 ) throw new java . lang . IllegalArgumentException ( "Feature<sp>size<sp>must<sp>be<sp>at<sp>least<sp>1<sp>base" ) ; int minN = getMinimumDistanceFromN ( ) ; position = ( ( position ) + ( getDistanceBetweenVariants ( ) ) ) + 1 ; if ( ( getMinimumDistanceFromN ( ) ) != 0 ) { int offset = getOffsetOfNextUnambiguousSequence ( java . lang . Math . max ( 0 , ( ( ( position ) - 1 ) - minN ) ) , ( ( minN * 2 ) + featureSize ) ) ; if ( offset < 0 ) { throw new au . edu . wehi . idsv . sim . SequentialVariantPlacer . ContigExhaustedException ( "Unable<sp>to<sp>get<sp>next<sp>variant<sp>location:<sp>no<sp>unambigious<sp>locations<sp>remains<sp>(contig<sp>exhausted)." ) ; } position = ( offset + 1 ) + minN ; } if ( ( ( ( position ) + featureSize ) + minN ) > ( reference . length ) ) { throw new au . edu . wehi . idsv . sim . SequentialVariantPlacer . ContigExhaustedException ( "Unable<sp>to<sp>get<sp>next<sp>variant<sp>location:<sp>no<sp>valid<sp>location<sp>remains<sp>(contig<sp>exhausted)." ) ; } int startPosition = position ; position = ( ( position ) + featureSize ) - 1 ; return startPosition ; }
org . junit . Assert . assertEquals ( 9 , svp . getNext ( 1 ) )
testWalkChain ( ) { com . iota . iri . controllers . TransactionViewModel transaction ; com . iota . iri . controllers . TransactionViewModel transaction1 ; com . iota . iri . controllers . TransactionViewModel transaction2 ; com . iota . iri . controllers . TransactionViewModel transaction3 ; com . iota . iri . controllers . TransactionViewModel transaction4 ; transaction = new com . iota . iri . controllers . TransactionViewModel ( com . iota . iri . TransactionTestUtils . getRandomTransactionTrits ( ) , com . iota . iri . TransactionTestUtils . getRandomTransactionHash ( ) ) ; transaction1 = new com . iota . iri . controllers . TransactionViewModel ( com . iota . iri . TransactionTestUtils . getTransactionWithTrunkAndBranch ( transaction . getHash ( ) , transaction . getHash ( ) ) , com . iota . iri . TransactionTestUtils . getRandomTransactionHash ( ) ) ; transaction2 = new com . iota . iri . controllers . TransactionViewModel ( com . iota . iri . TransactionTestUtils . getTransactionWithTrunkAndBranch ( transaction1 . getHash ( ) , transaction1 . getHash ( ) ) , com . iota . iri . TransactionTestUtils . getRandomTransactionHash ( ) ) ; transaction3 = new com . iota . iri . controllers . TransactionViewModel ( com . iota . iri . TransactionTestUtils . getTransactionWithTrunkAndBranch ( transaction2 . getHash ( ) , transaction2 . getHash ( ) ) , com . iota . iri . TransactionTestUtils . getRandomTransactionHash ( ) ) ; transaction4 = new com . iota . iri . controllers . TransactionViewModel ( com . iota . iri . TransactionTestUtils . getTransactionWithTrunkAndBranch ( transaction3 . getHash ( ) , transaction3 . getHash ( ) ) , com . iota . iri . TransactionTestUtils . getRandomTransactionHash ( ) ) ; transaction . store ( com . iota . iri . service . tipselection . impl . WalkerAlphaTest . tangle , com . iota . iri . service . tipselection . impl . WalkerAlphaTest . snapshotProvider . getInitialSnapshot ( ) ) ; transaction1 . store ( com . iota . iri . service . tipselection . impl . WalkerAlphaTest . tangle , com . iota . iri . service . tipselection . impl . WalkerAlphaTest . snapshotProvider . getInitialSnapshot ( ) ) ; transaction2 . store ( com . iota . iri . service . tipselection . impl . WalkerAlphaTest . tangle , com . iota . iri . service . tipselection . impl . WalkerAlphaTest . snapshotProvider . getInitialSnapshot ( ) ) ; transaction3 . store ( com . iota . iri . service . tipselection . impl . WalkerAlphaTest . tangle , com . iota . iri . service . tipselection . impl . WalkerAlphaTest . snapshotProvider . getInitialSnapshot ( ) ) ; transaction4 . store ( com . iota . iri . service . tipselection . impl . WalkerAlphaTest . tangle , com . iota . iri . service . tipselection . impl . WalkerAlphaTest . snapshotProvider . getInitialSnapshot ( ) ) ; com . iota . iri . service . tipselection . RatingCalculator ratingCalculator = new com . iota . iri . service . tipselection . impl . RatingOne ( com . iota . iri . service . tipselection . impl . WalkerAlphaTest . tangle ) ; com . iota . iri . utils . collections . interfaces . UnIterableMap < com . iota . iri . model . HashId , java . lang . Integer > rating = ratingCalculator . calculate ( transaction . getHash ( ) ) ; com . iota . iri . model . Hash tip = com . iota . iri . service . tipselection . impl . WalkerAlphaTest . walker . walk ( transaction . getHash ( ) , rating , ( o ) -> true ) ; log . info ( ( "selected<sp>tip:<sp>" + ( tip . toString ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getHash ( ) { return hash ; }
org . junit . Assert . assertEquals ( tip , transaction4 . getHash ( ) )
testNoExec ( ) { org . eclipse . debug . core . ILaunchConfiguration config = createConfiguration ( proj . getProject ( ) ) ; doLaunch ( config , "testNoExec" ) ; org . eclipse . linuxtools . valgrind . core . IValgrindMessage [ ] messages = org . eclipse . linuxtools . internal . valgrind . ui . ValgrindUIPlugin . getDefault ( ) . getView ( ) . getMessages ( ) ; "<AssertPlaceHolder>" ; checkTestMessages ( messages , "testNoExec" ) ; } getMessages ( ) { return messages ; }
org . junit . Assert . assertEquals ( 1 , messages . length )
treeMenuAllElements ( ) { java . util . List < ? extends org . geosdi . geoplatform . gui . configuration . GPMenuGenericTool > tools = gpTreeMenuStore . getTools ( new org . geosdi . geoplatform . gui . configuration . composite . menu . store . MultiSelectionCompositeKey ( org . geosdi . geoplatform . gui . configuration . composite . menu . MultiSelectionElementType . ALL ) ) ; "<AssertPlaceHolder>" ; logger . info ( "ALL<sp>ELEMENTS<sp>TREE<sp>MENU<sp>@@@@@@@@@@@@@@@@@@@<sp>\n\n<sp>{}<sp>\n" , tools ) ; } size ( ) { return list . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , tools . size ( ) )
simpleBeanLookupByName ( ) { org . apache . deltaspike . test . core . api . provider . TestBean testBean = org . apache . deltaspike . core . api . provider . BeanProvider . getContextualReference ( "extraNameBean" , false , org . apache . deltaspike . test . core . api . provider . TestBean . class ) ; "<AssertPlaceHolder>" ; } getContextualReference ( java . lang . Class , boolean , java . lang . annotation . Annotation [ ] ) { javax . enterprise . inject . spi . BeanManager beanManager = org . apache . deltaspike . core . api . provider . BeanProvider . getBeanManager ( ) ; return org . apache . deltaspike . core . api . provider . BeanProvider . getContextualReference ( beanManager , type , optional , qualifiers ) ; }
org . junit . Assert . assertNotNull ( testBean )
shouldNotInvokeDispatcherWhenServletContextOnlyStrategyIsUsed ( ) { final java . util . concurrent . atomic . AtomicBoolean dispatcherInvokedFlag = new java . util . concurrent . atomic . AtomicBoolean ( ) ; victim = new ro . isdc . wro . model . resource . locator . ServletContextUriLocator ( ) { @ ro . isdc . wro . model . resource . locator . Override java . io . InputStream locateWithDispatcher ( final java . lang . String uri ) throws java . io . IOException { dispatcherInvokedFlag . set ( true ) ; throw new java . io . IOException ( "No<sp>resource<sp>exist" ) ; } } ; initLocator ( victim ) ; victim . setLocatorStrategy ( LocatorStrategy . SERVLET_CONTEXT_ONLY ) ; try { victim . locate ( "/test.css" ) ; } finally { "<AssertPlaceHolder>" ; } } get ( ) { final int c = in . read ( ) ; if ( ( ( c >= '<sp>' ) || ( c == '\n' ) ) || ( c == ( ro . isdc . wro . model . resource . processor . support . JSMin . EOF ) ) ) { return c ; } if ( c == '\r' ) { return '\n' ; } return '<sp>' ; }
org . junit . Assert . assertFalse ( dispatcherInvokedFlag . get ( ) )
testBlobMetadataNotFound ( ) { when ( _server . getMetadata ( "table-name" , "blob-id" ) ) . thenThrow ( new com . bazaarvoice . emodb . blob . api . BlobNotFoundException ( "blob-id" ) ) ; try { blobClient ( ) . getMetadata ( "table-name" , "blob-id" ) ; org . junit . Assert . fail ( ) ; } catch ( com . bazaarvoice . emodb . blob . api . BlobNotFoundException e ) { "<AssertPlaceHolder>" ; } verify ( _server ) . getMetadata ( "table-name" , "blob-id" ) ; verifyNoMoreInteractions ( _server ) ; } getBlobId ( ) { return _blobId ; }
org . junit . Assert . assertEquals ( e . getBlobId ( ) , "blob-id" )
setFullySpecifiedName_shouldAddTheNameToTheListOfNamesIfItNotAmongThemBefore ( ) { org . openmrs . Concept concept = createConcept ( 1 , org . openmrs . api . context . Context . getLocale ( ) ) ; int expectedNumberOfNames = ( concept . getNames ( ) . size ( ) ) + 1 ; concept . setFullySpecifiedName ( new org . openmrs . ConceptName ( "some<sp>name" , org . openmrs . api . context . Context . getLocale ( ) ) ) ; "<AssertPlaceHolder>" ; } getNames ( ) { return getNames ( false ) ; }
org . junit . Assert . assertEquals ( expectedNumberOfNames , concept . getNames ( ) . size ( ) )
testTermDetection3 ( ) { de . jetwick . data . JTweet tw = new de . jetwick . data . JTweet ( 1L , ( "A<sp>Year<sp>Without<sp>Rain<sp>" + ( "A<sp>Year<sp>Without<sp>Rain<sp>A<sp>Year<sp>Without<sp>Rain<sp>A<sp>Year<sp>Without<sp>Rain<sp>" + "A<sp>Year<sp>Without<sp>Rain<sp>A<sp>Year<sp>Without<sp>Rain<sp>A<sp>Year<sp>Without<sp>Rain" ) ) , new de . jetwick . data . JUser ( "peter" ) ) ; de . jetwick . tw . cmd . TermCreateCommandTest . execute ( tw ) ; "<AssertPlaceHolder>" ; } getTextTerms ( ) { return textTerms ; }
org . junit . Assert . assertEquals ( 2 , tw . getTextTerms ( ) . size ( ) )
testCompileTestData ( ) { this . batchCompiler . compile ( ) ; java . io . File _file = new java . io . File ( ( ( org . jnario . standalone . tests . FeatureBatchCompilerTest . OUTPUT_DIRECTORY ) + "/test" ) ) ; final java . io . FilenameFilter _function = new java . io . FilenameFilter ( ) { public boolean accept ( final java . io . File dir , final java . lang . String name ) { return name . endsWith ( ".java" ) ; } } ; java . lang . String [ ] _list = _file . list ( _function ) ; int _size = ( ( java . util . List < java . lang . String > ) ( org . eclipse . xtext . xbase . lib . Conversions . doWrapArray ( _list ) ) ) . size ( ) ; "<AssertPlaceHolder>" ; } list ( T [ ] ) { return newArrayList ( elements ) ; }
org . junit . Assert . assertEquals ( 3 , _size )
singlePushNotification ( ) { app . clear ( ) ; java . lang . String payload = "Hello,<sp>World!" ; org . apache . usergrid . services . notifications . gcm . Map < java . lang . String , java . lang . String > payloads = new org . apache . usergrid . services . notifications . gcm . HashMap < java . lang . String , java . lang . String > ( 1 ) ; payloads . put ( notifier . getUuid ( ) . toString ( ) , payload ) ; app . put ( "payloads" , payloads ) ; app . put ( "queued" , java . lang . System . currentTimeMillis ( ) ) ; app . put ( "debug" , true ) ; app . put ( "expire" , ( ( java . lang . System . currentTimeMillis ( ) ) + 300000 ) ) ; org . apache . usergrid . services . notifications . gcm . Entity e = app . testRequest ( ServiceAction . POST , 1 , "devices" , device1 . getUuid ( ) , "notifications" ) . getEntity ( ) ; app . testRequest ( ServiceAction . GET , 1 , "notifications" , e . getUuid ( ) ) ; org . apache . usergrid . services . notifications . gcm . Notification notification = app . getEntityManager ( ) . get ( e . getUuid ( ) , org . apache . usergrid . services . notifications . gcm . Notification . class ) ; "<AssertPlaceHolder>" ; notification = notificationWaitForComplete ( notification ) ; checkReceipts ( notification , 1 ) ; } getPayloads ( ) { return payloads ; }
org . junit . Assert . assertEquals ( notification . getPayloads ( ) . get ( notifier . getUuid ( ) . toString ( ) ) , payload )
testWithNulls ( org . baeldung . mocks . jmockit . ExpectationsCollaborator ) { new mockit . Expectations ( ) { { mock . methodForNulls1 ( anyString , null ) ; result = "null" ; } } ; "<AssertPlaceHolder>" ; mock . methodForNulls2 ( "blablabla" , null ) ; new mockit . Verifications ( ) { { mock . methodForNulls2 ( anyString , ( ( java . util . List < java . lang . String > ) ( withNull ( ) ) ) ) ; } } ; }
org . junit . Assert . assertEquals ( "null" , mock . methodForNulls1 ( "blablabla" , new java . util . ArrayList < java . lang . String > ( ) ) )
testRuntime ( ) { sqlite . feature . in . BindAppDataSource ds = sqlite . feature . in . BindAppDataSource . getInstance ( ) ; ds . execute ( new sqlite . feature . in . case4 . BindAppDataSource . Transaction ( ) { @ sqlite . feature . in . Override public com . abubusoft . kripton . android . sqlite . TransactionResult onExecute ( sqlite . feature . in . BindAppDaoFactory daoFactory ) { sqlite . feature . in . DaoCityImpl dao = daoFactory . getDaoCity ( ) ; long id1 ; long id2 ; sqlite . feature . in . City bean1 = new sqlite . feature . in . City ( ) ; bean1 . name = "city1" ; bean1 . setDate ( new java . sql . Date ( new java . util . Date ( ) . getTime ( ) ) ) ; id1 = dao . insert ( bean1 ) ; sqlite . feature . in . City bean2 = new sqlite . feature . in . City ( ) ; bean2 . name = "city2" ; bean2 . setDate ( new java . sql . Date ( new java . util . Date ( ) . getTime ( ) ) ) ; id2 = dao . insert ( bean2 ) ; sqlite . feature . in . java . sql [ ] params = new java . sql . Date [ ] { new java . sql . Date ( new java . util . Date ( ) . getTime ( ) ) } ; "<AssertPlaceHolder>" ; return com . abubusoft . kripton . android . sqlite . TransactionResult . COMMIT ; } } ) ; } selectAll ( com . abubusoft . kripton . android . sqlite . OnReadBeanListener ) { com . abubusoft . kripton . android . sqlite . KriptonContentValues _contentValues = contentValues ( ) ; java . lang . String _sql = sqlite . feature . rx . persistence . CountryDaoImpl . SELECT_ALL_SQL8 ; java . lang . String [ ] _sqlArgs = _contentValues . whereArgsAsArray ( ) ; if ( _context . isLogEnabled ( ) ) { com . abubusoft . kripton . android . Logger . info ( _sql ) ; int _whereParamCounter = 0 ; for ( java . lang . String _whereParamItem : _contentValues . whereArgs ( ) ) { com . abubusoft . kripton . android . Logger . info ( "==><sp>param%s:<sp>'%s'" , ( _whereParamCounter ++ ) , com . abubusoft . kripton . common . StringUtils . checkSize ( _whereParamItem ) ) ; } } try ( android . database . Cursor _cursor = database ( ) . rawQuery ( _sql , _sqlArgs ) ) { if ( _context . isLogEnabled ( ) ) { com . abubusoft . kripton . android . Logger . info ( "Rows<sp>found:<sp>%s" , _cursor . getCount ( ) ) ; } sqlite . feature . rx . model . Country resultBean = new sqlite . feature . rx . model . Country ( ) ; if ( _cursor . moveToFirst ( ) ) { int index0 = _cursor . getColumnIndex ( "id" ) ; int index1 = _cursor . getColumnIndex ( "area" ) ; int index2 = _cursor . getColumnIndex ( "calling_code" ) ; int index3 = _cursor . getColumnIndex ( "code" ) ; int index4 = _cursor . getColumnIndex ( "name" ) ; int index5 = _cursor . getColumnIndex ( "region" ) ; int index6 = _cursor . getColumnIndex ( "translated_name" ) ; int rowCount = _cursor . getCount ( ) ; do { resultBean . area = 0L ; resultBean . region = null ; resultBean . translatedName = null ; resultBean . id = _cursor . getLong ( index0 ) ; if ( ! ( _cursor . isNull ( index1 ) ) ) { resultBean . area = _cursor . getLong ( index1 ) ; } resultBean . callingCode = _cursor . getString ( index2 ) ; resultBean . code = _cursor . getString ( index3 ) ; resultBean . name = _cursor . getString ( index4 ) ; if ( ! ( _cursor . isNull ( index5 ) ) ) { resultBean . region = _cursor . getString ( index5 ) ; } if ( ! ( _cursor . isNull ( index6 ) ) ) { resultBean . translatedName = sqlite . feature . rx . model . CountryTable . parseTranslatedName ( _cursor . getBlob ( index6 ) ) ; } listener . onRead ( resultBean , _cursor . getPosition ( ) , rowCount ) ; } while ( _cursor . moveToNext ( ) ) ; } }
org . junit . Assert . assertTrue ( ( ( dao . selectAll ( params ) . size ( ) ) == 2 ) )
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . security . wedeploy . auth . model . WeDeployAuthToken > weDeployAuthTokens = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( weDeployAuthTokens . isEmpty ( ) )
startProcess ( ) { org . activiti . engine . RepositoryService repositoryService = activitiRule . getRepositoryService ( ) ; repositoryService . createDeployment ( ) . addInputStream ( "myProcess.bpmn20.xml" , new java . io . FileInputStream ( filename ) ) . deploy ( ) ; org . activiti . engine . RuntimeService runtimeService = activitiRule . getRuntimeService ( ) ; java . util . Map < java . lang . String , java . lang . Object > variableMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; variableMap . put ( "name" , "Activiti" ) ; org . activiti . engine . runtime . ProcessInstance processInstance = runtimeService . startProcessInstanceByKey ( "myProcess" , variableMap ) ; "<AssertPlaceHolder>" ; System . out . println ( ( ( ( "id<sp>" + ( processInstance . getId ( ) ) ) + "<sp>" ) + ( processInstance . getProcessDefinitionId ( ) ) ) ) ; }
org . junit . Assert . assertNotNull ( processInstance . getId ( ) )
setServiceName ( ) { route . setServiceName ( "frontend-alt" ) ; "<AssertPlaceHolder>" ; } getServiceName ( ) { return asString ( com . openshift . internal . restclient . model . Route . ROUTE_SERVICE_NAME ) ; }
org . junit . Assert . assertEquals ( "frontend-alt" , route . getServiceName ( ) )
testEquals ( ) { uk . ac . ebi . ep . ebeye . protein . model . EntryTest . LOGGER . info ( "equals" ) ; java . lang . Object obj = new uk . ac . ebi . ep . ebeye . model . Fields ( ) ; boolean expResult = false ; boolean result = instance . equals ( obj ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } final uk . ac . ebi . ep . centralservice . chembl . assay . Assay other = ( ( uk . ac . ebi . ep . centralservice . chembl . assay . Assay ) ( obj ) ) ; if ( ! ( java . util . Objects . equals ( this . assayChemblId , other . assayChemblId ) ) ) { return false ; } return true ; }
org . junit . Assert . assertEquals ( expResult , result )
testLocalPingServiceSuccess ( ) { io . cloudslang . content . utilities . entities . LocalPingInputs localPingInputs = new io . cloudslang . content . utilities . entities . LocalPingInputs . LocalPingInputsBuilder ( ) . targetHost ( io . cloudslang . content . utilities . services . localping . LocalPingServiceTest . DUMMY_IP ) . build ( ) ; mockStatic ( io . cloudslang . content . utilities . util . CommandExecutor . class ) ; when ( executeCommand ( anyString ( ) ) ) . thenReturn ( io . cloudslang . content . utilities . services . localping . LocalPingServiceTest . COMMAND_OUTPUT ) ; doReturn ( io . cloudslang . content . utilities . services . localping . WINDOWS ) . when ( localPingServiceSpy ) . detectLocalOsFamily ( ) ; java . util . Map < java . lang . String , java . lang . String > resultsMap = localPingServiceSpy . executePingCommand ( localPingInputs ) ; "<AssertPlaceHolder>" ; } executePingCommand ( io . cloudslang . content . utilities . entities . LocalPingInputs ) { final java . lang . String osFamily = detectLocalOsFamily ( ) ; if ( ( org . apache . commons . lang3 . StringUtils . isEmpty ( osFamily ) ) || ( osFamily . equalsIgnoreCase ( io . cloudslang . content . utilities . services . localping . OTHER ) ) ) { throw new java . lang . RuntimeException ( UNABLE_TO_DETECT_LOCAL_OPERATING_SYSTEM ) ; } io . cloudslang . content . utilities . services . localping . LocalPingCommand localPingCommand = io . cloudslang . content . utilities . services . localping . LocalPingCommandFactory . getLocalPingCommand ( osFamily ) ; final java . lang . String command = localPingCommand . createCommand ( localPingInputs ) ; java . util . Map < java . lang . String , java . lang . String > resultsMap = localPingCommand . parseOutput ( executeCommand ( command ) ) ; if ( pingSucceeded ( resultsMap . get ( io . cloudslang . content . utilities . services . localping . RETURN_RESULT ) , resultsMap . get ( io . cloudslang . content . utilities . services . localping . PERCENTAGE_PACKETS_LOST ) ) ) { resultsMap . put ( io . cloudslang . content . utilities . services . localping . RETURN_CODE , ReturnCodes . SUCCESS ) ; resultsMap . put ( io . cloudslang . content . utilities . services . localping . EXCEPTION , io . cloudslang . content . utilities . services . localping . EMPTY_STRING ) ; } else { resultsMap . put ( io . cloudslang . content . utilities . services . localping . RETURN_CODE , ReturnCodes . FAILURE ) ; resultsMap . put ( io . cloudslang . content . utilities . services . localping . EXCEPTION , resultsMap . get ( io . cloudslang . content . utilities . services . localping . RETURN_RESULT ) ) ; } return resultsMap ; }
org . junit . Assert . assertEquals ( io . cloudslang . content . utilities . services . localping . LocalPingServiceTest . COMMAND_OUTPUT , resultsMap . get ( io . cloudslang . content . utilities . services . localping . RETURN_RESULT ) )
findByNoTest ( ) { java . lang . String no = org . hibernate . id . UUIDGenerator . UUID_GEN_STRATEGY ; me . j360 . boot . microservice . order . entity . Express express = new me . j360 . boot . microservice . order . entity . Express ( ) ; express . setCost ( BigDecimal . ONE ) ; express . setNo ( no ) ; expressRepository . save ( express ) ; me . j360 . boot . microservice . order . entity . Express express1 = expressRepository . findByNoAllIgnoringCase ( no ) ; "<AssertPlaceHolder>" ; } getNo ( ) { return no ; }
org . junit . Assert . assertEquals ( no , express1 . getNo ( ) )
testMoveAndRenameAutonomousArea ( ) { org . apache . directory . api . ldap . model . entry . Entry autonomousArea = new org . apache . directory . api . ldap . model . entry . DefaultEntry ( "ou=autonomousArea,<sp>ou=system" , "ObjectClass:<sp>top" , "ObjectClass:<sp>organizationalUnit" , "ou:<sp>autonomousArea" , "administrativeRole:<sp>autonomousArea" ) ; org . apache . directory . server . core . admin . AdministrativePointServiceIT . connection . add ( autonomousArea ) ; try { org . apache . directory . server . core . admin . AdministrativePointServiceIT . connection . moveAndRename ( "ou=autonomousArea,<sp>ou=system" , "ou=new<sp>autonomousArea,<sp>uid=admin,<sp>ou=system" ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . directory . api . ldap . model . exception . LdapUnwillingToPerformException lutpe ) { "<AssertPlaceHolder>" ; } } moveAndRename ( org . apache . directory . api . ldap . model . message . ModifyDnRequest , org . apache . directory . server . core . api . changelog . LogChange ) { org . apache . directory . server . core . api . interceptor . context . MoveAndRenameOperationContext moveAndRenameContext = new org . apache . directory . server . core . api . interceptor . context . MoveAndRenameOperationContext ( this , modifyDnRequest ) ; moveAndRenameContext . setLogChange ( log ) ; org . apache . directory . server . core . api . OperationManager operationManager = directoryService . getOperationManager ( ) ; try { operationManager . moveAndRename ( moveAndRenameContext ) ; } catch ( org . apache . directory . api . ldap . model . exception . LdapException e ) { modifyDnRequest . getResultResponse ( ) . addAllControls ( moveAndRenameContext . getResponseControls ( ) ) ; throw e ; } modifyDnRequest . getResultResponse ( ) . addAllControls ( moveAndRenameContext . getResponseControls ( ) ) ; }
org . junit . Assert . assertTrue ( true )
filter_not_exists_scoping_03 ( ) { org . apache . jena . sparql . algebra . Op orig = org . apache . jena . sparql . sse . SSE . parseOp ( org . apache . jena . atlas . lib . StrUtils . strjoinNL ( "<sp>(extend<sp>((?openTriplets<sp>?.0))" 0 , "<sp>(project<sp>(?openTriplets)" , "<sp>(extend<sp>((?openTriplets<sp>?.0))" , "<sp>(group<sp>()<sp>((?.0<sp>(count<sp>?x)))" , "<sp>(filter<sp>(notexists" , "<sp>(quadpattern<sp>(quad<sp><urn:x-arq:DefaultGraphNode><sp>?z<sp>?c<sp>?x)))" , "<sp>(quadpattern" , "<sp>(extend<sp>((?openTriplets<sp>?.0))" 3 , "<sp>(quad<sp><urn:x-arq:DefaultGraphNode><sp>?y<sp>?b<sp>?z)" , "<sp>(extend<sp>((?openTriplets<sp>?.0))" 4 ) ) ; org . apache . jena . sparql . algebra . Op expected = org . apache . jena . sparql . sse . SSE . parseOp ( org . apache . jena . atlas . lib . StrUtils . strjoinNL ( "<sp>(extend<sp>((?openTriplets<sp>?.0))" 0 , "<sp>(project<sp>(?openTriplets)" , "<sp>(extend<sp>((?openTriplets<sp>?/.0))" , "<sp>(extend<sp>((?openTriplets<sp>?.0))" 1 , "<sp>(filter<sp>(notexists" , "<sp>(quadpattern<sp>(quad<sp><urn:x-arq:DefaultGraphNode><sp>?/z<sp>?/c<sp>?/x)))" , "<sp>(quadpattern" , "<sp>(extend<sp>((?openTriplets<sp>?.0))" 2 , "<sp>(quad<sp><urn:x-arq:DefaultGraphNode><sp>?/y<sp>?/b<sp>?/z)" , "<sp>(extend<sp>((?openTriplets<sp>?.0))" 4 ) ) ; org . apache . jena . sparql . algebra . Op transformed = org . apache . jena . sparql . algebra . optimize . TransformScopeRename . transform ( orig ) ; "<AssertPlaceHolder>" ; } transform ( org . apache . jena . sparql . algebra . Op ) { return new org . apache . jena . sparql . algebra . optimize . TransformScopeRename . TransformScopeRename$ ( op ) . work ( ) ; }
org . junit . Assert . assertEquals ( transformed , expected )
test_isRegisteredURIIllegal ( ) { "<AssertPlaceHolder>" ; } isRegistered ( com . github . sarxos . webcam . ds . ipcam . IpCamDevice ) { if ( ipcam == null ) { throw new java . lang . IllegalArgumentException ( "IP<sp>camera<sp>device<sp>cannot<sp>be<sp>null" ) ; } java . util . Iterator < com . github . sarxos . webcam . ds . ipcam . IpCamDevice > di = com . github . sarxos . webcam . ds . ipcam . IpCamDeviceRegistry . DEVICES . iterator ( ) ; while ( di . hasNext ( ) ) { if ( di . next ( ) . getName ( ) . equals ( ipcam . getName ( ) ) ) { return true ; } } return false ; }
org . junit . Assert . assertTrue ( com . github . sarxos . webcam . ds . ipcam . IpCamDeviceRegistry . isRegistered ( ( ( java . net . URI ) ( null ) ) ) )
testDecryptsMultitplePartsOfPartiallyEncryptedProperty ( ) { java . lang . StringBuilder propertyValue = new java . lang . StringBuilder ( ) ; java . lang . StringBuilder expected = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < 100 ; i ++ ) { propertyValue . append ( java . lang . String . format ( "param%s=%s%s%s()&" , i , org . apache . camel . component . jasypt . JasyptPropertiesParser . JASYPT_PREFIX_TOKEN , encryptor . encrypt ( ( "tiger" + i ) ) , org . apache . camel . component . jasypt . JasyptPropertiesParser . JASYPT_SUFFIX_TOKEN ) ) ; expected . append ( java . lang . String . format ( "param%s=tiger%s()&" , i , i ) ) ; } java . lang . String result = jasyptPropertiesParser . parseProperty ( org . apache . camel . component . jasypt . JasyptPropertiesParserTest . KEY , propertyValue . toString ( ) , null ) ; "<AssertPlaceHolder>" ; } is ( io . atomix . group . GroupMember ) { return ( this . member ) != null ? this . member . equals ( member ) : false ; }
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( expected . toString ( ) ) )
testSize ( ) { org . ccnx . ccn . impl . support . Log . info ( Log . FAC_TEST , "Starting<sp>testSize" ) ; org . ccnx . ccn . io . content . Collection cd = new org . ccnx . ccn . io . content . Collection ( ) ; for ( int i = 0 ; i < ( org . ccnx . ccn . io . content . CollectionTest . lrs . length ) ; ++ i ) { cd . add ( org . ccnx . ccn . io . content . CollectionTest . lrs [ i ] ) ; } "<AssertPlaceHolder>" ; org . ccnx . ccn . impl . support . Log . info ( Log . FAC_TEST , "Completed<sp>testSize" ) ; } size ( ) { synchronized ( _handlers ) { return _handlers . size ( ) ; } }
org . junit . Assert . assertTrue ( ( ( cd . size ( ) ) == ( org . ccnx . ccn . io . content . CollectionTest . lrs . length ) ) )
testGetBuild ( ) { hudson . plugins . jacoco . report . CoverageReport report = new hudson . plugins . jacoco . report . CoverageReport ( action , new hudson . plugins . jacoco . ExecutionFileLoader ( ) ) ; "<AssertPlaceHolder>" ; } getBuild ( ) { return parent . getBuild ( ) ; }
org . junit . Assert . assertNull ( report . getBuild ( ) )
testCreateFileHeaderForRenameModeChange ( ) { org . eclipse . jgit . diff . DiffEntry a = org . eclipse . jgit . diff . DiffEntry . delete ( org . eclipse . jgit . diff . DiffFormatterTest . PATH_A , org . eclipse . jgit . lib . ObjectId . zeroId ( ) ) ; org . eclipse . jgit . diff . DiffEntry b = org . eclipse . jgit . diff . DiffEntry . add ( org . eclipse . jgit . diff . DiffFormatterTest . PATH_B , org . eclipse . jgit . lib . ObjectId . zeroId ( ) ) ; b . oldMode = org . eclipse . jgit . lib . FileMode . REGULAR_FILE ; b . newMode = org . eclipse . jgit . lib . FileMode . EXECUTABLE_FILE ; org . eclipse . jgit . diff . DiffEntry m = org . eclipse . jgit . diff . DiffEntry . pair ( ChangeType . RENAME , a , b , 100 ) ; m . oldId = null ; m . newId = null ; org . eclipse . jgit . patch . FileHeader fh = df . toFileHeader ( m ) ; java . lang . String expected = ( ( ( ( ( ( org . eclipse . jgit . diff . DiffFormatterTest . DIFF ) + "a/src/a<sp>b/src/b\n" ) + "old<sp>mode<sp>100644\n" ) + "new<sp>mode<sp>100755\n" ) + "similarity<sp>index<sp>100%\n" ) + "rename<sp>from<sp>src/a\n" ) + "rename<sp>to<sp>src/b\n" ; "<AssertPlaceHolder>" ; } getScriptText ( ) { return getScriptText ( null , null ) ; }
org . junit . Assert . assertEquals ( expected , fh . getScriptText ( ) )
getAllIdsShouldIncludeArrayIndices ( ) { org . mozilla . javascript . NativeArray array = new org . mozilla . javascript . NativeArray ( new java . lang . String [ ] { "a" , "b" } ) ; java . lang . Object [ ] expectedIds = new java . lang . Object [ ] { 0 , 1 , "length" } ; java . lang . Object [ ] actualIds = array . getAllIds ( ) ; "<AssertPlaceHolder>" ; } getAllIds ( ) { java . util . Set < java . lang . Object > allIds = new java . util . LinkedHashSet < java . lang . Object > ( java . util . Arrays . asList ( this . getIds ( ) ) ) ; allIds . addAll ( java . util . Arrays . asList ( super . getAllIds ( ) ) ) ; return allIds . toArray ( ) ; }
org . junit . Assert . assertArrayEquals ( expectedIds , actualIds )
canHandleForwardingBuildTargetSourcePathsWithDifferentFilesystems ( ) { com . facebook . buck . io . filesystem . ProjectFilesystem filesystem1 = new com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem ( java . nio . file . Paths . get ( "first" , "root" ) ) ; com . facebook . buck . io . filesystem . ProjectFilesystem filesystem2 = new com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem ( java . nio . file . Paths . get ( "other" , "root" ) ) ; java . nio . file . Path relativePath = java . nio . file . Paths . get ( "arbitrary" , "path" ) ; com . facebook . buck . core . model . BuildTarget target = com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//:target" ) ; com . facebook . buck . core . sourcepath . ForwardingBuildTargetSourcePath forwardingSourcePath1 = com . facebook . buck . core . sourcepath . ForwardingBuildTargetSourcePath . of ( target , com . facebook . buck . core . sourcepath . PathSourcePath . of ( filesystem1 , relativePath ) ) ; com . facebook . buck . core . sourcepath . ForwardingBuildTargetSourcePath forwardingSourcePath2 = com . facebook . buck . core . sourcepath . ForwardingBuildTargetSourcePath . of ( target , com . facebook . buck . core . sourcepath . PathSourcePath . of ( filesystem2 , relativePath ) ) ; hasher . putBuildTargetSourcePath ( forwardingSourcePath1 ) . putKey ( ".path1" ) ; hasher . putBuildTargetSourcePath ( forwardingSourcePath2 ) . putKey ( ".path2" ) ; hasher . setHashKey ( com . google . common . hash . HashCode . fromString ( "0fb14bd529a66e7f6299d9853f9e5f178c6e3866" ) ) ; hasher . hash ( ) ; hasher . flushToLogger ( ) ; logger . close ( ) ; com . facebook . buck . log . thrift . rulekeys . FullRuleKey ruleKey = getRuleKey ( ) ; "<AssertPlaceHolder>" ; } get ( com . facebook . buck . core . io . ArchiveMemberPath ) { throw new java . lang . AssertionError ( ) ; }
org . junit . Assert . assertEquals ( ruleKey . values . get ( ".path1" ) , ruleKey . values . get ( ".path2" ) )
testFile3 ( ) { eu . europa . esig . dss . DSSDocument dssDocument = new eu . europa . esig . dss . FileDocument ( "src/test/resources/plugtest/esig2014/ESIG-CAdES/DE_CRY/Signature-C-DE_CRY-4.p7m" ) ; eu . europa . esig . dss . cades . validation . CAdESSignature signature = new eu . europa . esig . dss . cades . validation . CAdESSignature ( eu . europa . esig . dss . utils . Utils . toByteArray ( dssDocument . openStream ( ) ) ) ; org . bouncycastle . cms . CMSSignedData cmsSignedData = signature . getCmsSignedData ( ) ; "<AssertPlaceHolder>" ; } getCmsSignedData ( ) { return cmsSignedData ; }
org . junit . Assert . assertNotNull ( cmsSignedData )
sumLong ( ) { super . sumLong ( ) ; com . gs . collections . api . bag . sorted . MutableSortedBag < java . lang . Integer > bag = this . newWith ( com . gs . collections . impl . block . factory . Comparators . reverseNaturalOrder ( ) , 1 , 1 , 2 , 3 , 4 , 5 ) ; "<AssertPlaceHolder>" ; } sumOfLong ( com . gs . collections . api . block . function . primitive . LongFunction ) { final long [ ] sum = new long [ ] { 0L } ; this . forEachWithOccurrences ( new com . gs . collections . api . block . procedure . primitive . ObjectIntProcedure < T > ( ) { public void value ( T each , int occurrences ) { long longValue = function . longValueOf ( each ) ; sum [ 0 ] += longValue * ( ( long ) ( occurrences ) ) ; } } ) ; return sum [ 0 ] ; }
org . junit . Assert . assertEquals ( 16 , bag . sumOfLong ( Integer :: longValue ) )
adapt_noRow ( ) { when ( mockBigtableResultScanner . next ( ) ) . thenReturn ( null ) ; org . apache . hadoop . hbase . client . ResultScanner scanner = adapter . adapt ( mockBigtableResultScanner , mockSpan ) ; "<AssertPlaceHolder>" ; verify ( mockBigtableResultScanner ) . next ( ) ; verifyZeroInteractions ( mockRowAdapter ) ; verify ( mockSpan , times ( 1 ) ) . end ( ) ; } next ( ) { if ( ! ( iterator . hasNext ( ) ) ) { return null ; } try ( com . google . cloud . bigtable . metrics . Timer . Context ignored = com . google . cloud . bigtable . grpc . scanner . RowResultScanner . resultsTimer . time ( ) ) { T result = iterator . next ( ) ; com . google . cloud . bigtable . grpc . scanner . RowResultScanner . resultsMeter . mark ( ) ; return result ; } catch ( java . lang . RuntimeException e ) { throw e ; } }
org . junit . Assert . assertNull ( scanner . next ( ) )
testComponensRegisteredWithClassKeyTakePrecedenceOverOthersWhenThereAreMultipleImplementations ( ) { com . picocontainer . DefaultPicoContainer pico = new com . picocontainer . DefaultPicoContainer ( ) ; pico . addComponent ( "default" , com . picocontainer . testmodel . SimpleTouchable . class ) ; pico . addComponent ( com . picocontainer . testmodel . Touchable . class , com . picocontainer . testmodel . DecoratedTouchable . class , new com . picocontainer . parameters . ComponentParameter ( "default" ) ) ; com . picocontainer . testmodel . Touchable touchable = pico . getComponent ( com . picocontainer . testmodel . Touchable . class ) ; "<AssertPlaceHolder>" ; } getComponent ( java . lang . Class ) { checkReadPermission ( ) ; return pico . getComponent ( componentType ) ; }
org . junit . Assert . assertEquals ( com . picocontainer . testmodel . DecoratedTouchable . class , touchable . getClass ( ) )
compute ( ) { final org . apache . commons . io . input . NullInputStream in = new org . apache . commons . io . input . NullInputStream ( 0L ) ; new ch . cyberduck . core . io . DisabledChecksumCompute ( ) . compute ( in , new ch . cyberduck . core . transfer . TransferStatus ( ) ) ; "<AssertPlaceHolder>" ; in . read ( ) ; } read ( ) { if ( ! ( buffer . hasRemaining ( ) ) ) { this . readNextChunk ( ) ; } return buffer . get ( ) ; }
org . junit . Assert . assertEquals ( ( - 1 ) , in . read ( ) )
testTestWhenTrue ( ) { org . apache . commons . functor . NullaryFunction < java . lang . Boolean > f = new org . apache . commons . functor . adapter . NullaryPredicateNullaryFunction ( org . apache . commons . functor . core . Constant . TRUE ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { return java . lang . Integer . valueOf ( ( ( count ) ++ ) ) ; }
org . junit . Assert . assertEquals ( Boolean . TRUE , f . evaluate ( ) )