input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testCoerceToNumber02 ( ) { java . lang . Object result = org . apache . el . lang . ELSupport . coerceToNumber ( null , ( ( java . lang . Object ) ( null ) ) , int . class ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { return org . apache . tomcat . util . net . jsse . openssl . Cipher . idMap . get ( java . lang . Integer . valueOf ( cipherId ) ) ; }
|
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 0 ) , result )
|
hasSpiesFromOtherThreads ( ) { try ( @ io . sniffy . SuppressWarnings ( "unused" ) io . sniffy . Spy spy = io . sniffy . Sniffy . spy ( ) ) { java . util . concurrent . atomic . AtomicBoolean hasSpies = new java . util . concurrent . atomic . AtomicBoolean ( ) ; java . lang . Thread thread = new java . lang . Thread ( ( ) -> hasSpies . set ( io . sniffy . Sniffy . hasSpies ( ) ) ) ; thread . start ( ) ; thread . join ( ) ; "<AssertPlaceHolder>" ; } } hasSpies ( ) { if ( ! ( io . sniffy . Sniffy . registeredSpies . isEmpty ( ) ) ) { java . util . Iterator < java . lang . ref . WeakReference < io . sniffy . Spy > > iterator = io . sniffy . Sniffy . registeredSpies . iterator ( ) ; while ( iterator . hasNext ( ) ) { java . lang . ref . WeakReference < io . sniffy . Spy > spyReference = iterator . next ( ) ; io . sniffy . Spy spy = spyReference . get ( ) ; if ( null == spy ) { iterator . remove ( ) ; } else { return true ; } } } java . lang . Long threadId = java . lang . Thread . currentThread ( ) . getId ( ) ; java . lang . ref . WeakReference < io . sniffy . CurrentThreadSpy > spyReference = io . sniffy . Sniffy . currentThreadSpies . get ( threadId ) ; if ( null != spyReference ) { io . sniffy . CurrentThreadSpy spy = spyReference . get ( ) ; if ( null == spy ) { io . sniffy . Sniffy . currentThreadSpies . remove ( threadId ) ; } else { return true ; } } return false ; }
|
org . junit . Assert . assertTrue ( hasSpies . get ( ) )
|
testGetPidStringOrNull_StringWithNonNumericPid ( ) { java . lang . Integer pid = com . hazelcast . simulator . utils . NativeUtils . getPidFromBeanString ( "test@localhost" ) ; "<AssertPlaceHolder>" ; } getPidFromBeanString ( java . lang . String ) { int indexOf = name . indexOf ( '@' ) ; if ( indexOf == ( - 1 ) ) { return null ; } java . lang . String pidString = name . substring ( 0 , indexOf ) ; try { return java . lang . Integer . parseInt ( pidString ) ; } catch ( java . lang . NumberFormatException e ) { com . hazelcast . simulator . utils . NativeUtils . LOGGER . warn ( e ) ; return null ; } }
|
org . junit . Assert . assertNull ( pid )
|
testReinitialize ( ) { conf = scheduler . getConfig ( ) ; try { reservationSystem . reinitialize ( conf , rmContext ) ; } catch ( org . apache . hadoop . yarn . exceptions . YarnException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } if ( getSchedulerType ( ) . equals ( SchedulerType . CAPACITY ) ) { org . apache . hadoop . yarn . server . resourcemanager . reservation . ReservationSystemTestUtil . validateReservationQueue ( reservationSystem , org . apache . hadoop . yarn . server . resourcemanager . reservation . ReservationSystemTestUtil . getReservationQueueName ( ) ) ; } else { org . apache . hadoop . yarn . server . resourcemanager . reservation . ReservationSystemTestUtil . validateReservationQueue ( reservationSystem , org . apache . hadoop . yarn . server . resourcemanager . reservation . ReservationSystemTestUtil . getFullReservationQueueName ( ) ) ; } java . lang . String newQ = "reservation" ; "<AssertPlaceHolder>" ; updateSchedulerConf ( conf , newQ ) ; try { scheduler . reinitialize ( conf , rmContext ) ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } try { reservationSystem . reinitialize ( conf , rmContext ) ; } catch ( org . apache . hadoop . yarn . exceptions . YarnException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } if ( getSchedulerType ( ) . equals ( SchedulerType . CAPACITY ) ) { org . apache . hadoop . yarn . server . resourcemanager . reservation . ReservationSystemTestUtil . validateReservationQueue ( reservationSystem , newQ ) ; } else { org . apache . hadoop . yarn . server . resourcemanager . reservation . ReservationSystemTestUtil . validateReservationQueue ( reservationSystem , ( "root." + newQ ) ) ; } } getPlan ( java . lang . String ) { readLock . lock ( ) ; try { return plans . get ( planName ) ; } finally { readLock . unlock ( ) ; } }
|
org . junit . Assert . assertNull ( reservationSystem . getPlan ( newQ ) )
|
testInstance ( ) { org . apache . tajo . datum . DateDatum d = org . apache . tajo . datum . DatumFactory . createDate ( org . apache . tajo . datum . TestDateDatum . DATE ) ; org . apache . tajo . datum . DateDatum copy = new org . apache . tajo . datum . DateDatum ( d . asInt4 ( ) ) ; "<AssertPlaceHolder>" ; } asInt4 ( ) { throw new org . apache . tajo . datum . exception . InvalidCastException ( ( ( type ) + "<sp>cannot<sp>be<sp>casted<sp>to<sp>INT<sp>type" ) ) ; }
|
org . junit . Assert . assertEquals ( d , copy )
|
onAddBlanks ( ) { org . sejda . model . parameter . MergeParameters parameters = defaultCommandLine ( ) . withFlag ( "--addBlanks" ) . invokeSejdaConsole ( ) ; "<AssertPlaceHolder>" ; } isBlankPageIfOdd ( ) { return blankPageIfOdd ; }
|
org . junit . Assert . assertTrue ( parameters . isBlankPageIfOdd ( ) )
|
testSizeIsZeroIfTreeEmpty ( ) { "<AssertPlaceHolder>" ; } create ( int , int ) { com . github . davidmoten . rtree3d . RTree < java . lang . Object , com . github . davidmoten . rtree3d . geometry . Box > tree = com . github . davidmoten . rtree3d . RTree . maxChildren ( maxChildren ) . create ( ) ; for ( int i = 1 ; i <= n ; i ++ ) tree = tree . add ( com . github . davidmoten . rtree3d . RTreeTest . e ( i ) ) ; return tree ; }
|
org . junit . Assert . assertEquals ( 0 , com . github . davidmoten . rtree3d . RTreeTest . create ( 3 , 0 ) . size ( ) )
|
shouldHaveStandardStringRepresentationForEdgeProperty ( ) { final org . apache . tinkerpop . gremlin . structure . Vertex v = graph . addVertex ( ) ; final org . apache . tinkerpop . gremlin . structure . Edge e = v . addEdge ( "self" , v , "short" , "s" ) ; final org . apache . tinkerpop . gremlin . structure . Property p = e . property ( "short" ) ; "<AssertPlaceHolder>" ; } propertyString ( org . apache . tinkerpop . gremlin . structure . Property ) { if ( property instanceof org . apache . tinkerpop . gremlin . structure . VertexProperty ) { if ( ! ( property . isPresent ( ) ) ) return org . apache . tinkerpop . gremlin . structure . util . StringFactory . EMPTY_VERTEX_PROPERTY ; final java . lang . String valueString = java . lang . String . valueOf ( property . value ( ) ) ; return ( ( ( ( ( org . apache . tinkerpop . gremlin . structure . util . StringFactory . VP ) + ( org . apache . tinkerpop . gremlin . structure . util . StringFactory . L_BRACKET ) ) + ( property . key ( ) ) ) + ( org . apache . tinkerpop . gremlin . structure . util . StringFactory . ARROW ) ) + ( org . apache . commons . lang3 . StringUtils . abbreviate ( valueString , 20 ) ) ) + ( org . apache . tinkerpop . gremlin . structure . util . StringFactory . R_BRACKET ) ; } else { if ( ! ( property . isPresent ( ) ) ) return org . apache . tinkerpop . gremlin . structure . util . StringFactory . EMPTY_PROPERTY ; final java . lang . String valueString = java . lang . String . valueOf ( property . value ( ) ) ; return ( ( ( ( ( org . apache . tinkerpop . gremlin . structure . util . StringFactory . P ) + ( org . apache . tinkerpop . gremlin . structure . util . StringFactory . L_BRACKET ) ) + ( property . key ( ) ) ) + ( org . apache . tinkerpop . gremlin . structure . util . StringFactory . ARROW ) ) + ( org . apache . commons . lang3 . StringUtils . abbreviate ( valueString , 20 ) ) ) + ( org . apache . tinkerpop . gremlin . structure . util . StringFactory . R_BRACKET ) ; } }
|
org . junit . Assert . assertEquals ( org . apache . tinkerpop . gremlin . structure . util . StringFactory . propertyString ( p ) , p . toString ( ) )
|
testSerialization2 ( ) { org . jfree . chart . plot . dial . DialPointer i1 = new org . jfree . chart . plot . dial . DialPointer . Pointer ( 1 ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( i1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . plot . dial . DialPointer i2 = ( ( org . jfree . chart . plot . dial . DialPointer ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
|
org . junit . Assert . assertEquals ( i1 , i2 )
|
getGroups ( ) { java . lang . String group = "group1" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . core . fat . InvalidBaseEntryInRealmTest . c , "getGroups" , "No<sp>valid<sp>participating<sp>base<sp>entries..." ) ; "<AssertPlaceHolder>" ; } getGroups ( java . lang . String , int ) { com . ibm . ws . security . registry . SearchResult result = null ; java . util . regex . Pattern p = java . util . regex . Pattern . compile ( pattern ) ; java . util . regex . Matcher m = p . matcher ( "testGroup" ) ; if ( m . matches ( ) ) { java . util . ArrayList < java . lang . String > list = new java . util . ArrayList < java . lang . String > ( ) ; list . add ( "testUser" ) ; result = new com . ibm . ws . security . registry . SearchResult ( list , true ) ; } else { java . util . ArrayList < java . lang . String > list = new java . util . ArrayList < java . lang . String > ( ) ; result = new com . ibm . ws . security . registry . SearchResult ( list , false ) ; } return result ; }
|
org . junit . Assert . assertNotNull ( com . ibm . ws . security . wim . core . fat . InvalidBaseEntryInRealmTest . servlet . getGroups ( group , 2 ) )
|
testClientArea ( ) { group . setText ( "This<sp>is<sp>a<sp>very<sp>long<sp>group<sp>title." ) ; group . setSize ( 100 , 100 ) ; group . setLayout ( new org . eclipse . swt . layout . FillLayout ( org . eclipse . swt . SWT . VERTICAL ) ) ; new org . eclipse . swt . widgets . Button ( group , org . eclipse . swt . SWT . RADIO ) . setText ( "Radio<sp>1" ) ; new org . eclipse . swt . widgets . Button ( group , org . eclipse . swt . SWT . RADIO ) . setText ( "Radio<sp>2" ) ; org . eclipse . swt . graphics . Rectangle expected = new org . eclipse . swt . graphics . Rectangle ( 19 , 36 , 62 , 45 ) ; "<AssertPlaceHolder>" ; } getClientArea ( ) { return clientComposite . getClientArea ( ) ; }
|
org . junit . Assert . assertEquals ( expected , group . getClientArea ( ) )
|
testBuildReportChunkSuccessfull5 ( ) { dchunk . setContent ( thdata ) ; instance . buildReportChunk ( dchunk , doc , false ) ; java . util . ArrayList < java . lang . Object [ ] > events = docListener . getCapturedEvents ( ) ; "<AssertPlaceHolder>" ; java . lang . Object [ ] event = events . get ( 0 ) ; confirmPdfPTableAdded ( event , thdata ) ; } getCapturedEvents ( ) { return capturedEvents ; }
|
org . junit . Assert . assertTrue ( ( ( events . size ( ) ) == 1 ) )
|
CEFactoryWhenCodeNull ( ) { java . lang . String code = null ; org . hl7 . v3 . CE ce = new org . hl7 . v3 . CE ( ) ; gov . hhs . fha . nhinc . transform . subdisc . HL7DataTransformHelper helper = new gov . hhs . fha . nhinc . transform . subdisc . HL7DataTransformHelper ( ) ; ce = helper . CEFactory ( code ) ; "<AssertPlaceHolder>" ; } CEFactory ( java . lang . String ) { org . hl7 . v3 . CE ce = new org . hl7 . v3 . CE ( ) ; if ( gov . hhs . fha . nhinc . nhinclib . NullChecker . isNotNullish ( code ) ) { gov . hhs . fha . nhinc . transform . subdisc . HL7DataTransformHelper . LOG . debug ( "Setting<sp>the<sp>code<sp>attribute<sp>of<sp>CE<sp>--><sp>code<sp>is<sp>not<sp>null" ) ; ce . setCode ( code ) ; } return ce ; }
|
org . junit . Assert . assertNull ( ce . getCode ( ) )
|
givenWeakHashMap_whenCacheValueThatHasNoReferenceToIt_GCShouldReclaimThatObject ( ) { java . util . WeakHashMap < com . baeldung . weakhashmap . WeakHashMapUnitTest . UniqueImageName , com . baeldung . weakhashmap . WeakHashMapUnitTest . BigImage > map = new java . util . WeakHashMap ( ) ; com . baeldung . weakhashmap . WeakHashMapUnitTest . BigImage bigImage = new com . baeldung . weakhashmap . WeakHashMapUnitTest . BigImage ( "image_id" ) ; com . baeldung . weakhashmap . WeakHashMapUnitTest . UniqueImageName imageName = new com . baeldung . weakhashmap . WeakHashMapUnitTest . UniqueImageName ( "name_of_big_image" ) ; map . put ( imageName , bigImage ) ; "<AssertPlaceHolder>" ; imageName = null ; java . lang . System . gc ( ) ; await ( ) . atMost ( 10 , TimeUnit . SECONDS ) . until ( map :: isEmpty ) ; } containsKey ( java . lang . String ) { try { readLock . lock ( ) ; return com . baeldung . concurrent . locks . SynchronizedHashMapWithRWLock . syncHashMap . containsKey ( key ) ; } finally { readLock . unlock ( ) ; } }
|
org . junit . Assert . assertTrue ( map . containsKey ( imageName ) )
|
testEmpty ( ) { org . apache . crunch . types . writable . GenericArrayWritable src = new org . apache . crunch . types . writable . GenericArrayWritable ( ) ; src . set ( new org . apache . hadoop . io . BytesWritable [ 0 ] ) ; org . apache . crunch . types . writable . GenericArrayWritable dest = org . apache . crunch . test . Tests . roundtrip ( src , new org . apache . crunch . types . writable . GenericArrayWritable ( ) ) ; "<AssertPlaceHolder>" ; } get ( ) { return values ; }
|
org . junit . Assert . assertThat ( dest . get ( ) . length , org . hamcrest . Matchers . is ( 0 ) )
|
test_shortArray ( ) { short [ ] data = new short [ ] { 37 , 39 , 12 } ; com . alibaba . dubbo . common . serialize . ObjectOutput objectOutput = serialization . serialize ( url , byteArrayOutputStream ) ; objectOutput . writeObject ( data ) ; objectOutput . flushBuffer ( ) ; java . io . ByteArrayInputStream byteArrayInputStream = new java . io . ByteArrayInputStream ( byteArrayOutputStream . toByteArray ( ) ) ; com . alibaba . dubbo . common . serialize . ObjectInput deserialize = serialization . deserialize ( url , byteArrayInputStream ) ; "<AssertPlaceHolder>" ; try { deserialize . readObject ( ) ; org . junit . Assert . fail ( ) ; } catch ( java . io . IOException expected ) { } } readObject ( ) { java . lang . String desc ; byte b = read0 ( ) ; switch ( b ) { case OBJECT_NULL : return null ; case OBJECT_DUMMY : return new java . lang . Object ( ) ; case OBJECT_DESC : { desc = readUTF ( ) ; break ; } case OBJECT_DESC_ID : { int index = readUInt ( ) ; desc = mMapper . getDescriptor ( index ) ; if ( desc == null ) throw new java . io . IOException ( ( "Can<sp>not<sp>find<sp>desc<sp>id:<sp>" + index ) ) ; break ; } default : throw new java . io . IOException ( ( "Flag<sp>error,<sp>expect<sp>OBJECT_NULL|OBJECT_DUMMY|OBJECT_DESC|OBJECT_DESC_ID,<sp>get<sp>" + b ) ) ; } try { java . lang . Class < ? > c = com . alibaba . dubbo . common . utils . ReflectUtils . desc2class ( desc ) ; return com . alibaba . dubbo . common . serialize . support . dubbo . Builder . register ( c ) . parseFrom ( this ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . io . IOException ( ( "Read<sp>object<sp>failed,<sp>class<sp>not<sp>found.<sp>" + ( com . alibaba . dubbo . common . utils . StringUtils . toString ( e ) ) ) ) ; } }
|
org . junit . Assert . assertArrayEquals ( data , ( ( short [ ] ) ( deserialize . readObject ( ) ) ) )
|
buildConfigurationDebug ( ) { com . sap . prd . mobile . ios . mios . xcodeprojreader . BuildConfiguration conf = configList . getBuildConfigurations ( ) . getByName ( "Debug" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return getDict ( ) . getString ( "name" ) ; }
|
org . junit . Assert . assertEquals ( "Debug" , conf . getName ( ) )
|
testIsMatching_allTrue ( ) { org . deegree . gml . reference . matcher . MultipleReferencePatternMatcher matcher = new org . deegree . gml . reference . matcher . MultipleReferencePatternMatcher ( ) ; matcher . addMatcherToApply ( mockMatcher ( true ) ) ; matcher . addMatcherToApply ( mockMatcher ( true ) ) ; "<AssertPlaceHolder>" ; } isMatching ( java . lang . String ) { for ( org . deegree . gml . reference . matcher . ReferencePatternMatcher matcherToApply : matchersToApply ) { if ( matcherToApply . isMatching ( url ) ) return true ; } return false ; }
|
org . junit . Assert . assertThat ( matcher . isMatching ( "test" ) , org . hamcrest . CoreMatchers . is ( true ) )
|
testNoEndpointCredentialsSyncRequest ( ) { org . kaaproject . kaa . server . transport . channel . ChannelContext channelContextMock = org . mockito . Mockito . mock ( org . kaaproject . kaa . server . transport . channel . ChannelContext . class ) ; org . kaaproject . kaa . common . endpoint . gen . SyncRequest request = new org . kaaproject . kaa . common . endpoint . gen . SyncRequest ( ) ; request . setRequestId ( org . kaaproject . kaa . server . operations . service . akka . DefaultAkkaServiceTest . REQUEST_ID ) ; org . kaaproject . kaa . common . endpoint . gen . SyncRequestMetaData md = new org . kaaproject . kaa . common . endpoint . gen . SyncRequestMetaData ( ) ; md . setSdkToken ( org . kaaproject . kaa . server . operations . service . akka . DefaultAkkaServiceTest . SDK_TOKEN ) ; md . setEndpointPublicKeyHash ( clientPublicKeyHash ) ; md . setProfileHash ( clientPublicKeyHash ) ; request . setSyncRequestMetaData ( md ) ; org . kaaproject . kaa . server . operations . pojo . SyncContext holder = simpleResponse ; org . mockito . Mockito . when ( cacheService . getEndpointKey ( org . kaaproject . kaa . common . hash . EndpointObjectHash . fromBytes ( clientPublicKeyHash . array ( ) ) ) ) . thenReturn ( clientPair . getPublic ( ) ) ; whenSync ( holder ) ; org . kaaproject . kaa . server . transport . message . MessageBuilder responseBuilder = org . mockito . Mockito . mock ( org . kaaproject . kaa . server . transport . message . MessageBuilder . class ) ; org . kaaproject . kaa . server . transport . message . ErrorBuilder errorBuilder = org . mockito . Mockito . mock ( org . kaaproject . kaa . server . transport . message . ErrorBuilder . class ) ; org . mockito . Mockito . when ( registrationService . findEndpointRegistrationByCredentialsId ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( java . util . Optional . ofNullable ( ( ( org . kaaproject . kaa . common . dto . credentials . EndpointRegistrationDto ) ( null ) ) ) ) ; org . kaaproject . kaa . server . transport . message . SessionInitMessage message = toSignedRequest ( java . util . UUID . randomUUID ( ) , ChannelType . SYNC , channelContextMock , request , responseBuilder , errorBuilder ) ; "<AssertPlaceHolder>" ; akkaService . process ( message ) ; org . mockito . Mockito . verify ( errorBuilder , org . mockito . Mockito . timeout ( org . kaaproject . kaa . server . operations . service . akka . DefaultAkkaServiceTest . TIMEOUT ) . atLeastOnce ( ) ) . build ( org . mockito . Mockito . any ( org . kaaproject . kaa . server . transport . EndpointVerificationException . class ) ) ; } getActorSystem ( ) { return akka ; }
|
org . junit . Assert . assertNotNull ( akkaService . getActorSystem ( ) )
|
testParseFirstTokenInValidObjType ( ) { pcgen . core . system . MigrationRule migrationRule = migrationLoader . parseFirstToken ( "FOO:Old<sp>Key" , "" , sourceURI ) ; "<AssertPlaceHolder>" ; } parseFirstToken ( java . lang . String , java . lang . String , java . net . URI ) { final int idxColon = firstToken . indexOf ( ':' ) ; if ( ( idxColon <= 0 ) || ( idxColon == ( ( firstToken . length ( ) ) - 1 ) ) ) { pcgen . util . Logging . errorPrint ( ( ( ( "Illegal<sp>migration<sp>rule<sp>'" + lstLine ) + "'<sp>in<sp>" ) + ( sourceURI . toString ( ) ) ) ) ; return null ; } java . lang . String objTypeKey = "" ; try { objTypeKey = firstToken . substring ( 0 , idxColon ) ; } catch ( java . lang . StringIndexOutOfBoundsException e ) { throw new pcgen . base . lang . UnreachableError ( e ) ; } pcgen . core . system . MigrationRule . ObjectType objType ; try { objType = pcgen . core . system . MigrationRule . ObjectType . valueOf ( objTypeKey ) ; } catch ( java . lang . IllegalArgumentException e ) { pcgen . util . Logging . errorPrint ( ( ( ( "Unknown<sp>object<sp>type<sp>for<sp>migration<sp>rule<sp>'" + lstLine ) + "'<sp>in<sp>" ) + ( sourceURI . toString ( ) ) ) ) ; return null ; } java . lang . String key = "" ; try { key = firstToken . substring ( ( idxColon + 1 ) ) ; } catch ( java . lang . StringIndexOutOfBoundsException e ) { throw new pcgen . base . lang . UnreachableError ( e ) ; } pcgen . core . system . MigrationRule rule ; if ( objType . isCategorized ( ) ) { if ( key . endsWith ( "|" ) ) { pcgen . util . Logging . errorPrint ( ( ( ( ( ( "Invalid<sp>category|key<sp>of<sp>'" + firstToken ) + "'<sp>of<sp>migration<sp>rule<sp>'" ) + lstLine ) + "'<sp>in<sp>" ) + ( sourceURI . toString ( ) ) ) ) ; return null ; } java . lang . String [ ] keyParts = key . split ( "\\|" ) ; if ( ( keyParts . length ) < 2 ) { pcgen . util . Logging . errorPrint ( ( ( ( ( ( "Missing<sp>category<sp>in<sp>'" + firstToken ) + "'<sp>of<sp>migration<sp>rule<sp>'" ) + lstLine ) + "'<sp>in<sp>" ) + ( sourceURI . toString ( ) ) ) ) ; return null ; } if ( ( keyParts . length ) > 2 ) { pcgen . util . Logging . errorPrint ( ( ( ( ( ( "Invalid<sp>category|key<sp>of<sp>'" + firstToken ) + "'<sp>of<sp>migration<sp>rule<sp>'" ) + lstLine ) + "'<sp>in<sp>" ) + ( sourceURI . toString ( ) ) ) ) ; return null ; } if ( ( org . apache . commons . lang . StringUtils . isBlank ( keyParts [ 0 ] ) ) || ( keyParts [ 0 ] . matches ( invalidKeyPattern ) ) ) { pcgen . util . Logging . errorPrint ( ( ( ( ( ( "Invalid<sp>category<sp>of<sp>'" + ( keyParts [ 0 ] ) ) + "'<sp>of<sp>migration<sp>rule<sp>'" ) + lstLine ) + "'<sp>in<sp>" ) + ( sourceURI . toString ( ) ) ) ) ; return null ; } if ( ( org . apache . commons . lang . StringUtils . isBlank ( keyParts [ 1 ] ) ) || ( keyParts [ 1 ] . matches ( invalidKeyPattern ) ) ) { pcgen . util . Logging . errorPrint ( ( ( ( ( ( "Invalid<sp>category<sp>of<sp>'" 0 + ( keyParts [ 1 ] ) ) + "'<sp>of<sp>migration<sp>rule<sp>'" ) + lstLine ) + "'<sp>in<sp>" ) + ( sourceURI . toString ( ) ) ) ) ; return null ; } rule = new pcgen . core . system . MigrationRule ( objType , keyParts [ 0 ] , keyParts [ 1 ] ) ; } else { java . lang . String invalidKeyPat = ( objType == ( pcgen . core . system . MigrationRule . ObjectType . SOURCE ) ) ? invalidSourceKeyPattern : invalidKeyPattern ; if ( ( org . apache . commons . lang . StringUtils . isBlank ( key ) ) || ( key . matches ( invalidKeyPat ) ) ) { pcgen . util . Logging . errorPrint ( ( ( ( ( ( "Invalid<sp>category<sp>of<sp>'" 0 + key ) + "'<sp>of<sp>migration<sp>rule<sp>'" ) + lstLine ) + "'<sp>in<sp>" ) + ( sourceURI . toString ( ) ) ) ) ; return null ; } rule = new pcgen . core . system . MigrationRule ( objType , key ) ; } return rule ; }
|
org . junit . Assert . assertNull ( migrationRule )
|
testSanitizeNullInputAllowed ( ) { uit . setAllowNull ( true ) ; java . util . Date vDate = uit . sanitize ( contextStr , null ) ; "<AssertPlaceHolder>" ; } sanitize ( java . lang . String , java . lang . String ) { java . lang . Double toReturn = java . lang . Double . valueOf ( 0 ) ; try { toReturn = safelyParse ( context , input ) ; } catch ( org . owasp . esapi . errors . ValidationException e ) { } return toReturn ; }
|
org . junit . Assert . assertNull ( vDate )
|
givenText_whenSimpleRegexMatchesTwice_thenCorrect ( ) { java . util . regex . Pattern pattern = java . util . regex . Pattern . compile ( "foo" ) ; java . util . regex . Matcher matcher = pattern . matcher ( "foofoo" ) ; int matches = 0 ; while ( matcher . find ( ) ) matches ++ ; "<AssertPlaceHolder>" ; } find ( ) { com . baeldung . jpa . entitygraph . model . Post post = com . baeldung . jpa . entitygraph . repo . PostRepositoryIntegrationTest . postRepository . find ( 1L ) ; org . junit . Assert . assertNotNull ( post . getUser ( ) ) ; java . lang . String email = post . getUser ( ) . getEmail ( ) ; org . junit . Assert . assertNull ( email ) ; }
|
org . junit . Assert . assertEquals ( matches , 2 )
|
testGetAlarmOK ( ) { com . vsct . supervision . seyren . api . Alarm alarm = repository . getAlarm ( TestUtils . DEFAULT_ALARM_ID ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
|
org . junit . Assert . assertEquals ( TestUtils . DEFAULT_ALARM_ID , alarm . getId ( ) )
|
gpErrorDistanceTest ( ) { org . geosdi . geoplatform . support . google . services . DistanceMatrix distanceMatrix = this . gpDistanceMatrixService . getDistanceMatrix ( new java . lang . String [ ] { "sdfjhdsjf" } , new java . lang . String [ ] { "sdfihdsf" } ) . mode ( TravelMode . DRIVING ) . language ( "it" ) . await ( ) ; "<AssertPlaceHolder>" ; org . geosdi . geoplatform . support . google . services . DistanceMatrixRow distanceMatrixRow = distanceMatrix . rows [ 0 ] ; org . geosdi . geoplatform . support . google . services . DistanceMatrixElement element = distanceMatrixRow . elements [ 0 ] ; org . geosdi . geoplatform . support . google . services . GPDistanceMatrixServiceTest . logger . info ( "######################ERROR<sp>Status<sp>:<sp>{}\n" , element . status ) ; } getDistanceMatrix ( java . lang . String [ ] , java . lang . String [ ] ) { return com . google . maps . DistanceMatrixApi . getDistanceMatrix ( this . geoApiContext , origins , destinations ) ; }
|
org . junit . Assert . assertNotNull ( distanceMatrix )
|
clearTest ( ) { edu . kit . aifb . cumulus . store . PersistentSetTest . CLASS_UNDER_TEST . clear ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _map . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( edu . kit . aifb . cumulus . store . PersistentSetTest . CLASS_UNDER_TEST . isEmpty ( ) )
|
testCrotchShouldReturnFieldNameOfMostRecentSibling ( ) { org . springframework . data . solr . core . query . Criteria c1 = new org . springframework . data . solr . core . query . Criteria ( "field_1" ) . startsWith ( "start" ) . endsWith ( "end" ) ; org . springframework . data . solr . core . query . Criteria c2 = new org . springframework . data . solr . core . query . Criteria ( "field_2" ) . startsWith ( "2start" ) ; org . springframework . data . solr . core . query . Crotch crotch = c1 . or ( c2 ) ; "<AssertPlaceHolder>" ; } getField ( ) { return this . field ; }
|
org . junit . Assert . assertThat ( crotch . getField ( ) . getName ( ) , org . hamcrest . core . Is . is ( "field_2" ) )
|
validate_shouldPassValidationIfAllRequiredValuesAreSet ( ) { alert . setText ( "Alert<sp>Text" ) ; validator . validate ( alert , errors ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return erroneous ; }
|
org . junit . Assert . assertFalse ( errors . hasErrors ( ) )
|
test_incrementAndGetVerwerkKlaarTaken ( ) { final nl . bzk . brp . service . selectie . lezer . status . SelectieJobRunStatus selectieJobRunStatus = new nl . bzk . brp . service . selectie . lezer . status . SelectieJobRunStatus ( ) ; "<AssertPlaceHolder>" ; } incrementEnGetVerwerkKlaarTaken ( ) { return verwerkKlaarTaken . incrementAndGet ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , selectieJobRunStatus . incrementEnGetVerwerkKlaarTaken ( ) )
|
testSlowAppend ( ) { org . apache . hadoop . hbase . regionserver . wal . MetricsWALSource source = new org . apache . hadoop . hbase . regionserver . wal . MetricsWALSourceImpl ( ) ; org . apache . hadoop . hbase . regionserver . wal . MetricsWAL metricsWAL = new org . apache . hadoop . hbase . regionserver . wal . MetricsWAL ( source ) ; metricsWAL . postAppend ( 1 , 900 , null , null ) ; metricsWAL . postAppend ( 1 , 1010 , null , null ) ; metricsWAL . postAppend ( 1 , 2000 , null , null ) ; "<AssertPlaceHolder>" ; } getSlowAppendCount ( ) { return slowAppendCount . value ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , source . getSlowAppendCount ( ) )
|
testMapWithGroupKeyAndOptionalListValue ( ) { java . util . List < org . apache . parquet . schema . Type > typeList = new java . util . ArrayList < org . apache . parquet . schema . Type > ( ) ; typeList . add ( new org . apache . parquet . schema . GroupType ( REQUIRED , "key" , new org . apache . parquet . schema . PrimitiveType ( REQUIRED , INT64 , "first" ) ) ) ; typeList . add ( new org . apache . parquet . schema . GroupType ( OPTIONAL , "value" , org . apache . parquet . schema . OriginalType . OriginalType . LIST , new org . apache . parquet . schema . GroupType ( REPEATED , "list" , new org . apache . parquet . schema . PrimitiveType ( OPTIONAL , INT64 , "element" ) ) ) ) ; org . apache . parquet . schema . GroupType map = new org . apache . parquet . schema . GroupType ( OPTIONAL , "myMap" , org . apache . parquet . schema . OriginalType . OriginalType . MAP , new org . apache . parquet . schema . GroupType ( REPEATED , "map" , typeList ) ) ; org . apache . parquet . schema . MessageType expected = new org . apache . parquet . schema . MessageType ( "mapParent" , map ) ; org . apache . parquet . schema . GroupType actual = org . apache . parquet . schema . Types . buildMessage ( ) . optionalMap ( ) . groupKey ( ) . required ( org . apache . parquet . schema . INT64 ) . named ( "first" ) . optionalListValue ( ) . optionalElement ( org . apache . parquet . schema . INT64 ) . named ( "myMap" ) . named ( "mapParent" ) ; "<AssertPlaceHolder>" ; } add ( long , long , long , java . util . Collection , org . apache . parquet . column . statistics . Statistics ) { ++ ( blocks ) ; valueCountStats . add ( valueCount ) ; allStats . add ( size ) ; uncStats . add ( uncSize ) ; this . encodings . addAll ( encodings ) ; this . colValuesStats = colValuesStats ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testWithIgnoreTrailingWhitespaces ( ) { final com . orangesignal . csv . CsvConfig cfg = new com . orangesignal . csv . CsvConfig ( ) ; cfg . withIgnoreTrailingWhitespaces ( true ) ; "<AssertPlaceHolder>" ; } isIgnoreTrailingWhitespaces ( ) { return ignoreTrailingWhitespaces ; }
|
org . junit . Assert . assertThat ( cfg . isIgnoreTrailingWhitespaces ( ) , org . hamcrest . core . Is . is ( true ) )
|
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . sharing . model . SharingEntry . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . eq ( "sharingEntryId" , com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ) ; java . util . List < com . liferay . sharing . model . SharingEntry > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
|
testCreateResourceRequestProcessor ( ) { com . webpagebytes . cms . engine . BaseRequestProcessorFactory processorFactory = new com . webpagebytes . cms . engine . BaseRequestProcessorFactory ( ) ; com . webpagebytes . cms . engine . ResourceRequestProcessor processor = processorFactory . createResourceRequestProcessor ( ) ; "<AssertPlaceHolder>" ; } createResourceRequestProcessor ( ) { return new com . webpagebytes . cms . engine . ResourceRequestProcessor ( ) ; }
|
org . junit . Assert . assertTrue ( ( processor != null ) )
|
treeAwareUpdates6 ( ) { final java . lang . String doc = "<a><b<sp>id='1'/></a>" ; final org . basex . query . up . AtomicUpdateCache auc = org . basex . query . up . AtomicUpdatesTest . atomics ( doc ) ; auc . addDelete ( 3 ) ; auc . addRename ( 3 , token ( "idx" ) , org . basex . query . up . EMPTY ) ; "<AssertPlaceHolder>" ; } updatesSize ( ) { flush ( ) ; return ( struct . size ( ) ) + ( val . size ( ) ) ; }
|
org . junit . Assert . assertEquals ( 1 , auc . updatesSize ( ) )
|
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . specoffer . SpecOfferBenefit context = new org . lnu . is . domain . specoffer . SpecOfferBenefit ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>SpecOfferBenefit<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . specoffer . SpecOfferBenefit > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
isDifferentOrAndTwoEqualsWorking ( ) { final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityOne<sp>r<sp>where<sp>r.id<sp>=<sp>1<sp>and<sp>r.stringAttribute<sp>=<sp>'Just<sp>a<sp>String<sp>02'<sp>" + "<sp>and<sp>(r.longAttributeOne<sp>=<sp>33<sp>or<sp>r.longAttributeTwo<sp>=<sp>-30)" ; final java . util . List < com . uaihebert . model . test . RegularEntityOne > resultFromJPQL = jpqlHelper . getListFromJPQL ( query , com . uaihebert . model . test . RegularEntityOne . class ) ; "<AssertPlaceHolder>" ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityOne > uaiCriteria = createCriteria ( com . uaihebert . model . test . RegularEntityOne . class ) ; uaiCriteria . andEquals ( "id" , 1 ) . andEquals ( "stringAttribute" , "Just<sp>a<sp>String<sp>02" ) ; uaiCriteria . orEquals ( "longAttributeOne" , 33L ) . orEquals ( "longAttributeTwo" , ( - 30 ) ) ; validateTestLists ( resultFromJPQL , uaiCriteria . getResultList ( ) ) ; } getListFromJPQL ( java . lang . String , java . lang . Class ) { return getListFromJPQL ( query , classToUse , null ) ; }
|
org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) == 1 ) )
|
renderConfluencePage_asciiDocWithJavaSourceListing_returnsConfluencePageContentWithMacroWithNameCodeAndParameterJava ( ) { java . lang . String adocContent = "[source,java]\n" + ( ( "----\n" + "import<sp>java.util.List;\n" ) + "----" ) ; org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePage asciiDocConfluencePage = org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePage . newAsciidocConfluencePage ( asciidocPage ( org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePageTest . prependTitle ( adocContent ) ) , org . sahli . asciidoc . confluence . publisher . converter . UTF_8 , org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePageTest . TEMPLATES_FOLDER , org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePageTest . dummyAssetsTargetPath ( ) ) ; java . lang . String expectedContent = "<ac:structured-macro<sp>ac:name=\"code\">" + ( ( "<ac:parameter<sp>ac:name=\"language\">java</ac:parameter>" + "<ac:plain-text-body><![CDATA[import<sp>java.util.List;]]></ac:plain-text-body>" ) + "</ac:structured-macro>" ) ; "<AssertPlaceHolder>" ; } content ( ) { return this . htmlContent ; }
|
org . junit . Assert . assertThat ( asciiDocConfluencePage . content ( ) , org . hamcrest . Matchers . is ( expectedContent ) )
|
addToIndex ( ) { "<AssertPlaceHolder>" ; } addToIndex ( org . springframework . jdbc . core . JdbcTemplate , net . ripe . db . whois . common . dao . RpslObjectInfo , net . ripe . db . whois . common . rpsl . RpslObject , java . lang . String ) { final net . ripe . db . whois . common . dao . jdbc . index . IndexStrategy referenceStrategy = net . ripe . db . whois . common . dao . jdbc . index . IndexStrategies . get ( getReferenceAttribute ( object . getType ( ) ) ) ; final net . ripe . db . whois . common . dao . RpslObjectInfo reference = uniqueResult ( referenceStrategy . findInIndex ( jdbcTemplate , value ) ) ; if ( reference == null ) { throw new java . lang . IllegalArgumentException ( ( "Referenced<sp>object<sp>does<sp>not<sp>exist:<sp>" + value ) ) ; } return addToIndex ( jdbcTemplate , objectInfo , reference ) ; }
|
org . junit . Assert . assertThat ( subject . addToIndex ( null , null , null , ( ( java . lang . String ) ( null ) ) ) , org . hamcrest . Matchers . is ( 1 ) )
|
deveObterStatusComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . NFProtocoloInfo protocoloInfo = new com . fincatto . documentofiscal . nfe400 . classes . NFProtocoloInfo ( ) ; final java . lang . String status = "100" ; protocoloInfo . setStatus ( status ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return this . status ; }
|
org . junit . Assert . assertEquals ( status , protocoloInfo . getStatus ( ) )
|
testEmpty ( ) { when ( stack . isEmpty ( ) ) . thenReturn ( true ) ; boolean empty = tested . isEmpty ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return dayTimeValues ( ) . allMatch ( this :: isNone ) ; }
|
org . junit . Assert . assertTrue ( empty )
|
testRotatedPage2 ( ) { byte [ ] bytes = createSimplePdf ( PageSize . LETTER . rotate ( ) . rotate ( ) , "A\nB\nC\nD" ) ; com . itextpdf . text . pdf . PdfReader r = new com . itextpdf . text . pdf . PdfReader ( bytes ) ; java . lang . String text = com . itextpdf . text . pdf . parser . PdfTextExtractor . getTextFromPage ( r , 1 , createRenderListenerForTest ( ) ) ; "<AssertPlaceHolder>" ; } createRenderListenerForTest ( ) { return new com . itextpdf . text . pdf . parser . LocationTextExtractionStrategy ( ) ; }
|
org . junit . Assert . assertEquals ( "A\nB\nC\nD" , text )
|
insert_scatter_chart ( ) { int widgetSize = jq ( ".zswidget" ) . length ( ) ; click ( ".zstab-insertPanel" ) ; int tRow = 11 ; int lCol = 5 ; int bRow = 13 ; int rCol = 6 ; spreadsheet . setSelection ( tRow , lCol , bRow , rCol ) ; click ( ".zstbtn-scatterChart" ) ; "<AssertPlaceHolder>" ; } jq ( java . lang . String ) { return jqFactory . create ( ( ( "'" + selector ) + "'" ) ) ; }
|
org . junit . Assert . assertEquals ( ( widgetSize + 1 ) , jq ( ".zswidget" ) . length ( ) )
|
testSocksProxy ( ) { net . dongliu . requests . RawResponse response = net . dongliu . requests . Requests . get ( "https://www.google.com" ) . proxy ( net . dongliu . requests . Proxies . socksProxy ( "127.0.0.1" , 1080 ) ) . send ( ) ; response . close ( ) ; "<AssertPlaceHolder>" ; } statusCode ( ) { return statusCode ; }
|
org . junit . Assert . assertEquals ( 200 , response . statusCode ( ) )
|
shouldGetAllResultsOfInterest ( ) { _session . addExpectation ( "no<sp>expected<sp>found" , "bundle" , "blah<sp>blah<sp>blah" , 5 ) ; _testDoc2 . setExpectedStatus ( true ) ; _session . addExpectation ( "expected<sp>is<sp>second" , "bundle" , _testDoc2 . getUrl ( ) , _testDoc2 . getDesiredAtLeastRank ( ) ) ; _session . addExpectation ( "expected<sp>is<sp>first" , "bundle" , _testDoc1 . getUrl ( ) , _testDoc1 . getDesiredAtLeastRank ( ) ) ; _session . searchVelocity ( _mock ) ; java . util . List < com . ibm . wex . relevancyprofiler . VelocityDocument > results = _session . getAllResults ( ) ; "<AssertPlaceHolder>" ; } getAllResults ( ) { java . util . List < com . ibm . wex . relevancyprofiler . VelocityDocument > documents = new java . util . ArrayList < com . ibm . wex . relevancyprofiler . VelocityDocument > ( ) ; for ( com . ibm . wex . relevancyprofiler . VelocityQuery q : _querySet ) { documents . addAll ( q . getResults ( ) ) ; for ( com . ibm . wex . relevancyprofiler . Expectation doc : q . getMissingExpectations ( ) ) { documents . add ( new com . ibm . wex . relevancyprofiler . VelocityDocument ( doc . getUrl ( ) , true , doc . getDesiredHighestRank ( ) ) ) ; } } java . util . Collections . sort ( documents , new java . util . Comparator < com . ibm . wex . relevancyprofiler . VelocityDocument > ( ) { public int compare ( com . ibm . wex . relevancyprofiler . VelocityDocument x , com . ibm . wex . relevancyprofiler . VelocityDocument y ) { return x . toString ( ) . compareTo ( y . toString ( ) ) ; } } ) ; return documents ; }
|
org . junit . Assert . assertEquals ( 5 , results . size ( ) )
|
testAllSettings ( ) { com . google . firebase . auth . ActionCodeSettings settings = com . google . firebase . auth . ActionCodeSettings . builder ( ) . setUrl ( "https://example.com" ) . setHandleCodeInApp ( true ) . setDynamicLinkDomain ( "myapp.page.link" ) . setIosBundleId ( "com.example.ios" ) . setAndroidPackageName ( "com.example.ios" 1 ) . setAndroidMinimumVersion ( "6.0" ) . setAndroidInstallApp ( true ) . build ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . Object > builder ( ) . put ( "continueUrl" , "https://example.com" ) . put ( "canHandleCodeInApp" , true ) . put ( "dynamicLinkDomain" , "myapp.page.link" ) . put ( "iOSBundleId" , "com.example.ios" ) . put ( "androidPackageName" , "com.example.ios" 1 ) . put ( "com.example.ios" 0 , "6.0" ) . put ( "androidInstallApp" , true ) . build ( ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return this . properties ; }
|
org . junit . Assert . assertEquals ( expected , settings . getProperties ( ) )
|
testGetArgumentDesc ( ) { System . out . println ( "getArgumentDesc" ) ; kg . apc . jmeter . functions . Base64Decode instance = new kg . apc . jmeter . functions . Base64Decode ( ) ; java . util . List result = instance . getArgumentDesc ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return graphRow . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , result . size ( ) )
|
queryOne ( ) { java . lang . String one = org . n3r . eql . eqler . MyEqlerTest . myEqler . queryOne ( ) ; "<AssertPlaceHolder>" ; } queryOne ( ) { java . lang . String one = org . n3r . eql . eqler . MyEqlerTest . myEqler . queryOne ( ) ; org . junit . Assert . assertThat ( one , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( "1" ) ) ) ; }
|
org . junit . Assert . assertThat ( one , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( "1" ) ) )
|
testCreatePropertySets ( ) { java . lang . Class < ? > [ ] expected = new java . lang . Class < ? > [ ] { org . apache . poi . hpsf . SummaryInformation . class , org . apache . poi . hpsf . DocumentSummaryInformation . class , org . apache . poi . hpsf . NoPropertySetStreamException . class , org . apache . poi . hpsf . NoPropertySetStreamException . class , org . apache . poi . hpsf . NoPropertySetStreamException . class } ; for ( int i = 0 ; i < ( expected . length ) ; i ++ ) { java . io . InputStream in = new java . io . ByteArrayInputStream ( poiFiles . get ( i ) . getBytes ( ) ) ; java . lang . Object o ; try { o = org . apache . poi . hpsf . PropertySetFactory . create ( in ) ; } catch ( org . apache . poi . hpsf . NoPropertySetStreamException | org . apache . poi . hpsf . MarkUnsupportedException ex ) { o = ex ; } in . close ( ) ; "<AssertPlaceHolder>" ; } } close ( ) { }
|
org . junit . Assert . assertEquals ( expected [ i ] , o . getClass ( ) )
|
testWebDriver ( ) { io . github . bonigarcia . wdm . WebDriverManager . getInstance ( driverClass ) . setup ( ) ; java . lang . String binaryPath = io . github . bonigarcia . wdm . WebDriverManager . getInstance ( driverClass ) . getBinaryPath ( ) ; java . io . File binary = new java . io . File ( binaryPath ) ; "<AssertPlaceHolder>" ; } getBinaryPath ( ) { return resolve ( binaryPath ) ; }
|
org . junit . Assert . assertTrue ( binary . exists ( ) )
|
testTokenListLabelBang ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>id+=ID!<sp>;\n" ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "INT<sp>:<sp>\'0\'..\'9\'+;\n" ) + "WS<sp>:<sp>(\'<sp>\'|\'\\n\')<sp>{$channel=HIDDEN;}<sp>;\n" ) ; java . lang . String found = execParser ( "a" 0 , grammar , "TParser" , "TLexer" , "a" , "a" , debug ) ; "<AssertPlaceHolder>" ; } execParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , boolean ) { boolean compiled = rawGenerateAndBuildRecognizer ( grammarFileName , grammarStr , parserName , lexerName , debug ) ; org . junit . Assert . assertTrue ( compiled ) ; writeFile ( tmpdir , "input" , input ) ; boolean parserBuildsTrees = ( ( grammarStr . indexOf ( "output=AST" ) ) >= 0 ) || ( ( grammarStr . indexOf ( "output<sp>=<sp>AST" ) ) >= 0 ) ; boolean parserBuildsTemplate = ( ( grammarStr . indexOf ( "output=template" ) ) >= 0 ) || ( ( grammarStr . indexOf ( "output<sp>=<sp>template" ) ) >= 0 ) ; return rawExecRecognizer ( parserName , null , lexerName , startRuleName , null , parserBuildsTrees , parserBuildsTemplate , false , debug ) ; }
|
org . junit . Assert . assertEquals ( "" , found )
|
testDeleteByKey_List ( ) { java . util . List < com . jmethods . catatumbo . entities . ParentEntity > entities = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 3 ; i ++ ) { com . jmethods . catatumbo . entities . ParentEntity entity = new com . jmethods . catatumbo . entities . ParentEntity ( ) ; entities . add ( entity ) ; } entities = com . jmethods . catatumbo . DatastoreBatchTest . em . insert ( entities ) ; java . util . List < com . jmethods . catatumbo . DatastoreKey > keys = new java . util . ArrayList ( ) ; java . util . List < java . lang . Long > identifiers = new java . util . ArrayList ( ) ; for ( com . jmethods . catatumbo . entities . ParentEntity entity : entities ) { keys . add ( entity . getKey ( ) ) ; identifiers . add ( entity . getId ( ) ) ; } com . jmethods . catatumbo . DatastoreBatch batch = com . jmethods . catatumbo . DatastoreBatchTest . em . newBatch ( ) ; batch . deleteByKey ( keys ) ; batch . submit ( ) ; java . util . List < com . jmethods . catatumbo . entities . ParentEntity > retrievedEntities = com . jmethods . catatumbo . DatastoreBatchTest . em . loadById ( com . jmethods . catatumbo . entities . ParentEntity . class , identifiers ) ; "<AssertPlaceHolder>" ; } get ( K ) { return map . get ( key ) ; }
|
org . junit . Assert . assertTrue ( ( ( ( ( retrievedEntities . get ( 0 ) ) == null ) && ( ( retrievedEntities . get ( 1 ) ) == null ) ) && ( ( retrievedEntities . get ( 2 ) ) == null ) ) )
|
onNorthernHemisphere ( ) { for ( net . time4j . calendar . astro . AstronomicalSeason . AstronomicalSeason season : net . time4j . calendar . astro . AstronomicalSeason . AstronomicalSeason . values ( ) ) { "<AssertPlaceHolder>" ; } } onNorthernHemisphere ( ) { return this ; }
|
org . junit . Assert . assertThat ( season . onNorthernHemisphere ( ) , org . hamcrest . CoreMatchers . is ( season ) )
|
normaliseNoHetro ( ) { int [ ] cycle = new int [ ] { 3 , 2 , 1 , 4 , 5 , 3 } ; int [ ] contr = new int [ ] { 1 , 1 , 1 , 1 , 1 , 1 } ; "<AssertPlaceHolder>" ; } normaliseCycle ( int [ ] , int [ ] ) { int offset = org . openscience . cdk . forcefield . mmff . MmffAromaticTypeMapping . indexOfHetro ( cycle , contribution ) ; if ( offset < 0 ) return false ; if ( offset == 0 ) return true ; int [ ] cpy = java . util . Arrays . copyOf ( cycle , cycle . length ) ; int len = ( cycle . length ) - 1 ; for ( int j = 0 ; j < len ; j ++ ) { cycle [ j ] = cpy [ ( ( offset + j ) % len ) ] ; } cycle [ len ] = cycle [ 0 ] ; return true ; }
|
org . junit . Assert . assertFalse ( org . openscience . cdk . forcefield . mmff . MmffAromaticTypeMapping . normaliseCycle ( cycle , contr ) )
|
testNumberedList ( ) { org . apache . poi . hslf . usermodel . HSLFSlideShow ppt = new org . apache . poi . hslf . usermodel . HSLFSlideShow ( org . apache . poi . hslf . usermodel . TestNumberedList . _slTests . openResourceAsStream ( "numbers.ppt" ) ) ; final java . util . List < org . apache . poi . hslf . usermodel . HSLFSlide > slides = ppt . getSlides ( ) ; "<AssertPlaceHolder>" ; checkSlide0 ( slides . get ( 0 ) ) ; checkSlide1 ( slides . get ( 1 ) ) ; ppt . close ( ) ; } size ( ) { return packagePartLookup . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , slides . size ( ) )
|
saveAndRetrieveBasicResource ( ) { java . lang . String input = org . apache . commons . io . IOUtils . toString ( getClass ( ) . getResourceAsStream ( "/basic-stu3.xml" ) , StandardCharsets . UTF_8 ) ; java . lang . String respString = ourClient . transaction ( ) . withBundle ( input ) . prettyPrint ( ) . execute ( ) ; ca . uhn . fhir . jpa . provider . r4 . ResourceProviderR4Test . ourLog . info ( respString ) ; ca . uhn . fhir . jpa . provider . r4 . Bundle bundle = myFhirCtx . newXmlParser ( ) . parseResource ( ca . uhn . fhir . jpa . provider . r4 . Bundle . class , respString ) ; ca . uhn . fhir . jpa . provider . r4 . IdType id = new ca . uhn . fhir . jpa . provider . r4 . IdType ( bundle . getEntry ( ) . get ( 0 ) . getResponse ( ) . getLocation ( ) ) ; ca . uhn . fhir . jpa . provider . r4 . Basic basic = ourClient . read ( ) . resource ( ca . uhn . fhir . jpa . provider . r4 . Basic . class ) . withId ( id ) . execute ( ) ; java . util . List < ca . uhn . fhir . jpa . provider . r4 . Extension > exts = basic . getExtensionsByUrl ( "http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/DateID" ) ; "<AssertPlaceHolder>" ; } size ( ) { return myTagSet . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , exts . size ( ) )
|
testGetValueOrdered ( ) { final org . kie . workbench . common . dmn . client . editors . types . listview . constraint . enumeration . item . DataTypeConstraintEnumerationItem item1 = mock ( org . kie . workbench . common . dmn . client . editors . types . listview . constraint . enumeration . item . DataTypeConstraintEnumerationItem . class ) ; final org . kie . workbench . common . dmn . client . editors . types . listview . constraint . enumeration . item . DataTypeConstraintEnumerationItem item2 = mock ( org . kie . workbench . common . dmn . client . editors . types . listview . constraint . enumeration . item . DataTypeConstraintEnumerationItem . class ) ; final org . kie . workbench . common . dmn . client . editors . types . listview . constraint . enumeration . item . DataTypeConstraintEnumerationItem item3 = mock ( org . kie . workbench . common . dmn . client . editors . types . listview . constraint . enumeration . item . DataTypeConstraintEnumerationItem . class ) ; when ( item1 . getValue ( ) ) . thenReturn ( "123" ) ; when ( item2 . getValue ( ) ) . thenReturn ( "456" ) ; when ( item3 . getValue ( ) ) . thenReturn ( "789" ) ; when ( item3 . getOrder ( ) ) . thenReturn ( 0 ) ; when ( item2 . getOrder ( ) ) . thenReturn ( 1 ) ; when ( item1 . getOrder ( ) ) . thenReturn ( 2 ) ; constraintEnumeration . setEnumerationItems ( asList ( item1 , item2 , item3 ) ) ; final java . lang . String actualValue = constraintEnumeration . getValue ( ) ; final java . lang . String expectedValue = "789,<sp>456,<sp>123" ; "<AssertPlaceHolder>" ; } getValue ( ) { return rootPath ; }
|
org . junit . Assert . assertEquals ( expectedValue , actualValue )
|
testAddTwoNewDocuments ( ) { database . begin ( ) ; com . orientechnologies . orient . core . record . impl . ODocument rootDoc = new com . orientechnologies . orient . core . record . impl . ODocument ( ) ; com . orientechnologies . orient . core . db . record . ridbag . ORidBag ridBag = new com . orientechnologies . orient . core . db . record . ridbag . ORidBag ( ) ; rootDoc . field ( "ridBag" , ridBag ) ; rootDoc . save ( database . getClusterNameById ( database . getDefaultClusterId ( ) ) ) ; database . commit ( ) ; database . begin ( ) ; com . orientechnologies . orient . core . record . impl . ODocument docOne = new com . orientechnologies . orient . core . record . impl . ODocument ( ) ; com . orientechnologies . orient . core . record . impl . ODocument docTwo = new com . orientechnologies . orient . core . record . impl . ODocument ( ) ; ridBag . add ( docOne ) ; ridBag . add ( docTwo ) ; rootDoc . save ( database . getClusterNameById ( database . getDefaultClusterId ( ) ) ) ; database . rollback ( ) ; rootDoc = database . load ( rootDoc . getIdentity ( ) ) ; ridBag = rootDoc . field ( "ridBag" ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; }
|
org . junit . Assert . assertEquals ( ridBag . size ( ) , 0 )
|
testProcessResponseStatusNotVolume ( ) { final boolean [ ] eventFired = new boolean [ ] { false } ; volumeMonitor . addVolumeChangeListener ( ( event ) -> { eventFired [ 0 ] = true ; } ) ; volumeMonitor . processResponseStatus ( "bogus:<sp>1" ) ; volumeMonitor . checkStatus ( ) ; "<AssertPlaceHolder>" ; } checkStatus ( ) { super . checkStatus ( ) ; org . bff . javampd . monitor . PlayerStatus . PlayerStatus newStatus = null ; if ( state . startsWith ( StandAloneMonitor . PlayerResponse . PLAY . getPrefix ( ) ) ) { newStatus = STATUS_PLAYING ; } else if ( state . startsWith ( StandAloneMonitor . PlayerResponse . PAUSE . getPrefix ( ) ) ) { newStatus = STATUS_PAUSED ; } else if ( state . startsWith ( StandAloneMonitor . PlayerResponse . STOP . getPrefix ( ) ) ) { newStatus = org . bff . javampd . monitor . PlayerStatus . PlayerStatus . STATUS_STOPPED ; } if ( ! ( status . equals ( newStatus ) ) ) { processNewStatus ( newStatus ) ; status = newStatus ; } }
|
org . junit . Assert . assertFalse ( eventFired [ 0 ] )
|
testGetMissingChdFilesWithEmptyRomPath ( ) { org . tibennetwork . iarcade . mame . FakeMameRuntime mame = new org . tibennetwork . iarcade . mame . FakeMameRuntime ( ) ; java . util . List < java . io . InputStream > inputStreams = new java . util . ArrayList ( ) ; inputStreams . add ( new java . io . FileInputStream ( "src/test/resources/xml/segacd.xml" ) ) ; inputStreams . add ( new java . io . FileInputStream ( "src/test/resources/xml/segacd-sl.xml" ) ) ; mame . setInputStreamsToReturn ( inputStreams ) ; org . tibennetwork . iarcade . mame . MachineRepository mr = new org . tibennetwork . iarcade . mame . MachineRepository ( mame ) ; org . tibennetwork . iarcade . mame . Machine m = mr . findByName ( "segacd" ) ; org . tibennetwork . iarcade . mame . SoftwareRepository sr = new org . tibennetwork . iarcade . mame . SoftwareRepository ( mame ) ; org . tibennetwork . iarcade . mame . Software s = sr . findByMachineAndByName ( m , "slamcity" ) ; java . util . Set < java . io . File > romPaths = new java . util . HashSet ( ) ; romPaths . add ( new java . io . File ( "src/test/resources/empty-rompath" ) ) ; java . util . Set < org . tibennetwork . iarcade . mame . SoftwareChdFile > missingChdFiles = s . getMissingChdFiles ( romPaths ) ; java . util . Set < org . tibennetwork . iarcade . mame . SoftwareChdFile > expectedMissingChdFiles = new java . util . HashSet ( ) ; expectedMissingChdFiles . add ( new org . tibennetwork . iarcade . mame . SoftwareChdFile ( "segacd" , "slamcity" , "slam<sp>city<sp>with<sp>scottie<sp>pippen<sp>(1994)(ntsc)(us)(disc<sp>1<sp>of<sp>4)[fingers][gw<sp>02711_1<sp>re-1]" ) ) ; expectedMissingChdFiles . add ( new org . tibennetwork . iarcade . mame . SoftwareChdFile ( "segacd" , "slamcity" , "slam<sp>city<sp>with<sp>scottie<sp>pippen<sp>(1994)(ntsc)(us)(disc<sp>2<sp>of<sp>4)[juice][gw<sp>02711_2<sp>re-1]" ) ) ; expectedMissingChdFiles . add ( new org . tibennetwork . iarcade . mame . SoftwareChdFile ( "segacd" , "slamcity" , "slam<sp>city<sp>with<sp>scottie<sp>pippen<sp>(1994)(ntsc)(us)(disc<sp>3<sp>of<sp>4)[mad<sp>dog][gw<sp>02711_3<sp>re-1]" ) ) ; expectedMissingChdFiles . add ( new org . tibennetwork . iarcade . mame . SoftwareChdFile ( "segacd" , "slamcity" , "slam<sp>city<sp>with<sp>scottie<sp>pippen<sp>(1994)(ntsc)(us)(disc<sp>4<sp>of<sp>4)[smash][gw<sp>02711_4<sp>re-1]" ) ) ; "<AssertPlaceHolder>" ; } getMissingChdFiles ( java . util . Set ) { java . util . Set < java . lang . String > missingChdFiles = new java . util . HashSet ( ) ; romfileloop : for ( java . lang . String chdFile : this . getNeededChdFiles ( ) ) { for ( java . io . File romPath : romPaths ) { java . io . File chdFileInRomPath = new java . io . File ( ( ( ( ( ( romPath . getAbsolutePath ( ) ) + ( java . io . File . separator ) ) + ( this . name ) ) + ( java . io . File . separator ) ) + chdFile ) ) ; if ( chdFileInRomPath . exists ( ) ) { continue romfileloop ; } } missingChdFiles . add ( chdFile ) ; } return missingChdFiles ; }
|
org . junit . Assert . assertThat ( missingChdFiles , org . hamcrest . CoreMatchers . equalTo ( expectedMissingChdFiles ) )
|
testMultiFunctionSameOverClause ( ) { java . lang . String sqlText = java . lang . String . format ( ( "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|<sp>7<sp>|<sp>7<sp>|\n" 6 + ( ( ( "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|<sp>7<sp>|<sp>7<sp>|\n" 7 + "<sp>60<sp>|<sp>1<sp>|<sp>78000<sp>|<sp>1<sp>|<sp>1<sp>|<sp>1<sp>|\n" 2 ) + "<sp>60<sp>|<sp>1<sp>|<sp>78000<sp>|<sp>1<sp>|<sp>1<sp>|<sp>1<sp>|\n" 0 ) + "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|<sp>7<sp>|<sp>7<sp>|\n" 4 ) ) , this . getTableReference ( com . splicemachine . derby . impl . sql . execute . operations . WindowFunctionIT . EMPTAB_HIRE_DATE ) , useSpark ) ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . WindowFunctionIT . methodWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|<sp>7<sp>|<sp>7<sp>|\n" 1 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "----------------------------------------------------\n" + "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|<sp>7<sp>|<sp>7<sp>|\n" ) + "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|<sp>7<sp>|<sp>7<sp>|\n" 2 ) + "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|<sp>7<sp>|<sp>7<sp>|\n" 9 ) + "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|<sp>7<sp>|<sp>7<sp>|\n" 3 ) + "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|<sp>7<sp>|<sp>7<sp>|\n" 0 ) + "<sp>49<sp>|<sp>2<sp>|<sp>53000<sp>|<sp>1<sp>|<sp>1<sp>|<sp>1<sp>|\n" ) + "<sp>50<sp>|<sp>1<sp>|<sp>52000<sp>|<sp>5<sp>|<sp>5<sp>|<sp>5<sp>|\n" ) + "<sp>55<sp>|<sp>1<sp>|<sp>52000<sp>|<sp>6<sp>|<sp>6<sp>|<sp>6<sp>|\n" ) + "<sp>60<sp>|<sp>1<sp>|<sp>78000<sp>|<sp>1<sp>|<sp>1<sp>|<sp>1<sp>|\n" ) + "<sp>70<sp>|<sp>1<sp>|<sp>76000<sp>|<sp>2<sp>|<sp>2<sp>|<sp>2<sp>|\n" ) + "<sp>80<sp>|<sp>3<sp>|<sp>79000<sp>|<sp>2<sp>|<sp>2<sp>|<sp>2<sp>|\n" ) + "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|<sp>7<sp>|<sp>7<sp>|\n" 5 ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|<sp>4<sp>|<sp>4<sp>|<sp>4<sp>|\n" ) + "<sp>110<sp>|<sp>1<sp>|<sp>53000<sp>|<sp>4<sp>|<sp>4<sp>|<sp>4<sp>|\n" ) + "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|<sp>7<sp>|<sp>7<sp>|\n" 8 ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
|
org . junit . Assert . assertEquals ( ( ( "<sp>60<sp>|<sp>1<sp>|<sp>78000<sp>|<sp>1<sp>|<sp>1<sp>|<sp>1<sp>|\n" 1 + sqlText ) + "<sp>60<sp>|<sp>1<sp>|<sp>78000<sp>|<sp>1<sp>|<sp>1<sp>|<sp>1<sp>|\n" 1 ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
|
testRemove ( ) { com . liferay . document . library . content . model . DLContent newDLContent = addDLContent ( ) ; _persistence . remove ( newDLContent ) ; com . liferay . document . library . content . model . DLContent existingDLContent = _persistence . fetchByPrimaryKey ( newDLContent . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertNull ( existingDLContent )
|
testDirNotEmptyWhenPathNotExist ( ) { int ret = mFsShell . run ( "test" , "-s" , "/testPath" ) ; "<AssertPlaceHolder>" ; } run ( alluxio . job . JobConfig , int , alluxio . conf . AlluxioConfiguration ) { alluxio . retry . CountingRetry retryPolicy = new alluxio . retry . CountingRetry ( attempts ) ; while ( retryPolicy . attempt ( ) ) { long jobId ; try ( alluxio . client . job . JobMasterClient client = JobMasterClient . Factory . create ( alluxio . worker . job . JobMasterClientContext . newBuilder ( alluxio . ClientContext . create ( alluxioConf ) ) . build ( ) ) ) { jobId = client . run ( config ) ; } catch ( java . lang . Exception e ) { alluxio . client . job . JobGrpcClientUtils . LOG . warn ( "Exception<sp>encountered<sp>when<sp>starting<sp>a<sp>job." , e ) ; continue ; } alluxio . job . wire . JobInfo jobInfo = alluxio . client . job . JobGrpcClientUtils . waitFor ( jobId , alluxioConf ) ; if ( jobInfo == null ) { break ; } if ( ( ( jobInfo . getStatus ( ) ) == ( alluxio . job . wire . Status . COMPLETED ) ) || ( ( jobInfo . getStatus ( ) ) == ( alluxio . job . wire . Status . CANCELED ) ) ) { return ; } alluxio . client . job . JobGrpcClientUtils . LOG . warn ( "Job<sp>{}<sp>failed<sp>to<sp>complete:<sp>{}" , jobId , jobInfo . getErrorMessage ( ) ) ; } throw new java . lang . RuntimeException ( "Failed<sp>to<sp>successfully<sp>complete<sp>the<sp>job." ) ; }
|
org . junit . Assert . assertEquals ( 1 , ret )
|
testLockAndLoadSingleEntityRefreshHandlesUnflushedCreation ( ) { org . candlepin . model . Owner owner = new org . candlepin . model . Owner ( "owner_key-1" , "owner-1" ) ; this . getEntityManager ( ) . persist ( owner ) ; org . candlepin . model . Owner output = this . testOwnerCurator . lockAndLoad ( owner ) ; "<AssertPlaceHolder>" ; } lockAndLoad ( java . lang . Iterable ) { if ( entities == null ) { return java . util . Collections . < E > emptyList ( ) ; } final java . lang . Iterable < E > entityCollection = entities ; final org . hibernate . internal . SessionImpl session = ( ( org . hibernate . internal . SessionImpl ) ( this . currentSession ( ) ) ) ; final org . hibernate . metadata . ClassMetadata metadata = session . getSessionFactory ( ) . getClassMetadata ( this . entityType ) ; if ( ( ( metadata == null ) || ( ! ( metadata . hasIdentifierProperty ( ) ) ) ) || ( ! ( metadata . isMutable ( ) ) ) ) { throw new java . lang . UnsupportedOperationException ( "lockAndLoad<sp>only<sp>supports<sp>mutable<sp>entities<sp>with<sp>database<sp>identifiers" ) ; } java . lang . Iterable < java . io . Serializable > iterable = new java . lang . Iterable < java . io . Serializable > ( ) { @ org . candlepin . model . Override public java . util . Iterator < java . io . Serializable > iterator ( ) { return new java . util . Iterator < java . io . Serializable > ( ) { private java . util . Iterator < E > entityIterator ; { this . entityIterator = entityCollection . iterator ( ) ; } @ org . candlepin . model . Override public boolean hasNext ( ) { return this . entityIterator . hasNext ( ) ; } @ org . candlepin . model . Override public java . io . Serializable next ( ) { E next = this . entityIterator . next ( ) ; return next != null ? metadata . getIdentifier ( next , session ) : null ; } @ org . candlepin . model . Override public void remove ( ) { this . entityIterator . remove ( ) ; } } ; } } ; return this . lockAndLoadByIds ( this . entityType , iterable ) ; }
|
org . junit . Assert . assertNull ( output )
|
testShowHideMeasure ( ) { org . pentaho . agilebi . modeler . models . annotations . util . MondrianSchemaHandler mondrianSchemaHandler = new org . pentaho . agilebi . modeler . models . annotations . util . MondrianSchemaHandler ( schemaDocument ) ; boolean result = mondrianSchemaHandler . showHideMeasure ( org . pentaho . agilebi . modeler . models . annotations . util . MondrianSchemaHandlerTest . TEST_CUBE_NAME , org . pentaho . agilebi . modeler . models . annotations . util . MondrianSchemaHandlerTest . TEST_EXISTING_MEASURE_STRING , Boolean . FALSE ) ; "<AssertPlaceHolder>" ; } showHideMeasure ( java . lang . String , java . lang . String , boolean ) { org . w3c . dom . Element measureNode = ( ( org . w3c . dom . Element ) ( getMeasureNode ( cubeName , measureName ) ) ) ; if ( measureNode == null ) { measureNode = getCalculatedMeasureNode ( cubeName , measureName ) ; } if ( measureNode != null ) { showHideElement ( measureNode , visible ) ; return true ; } else { return false ; } }
|
org . junit . Assert . assertTrue ( result )
|
testLoadHistogramTypes ( ) { fr . inria . soctrace . lib . query . distribution . HistogramLoader loader = DistributionFactory . INSTANCE . createHistogramLoader ( traceDB ) ; java . util . List < fr . inria . soctrace . lib . model . EventType > types = new java . util . LinkedList < fr . inria . soctrace . lib . model . EventType > ( ) ; types . add ( ( ( fr . inria . soctrace . lib . model . EventType ) ( traceDB . getEventTypeCache ( ) . getElementMap ( fr . inria . soctrace . lib . model . EventType . class ) . get ( 1 ) ) ) ) ; types . add ( ( ( fr . inria . soctrace . lib . model . EventType ) ( traceDB . getEventTypeCache ( ) . getElementMap ( fr . inria . soctrace . lib . model . EventType . class ) . get ( 2 ) ) ) ) ; types . add ( ( ( fr . inria . soctrace . lib . model . EventType ) ( traceDB . getEventTypeCache ( ) . getElementMap ( fr . inria . soctrace . lib . model . EventType . class ) . get ( 3 ) ) ) ) ; types . add ( ( ( fr . inria . soctrace . lib . model . EventType ) ( traceDB . getEventTypeCache ( ) . getElementMap ( fr . inria . soctrace . lib . model . EventType . class ) . get ( 4 ) ) ) ) ; fr . inria . soctrace . lib . query . distribution . Histogram hist = loader . loadHistogram ( HistogramLoader . MIN_TIMESTAMP , HistogramLoader . MAX_TIMESTAMP , types , 2000 ) ; "<AssertPlaceHolder>" ; } getCount ( ) { return count ; }
|
org . junit . Assert . assertEquals ( hist . getCount ( ) , getCount ( types ) )
|
aggregatorDealsWithNullInput ( ) { uk . gov . gchq . gaffer . bitmap . function . aggregate . RoaringBitmapAggregator roaringBitmapAggregator = new uk . gov . gchq . gaffer . bitmap . function . aggregate . RoaringBitmapAggregator ( ) ; final org . roaringbitmap . RoaringBitmap state = roaringBitmapAggregator . apply ( null , null ) ; "<AssertPlaceHolder>" ; } apply ( uk . gov . gchq . gaffer . data . element . Properties , uk . gov . gchq . gaffer . data . element . Properties ) { if ( null == state ) { return properties ; } propertiesTuple . setProperties ( properties ) ; stateTuple . setProperties ( state ) ; apply ( stateTuple , propertiesTuple ) ; return state ; }
|
org . junit . Assert . assertNull ( state )
|
testGetHydrogenCount ( ) { java . lang . String rawMolSmiles = "[H]POOSC(Br)C(Cl)C(F)I" ; org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer atomContainer = sp . parseSmiles ( rawMolSmiles ) ; org . openscience . cdk . interfaces . IAtom atom = null ; for ( org . openscience . cdk . interfaces . IAtom a : atomContainer . atoms ( ) ) { if ( a . getSymbol ( ) . equalsIgnoreCase ( "P" ) ) { atom = a ; break ; } } int expResult = 2 ; int result = org . openscience . cdk . smsd . tools . ExtAtomContainerManipulator . getHydrogenCount ( atomContainer , atom ) ; "<AssertPlaceHolder>" ; } getHydrogenCount ( org . openscience . cdk . interfaces . IAtomContainer , org . openscience . cdk . interfaces . IAtom ) { return ( org . openscience . cdk . smsd . tools . ExtAtomContainerManipulator . getExplicitHydrogenCount ( atomContainer , atom ) ) + ( org . openscience . cdk . smsd . tools . ExtAtomContainerManipulator . getImplicitHydrogenCount ( atom ) ) ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testLTE1 ( ) { org . nd4j . linalg . api . ndarray . INDArray x = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0 , 1 , 2 , 1 } ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 1 , 1 , 1 } ) ; x . ltei ( 2 ) ; "<AssertPlaceHolder>" ; } ltei ( java . lang . Number ) { org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ndarray . ScalarLessThanOrEqual ( this , other ) ) ; return this ; }
|
org . junit . Assert . assertEquals ( exp , x )
|
testSerializeNative ( ) { doubleSerializer . serializeNative ( com . orientechnologies . common . serialization . types . DoubleSerializerTest . OBJECT , stream , 0 ) ; java . lang . Double v = doubleSerializer . deserializeNative ( stream , 0 ) ; "<AssertPlaceHolder>" ; } deserializeNative ( byte [ ] , int ) { return java . lang . Float . intBitsToFloat ( com . orientechnologies . common . serialization . types . OFloatSerializer . CONVERTER . getInt ( stream , startPosition , java . nio . ByteOrder . nativeOrder ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( v , com . orientechnologies . common . serialization . types . DoubleSerializerTest . OBJECT )
|
testDeleteFile_2 ( ) { java . lang . String folderName = "$.payload.protectedFolder" 5 ; boolean protectedFolder = true ; "<AssertPlaceHolder>" ; try { com . agiletec . aps . system . services . user . UserDetails user = new org . entando . entando . web . utils . OAuth2TestUtils . UserBuilder ( "jack_bauer" , "$.payload.protectedFolder" 2 ) . grantedToRoleAdmin ( ) . build ( ) ; java . lang . String accessToken = mockOAuthInterceptor ( user ) ; org . springframework . test . web . servlet . ResultActions result = mockMvc . perform ( delete ( "/fileBrowser/file" ) . param ( "currentPath" , ( folderName + "$.payload.protectedFolder" 6 ) ) . param ( "protectedFolder" , "true" ) . header ( "Authorization" , ( "$.payload.protectedFolder" 3 + accessToken ) ) ) ; result . andExpect ( status ( ) . isOk ( ) ) ; result . andExpect ( jsonPath ( "$.payload.protectedFolder" , org . hamcrest . CoreMatchers . is ( true ) ) ) ; result . andExpect ( jsonPath ( "$.payload.protectedFolder" 4 , org . hamcrest . Matchers . is ( "$.payload.protectedFolder" 0 ) ) ) ; result . andExpect ( jsonPath ( "$.payload.path" , org . hamcrest . Matchers . is ( ( folderName + "$.payload.protectedFolder" 6 ) ) ) ) ; result . andExpect ( jsonPath ( "$.errors" , org . hamcrest . Matchers . hasSize ( 0 ) ) ) ; result . andExpect ( jsonPath ( "$.metaData.size()" , org . hamcrest . CoreMatchers . is ( 1 ) ) ) ; result . andExpect ( jsonPath ( "$.payload.protectedFolder" 1 , org . hamcrest . CoreMatchers . is ( folderName ) ) ) ; } catch ( java . lang . Exception e ) { throw e ; } finally { this . storageManager . deleteDirectory ( folderName , protectedFolder ) ; } } exists ( java . lang . String , boolean ) { org . entando . entando . aps . system . services . storage . File file = this . getFile ( subPath , isProtectedResource ) ; return file . exists ( ) ; }
|
org . junit . Assert . assertFalse ( this . storageManager . exists ( folderName , protectedFolder ) )
|
contains_should_return_false_when_doc_does_not_exists ( ) { org . ektorp . support . List < org . ektorp . support . Revision > revs = org . ektorp . support . Collections . emptyList ( ) ; doReturn ( revs ) . when ( db ) . getRevisions ( "doc_id" ) ; doReturn ( false ) . when ( db ) . contains ( "doc_id" ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { return db . contains ( docId ) ; }
|
org . junit . Assert . assertFalse ( repo . contains ( "doc_id" ) )
|
shouldGetSelectedEntities ( ) { java . util . List < com . qcadoo . model . api . Entity > entities = com . google . common . collect . ImmutableList . of ( mockEntity ( ) , mockEntity ( ) , mockEntity ( ) , mockEntity ( ) ) ; given ( workPlansGrid . getSelectedEntities ( ) ) . willReturn ( entities ) ; java . util . List < com . qcadoo . model . api . Entity > result = workPlansListView . getSelectedWorkPlans ( ) ; "<AssertPlaceHolder>" ; } getSelectedWorkPlans ( ) { return workPlansGrid . getSelectedEntities ( ) ; }
|
org . junit . Assert . assertEquals ( entities , result )
|
testBuildImage_httpHostConnectException ( ) { org . apache . http . conn . HttpHostConnectException mockHttpHostConnectException = org . mockito . Mockito . mock ( org . apache . http . conn . HttpHostConnectException . class ) ; org . mockito . Mockito . doThrow ( mockHttpHostConnectException ) . when ( mockJibContainerBuilder ) . containerize ( mockContainerizer ) ; try { testBuildImageStepsRunner . build ( mockJibContainerBuilder , mockContainerizer , mockEventDispatcher , com . google . cloud . tools . jib . plugins . common . BuildStepsRunnerTest . TEST_HELPFUL_SUGGESTIONS ) ; org . junit . Assert . fail ( "buildImage<sp>should<sp>have<sp>thrown<sp>an<sp>exception" ) ; } catch ( com . google . cloud . tools . jib . plugins . common . BuildStepsExecutionException ex ) { "<AssertPlaceHolder>" ; } } forHttpHostConnect ( ) { return suggest ( "make<sp>sure<sp>your<sp>Internet<sp>is<sp>up<sp>and<sp>that<sp>the<sp>registry<sp>you<sp>are<sp>pushing<sp>to<sp>exists" ) ; }
|
org . junit . Assert . assertEquals ( com . google . cloud . tools . jib . plugins . common . BuildStepsRunnerTest . TEST_HELPFUL_SUGGESTIONS . forHttpHostConnect ( ) , ex . getMessage ( ) )
|
degreeCDKLegacy ( ) { org . openscience . cdk . isomorphism . matchers . Expr actual = org . openscience . cdk . smarts . SmartsExprReadTest . getAtomExpr ( "[D4]" , Smarts . FLAVOR_CDK_LEGACY ) ; org . openscience . cdk . isomorphism . matchers . Expr expected = org . openscience . cdk . smarts . SmartsExprReadTest . expr ( org . openscience . cdk . smarts . HEAVY_DEGREE , 4 ) ; "<AssertPlaceHolder>" ; } expr ( org . openscience . cdk . isomorphism . matchers . Expr$Type , int ) { return new org . openscience . cdk . isomorphism . matchers . Expr ( type , val ) ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) )
|
outboundValues ( ) { event = org . mule . runtime . core . api . event . CoreEvent . builder ( event ) . message ( org . mule . runtime . core . internal . message . InternalMessage . builder ( event . getMessage ( ) ) . addOutboundProperty ( "foo" , "abc" ) . addOutboundProperty ( "bar" , "xyz" ) . build ( ) ) . build ( ) ; java . util . Collection < javax . activation . DataHandler > values = ( ( java . util . Collection < javax . activation . DataHandler > ) ( evaluate ( "message.outboundProperties.values()" , event ) ) ) ; "<AssertPlaceHolder>" ; values . contains ( "abc" ) ; values . contains ( "xyz" ) ; } size ( ) { return delegate . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , values . size ( ) )
|
testListLimitingResourceQueue ( ) { int previous = limitingResourceQueueDAO . list ( org . libreplan . business . resources . entities . LimitingResourceQueue . class ) . size ( ) ; org . libreplan . business . resources . entities . LimitingResourceQueue limitingResourceQueue1 = createValidLimitingResourceQueue ( ) ; limitingResourceQueueDAO . save ( limitingResourceQueue1 ) ; org . libreplan . business . resources . entities . LimitingResourceQueue limitingResourceQueue2 = createValidLimitingResourceQueue ( ) ; limitingResourceQueueDAO . save ( limitingResourceQueue1 ) ; limitingResourceQueueDAO . save ( limitingResourceQueue2 ) ; java . util . List < org . libreplan . business . resources . entities . LimitingResourceQueue > list = limitingResourceQueueDAO . list ( org . libreplan . business . resources . entities . LimitingResourceQueue . class ) ; "<AssertPlaceHolder>" ; } list ( java . lang . Class ) { return getSession ( ) . createCriteria ( klass ) . list ( ) ; }
|
org . junit . Assert . assertEquals ( ( previous + 2 ) , list . size ( ) )
|
shouldOrderCanNotBeClosedWhenTypeIsForEachOpAndRecordIsNotLastAndThereIsNotEnoughtLastRecords ( ) { orderHasEnabledAutoClose ( ) ; stubTypeOfProductionRecording ( TypeOfProductionRecording . FOR_EACH ) ; stubSearchCriteriaResults ( 1L , 2L ) ; boolean shouldClose = orderClosingHelper . orderShouldBeClosed ( productionTracking ) ; "<AssertPlaceHolder>" ; } orderShouldBeClosed ( com . qcadoo . model . api . Entity ) { com . qcadoo . model . api . Entity order = productionTracking . getBelongsToField ( ProductionTrackingFields . ORDER ) ; if ( order == null ) { return false ; } java . lang . Boolean autoCloseOrder = order . getBooleanField ( OrderFieldsPC . AUTO_CLOSE_ORDER ) ; java . lang . Boolean isLastRecord = productionTracking . getBooleanField ( ProductionTrackingFields . LAST_TRACKING ) ; com . qcadoo . mes . productionCounting . constants . TypeOfProductionRecording recType = com . qcadoo . mes . productionCounting . constants . TypeOfProductionRecording . parseString ( order . getStringField ( OrderFieldsPC . TYPE_OF_PRODUCTION_RECORDING ) ) ; return ( isLastRecord && autoCloseOrder ) && ( ( ! ( TypeOfProductionRecording . FOR_EACH . equals ( recType ) ) ) || ( eachOperationHasLastRecords ( order , productionTracking ) ) ) ; }
|
org . junit . Assert . assertFalse ( shouldClose )
|
onYears ( ) { net . time4j . range . CalendarPeriod < net . time4j . range . CalendarYear > expected = net . time4j . range . CalendarPeriod . between ( net . time4j . range . CalendarYear . of ( 2017 ) , net . time4j . range . CalendarYear . of ( 2020 ) ) ; net . time4j . format . expert . ChronoFormatter < net . time4j . range . CalendarYear > f = net . time4j . format . expert . ChronoFormatter . ofPattern ( "uuuu" , PatternType . CLDR , Locale . ENGLISH , net . time4j . range . CalendarYear . chronology ( ) ) ; "<AssertPlaceHolder>" ; } onYears ( ) { net . time4j . range . CalendarPeriod < net . time4j . range . CalendarYear > expected = net . time4j . range . CalendarPeriod . between ( net . time4j . range . CalendarYear . of ( 2017 ) , net . time4j . range . CalendarYear . of ( 2020 ) ) ; net . time4j . format . expert . ChronoFormatter < net . time4j . range . CalendarYear > f = net . time4j . format . expert . ChronoFormatter . ofPattern ( "uuuu" , PatternType . CLDR , Locale . ENGLISH , net . time4j . range . CalendarYear . chronology ( ) ) ; org . junit . Assert . assertThat ( net . time4j . range . CalendarPeriod . onYears ( ) . parse ( "2017<sp><sp>2020" , f ) , org . hamcrest . CoreMatchers . is ( expected ) ) ; }
|
org . junit . Assert . assertThat ( net . time4j . range . CalendarPeriod . onYears ( ) . parse ( "2017<sp><sp>2020" , f ) , org . hamcrest . CoreMatchers . is ( expected ) )
|
testAssociate_processing_event_with_parents_and_child ( ) { logger . info ( "associate_processing_event_with_parents_and_child" ) ; int processingID = 773 ; int [ ] parentIDs = new int [ ] { 16 , 18 } ; int [ ] childIDs = new int [ ] { 20 , 22 } ; int expResult = net . sourceforge . seqware . common . module . ReturnValue . SUCCESS ; net . sourceforge . seqware . common . module . ReturnValue result = net . sourceforge . seqware . common . metadata . MetadataWSTest . instance . associate_processing_event_with_parents_and_child ( processingID , parentIDs , childIDs ) ; "<AssertPlaceHolder>" ; testCount ( ( "select<sp>count(*)<sp>from<sp>processing_relationship<sp>" + ( "where<sp>(parent_id=773<sp>AND<sp>child_id<sp>IN<sp>(20,22))<sp>" + "OR<sp>(child_id=12<sp>AND<sp>parent_id<sp>IN<sp>(16,18));" ) ) , 4 ) ; } getExitStatus ( ) { return exitStatus ; }
|
org . junit . Assert . assertEquals ( expResult , result . getExitStatus ( ) )
|
testIsDebugEnabledWithNoFilter ( ) { addNoFilter ( ) ; logger . setLevel ( Level . DEBUG ) ; "<AssertPlaceHolder>" ; } isDebugEnabled ( ) { return isDebugEnabled ( null ) ; }
|
org . junit . Assert . assertFalse ( logger . isDebugEnabled ( ) )
|
getFromRowsTest ( ) { com . datastax . driver . mapping . Simple obj1 = buildSimpleEntity ( ) ; target . save ( obj1 ) ; com . datastax . driver . mapping . Simple obj2 = buildSimpleEntity ( ) ; target . save ( obj2 ) ; com . datastax . driver . mapping . ResultSet rs = com . datastax . driver . mapping . MappingSessionTest . session . execute ( "SELECT<sp>*<sp>FROM<sp>simple" ) ; com . datastax . driver . mapping . List < com . datastax . driver . mapping . Row > rows = rs . all ( ) ; com . datastax . driver . mapping . List < com . datastax . driver . mapping . Simple > result = target . getFromRows ( com . datastax . driver . mapping . Simple . class , rows ) ; "<AssertPlaceHolder>" ; target . delete ( obj1 ) ; target . delete ( obj2 ) ; } getFromRows ( java . lang . Class , com . datastax . driver . mapping . builder . Collection ) { com . datastax . driver . mapping . builder . List < T > result = new com . datastax . driver . mapping . builder . ArrayList < T > ( ) ; for ( com . datastax . driver . mapping . builder . Row row : rows ) { result . add ( com . datastax . driver . mapping . builder . MappingBuilder . getFromRow ( clazz , row ) ) ; } return result ; }
|
org . junit . Assert . assertEquals ( 2 , result . size ( ) )
|
testOk ( ) { final java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . LeesUitBrpAntwoordBericht queryResponse = new nl . bzk . migratiebrp . bericht . model . sync . impl . LeesUitBrpAntwoordBericht ( ) ; queryResponse . setStatus ( StatusType . OK ) ; parameters . put ( "leesUitBrpAntwoordBericht" , berichtenDao . bewaarBericht ( queryResponse ) ) ; final java . lang . String result = subject . execute ( parameters ) ; "<AssertPlaceHolder>" ; } execute ( java . util . Map ) { nl . bzk . migratiebrp . isc . jbpm . uc1003 . MaakZoekPersoonBerichtAction . LOG . debug ( "execute(parameters={})" , parameters ) ; final java . lang . Long berichtId = ( ( java . lang . Long ) ( parameters . get ( "input" ) ) ) ; final nl . bzk . migratiebrp . bericht . model . lo3 . Lo3Bericht input = ( ( nl . bzk . migratiebrp . bericht . model . lo3 . Lo3Bericht ) ( berichtenDao . leesBericht ( berichtId ) ) ) ; final nl . bzk . migratiebrp . bericht . model . sync . SyncBericht verzoek = maakZoekPersoonVerzoekBericht ( input ) ; final java . lang . Long verzoekId = berichtenDao . bewaarBericht ( verzoek ) ; final java . util . Map < java . lang . String , java . lang . Object > result = new java . util . HashMap ( ) ; result . put ( "zoekPersoonVerzoek" , verzoekId ) ; nl . bzk . migratiebrp . isc . jbpm . uc1003 . MaakZoekPersoonBerichtAction . LOG . debug ( "result:<sp>{}" , result ) ; return result ; }
|
org . junit . Assert . assertEquals ( null , result )
|
interpretEmptyStringAsNull ( ) { editor . setAsText ( "" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertNull ( editor . getValue ( ) )
|
setOperationTimeoutSavesTimeout ( ) { final long expectedOperationTimeout = 1234 ; tests . unit . com . microsoft . azure . sdk . iot . device . DeviceClientConfig config = tests . unit . com . microsoft . azure . sdk . iot . device . Deencapsulation . newInstance ( tests . unit . com . microsoft . azure . sdk . iot . device . DeviceClientConfig . class , mockIotHubConnectionString ) ; tests . unit . com . microsoft . azure . sdk . iot . device . Deencapsulation . invoke ( config , "setOperationTimeout" , new java . lang . Class [ ] { long . class } , expectedOperationTimeout ) ; long actualTimeout = tests . unit . com . microsoft . azure . sdk . iot . device . Deencapsulation . getField ( config , "operationTimeout" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( expectedOperationTimeout , actualTimeout )
|
shouldParseHistoryOutputLocation ( ) { final org . pitest . mutationtest . config . ReportOptions actual = parseAddingRequiredArgs ( "--historyOutputLocation" , "foo" ) ; "<AssertPlaceHolder>" ; } getHistoryOutputLocation ( ) { return this . historyOutputLocation ; }
|
org . junit . Assert . assertEquals ( new java . io . File ( "foo" ) , actual . getHistoryOutputLocation ( ) )
|
testOutOfOrderStatusUpdate ( ) { com . emc . storageos . db . server . DbClientTest . _logger . info ( "Starting<sp>out<sp>of<sp>order<sp>update<sp>test" ) ; com . emc . storageos . db . client . DbClient dbClient = _dbClient ; com . emc . storageos . db . client . model . FileShare fs = new com . emc . storageos . db . client . model . FileShare ( ) ; fs . setId ( com . emc . storageos . db . client . URIUtil . createId ( com . emc . storageos . db . client . model . FileShare . class ) ) ; fs . setLabel ( "foobar" ) ; fs . setOpStatus ( new com . emc . storageos . db . client . model . OpStatusMap ( ) ) ; fs . getOpStatus ( ) . put ( "key" , new com . emc . storageos . db . client . model . Operation ( "ready" , "xyz" ) ) ; dbClient . persistObject ( fs ) ; fs = dbClient . queryObject ( com . emc . storageos . db . client . model . FileShare . class , fs . getId ( ) ) ; fs . getOpStatus ( ) . put ( "key" , new com . emc . storageos . db . client . model . Operation ( "pending" , "xyz" ) ) ; dbClient . persistObject ( fs ) ; fs = dbClient . queryObject ( com . emc . storageos . db . client . model . FileShare . class , fs . getId ( ) ) ; "<AssertPlaceHolder>" ; } getOpStatus ( ) { switch ( _status ) { case SUCCESS : return Operation . Status . ready ; case FAILED : return Operation . Status . error ; default : return Operation . Status . pending ; } }
|
org . junit . Assert . assertEquals ( fs . getOpStatus ( ) . get ( "key" ) . getStatus ( ) , "ready" )
|
testHashMap_01 ( ) { java . lang . String typeName = java . util . HashMap . class . getName ( ) ; org . eclipse . xtext . common . types . JvmType type = getTypeProvider ( ) . findTypeByName ( typeName ) ; "<AssertPlaceHolder>" ; diagnose ( type ) ; org . eclipse . emf . ecore . resource . Resource resource = type . eResource ( ) ; getAndResolveAllFragments ( resource ) ; recomputeAndCheckIdentifiers ( resource ) ; } findTypeByName ( java . lang . String ) { return null ; }
|
org . junit . Assert . assertNotNull ( type )
|
testIsGatewaySenderUsingDiskStore ( ) { final java . lang . String diskStoreName = "testDiskStore" ; final com . gemstone . gemfire . cache . wan . GatewaySender mockGatewaySender = mockContext . mock ( com . gemstone . gemfire . cache . wan . GatewaySender . class , "GatewaySender" ) ; final com . gemstone . gemfire . cache . DiskStore mockDiskStore = mockContext . mock ( com . gemstone . gemfire . cache . DiskStore . class , "DiskStore" ) ; mockContext . checking ( new org . jmock . Expectations ( ) { { oneOf ( mockGatewaySender ) . getDiskStoreName ( ) ; will ( returnValue ( diskStoreName ) ) ; oneOf ( mockDiskStore ) . getName ( ) ; will ( returnValue ( diskStoreName ) ) ; } } ) ; final com . gemstone . gemfire . management . internal . cli . functions . DescribeDiskStoreFunction function = createDescribeDiskStoreFunction ( null ) ; "<AssertPlaceHolder>" ; } isUsingDiskStore ( com . gemstone . gemfire . cache . Region , com . gemstone . gemfire . cache . DiskStore ) { return ( ( isPersistent ( region ) ) || ( isOverflowToDisk ( region ) ) ) && ( com . gemstone . gemfire . internal . lang . ObjectUtils . equals ( getDiskStoreName ( region ) , diskStore . getName ( ) ) ) ; }
|
org . junit . Assert . assertTrue ( function . isUsingDiskStore ( mockGatewaySender , mockDiskStore ) )
|
testGetInputStream ( ) { try { com . pastdev . jsch . scp . ScpFileInputStream scpFileInputStream = null ; try { com . pastdev . jsch . IOUtils . writeFile ( file , expected ) ; com . pastdev . jsch . scp . ScpFile scpFile = new com . pastdev . jsch . scp . ScpFile ( sessionFactory , scpPath , rootDir , filename ) ; scpFileInputStream = scpFile . getInputStream ( ) ; java . lang . String actual = com . pastdev . jsch . IOUtils . copyToString ( scpFileInputStream , com . pastdev . jsch . scp . UTF8 ) ; "<AssertPlaceHolder>" ; } finally { if ( scpFileInputStream != null ) { try { scpFileInputStream . close ( ) ; } catch ( java . io . IOException e ) { com . pastdev . jsch . scp . ScpFileTest . logger . error ( "failed<sp>to<sp>close<sp>ScpInputStream<sp>for<sp>{}:<sp>{}" , filename , e ) ; com . pastdev . jsch . scp . ScpFileTest . logger . debug ( "failed<sp>to<sp>close<sp>ScpInputStream:" , e ) ; } } } } catch ( java . lang . Exception e ) { com . pastdev . jsch . scp . ScpFileTest . logger . error ( "failed<sp>for<sp>{}:<sp>{}" , filename , e ) ; com . pastdev . jsch . scp . ScpFileTest . logger . debug ( "failed:" , e ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } } copyToString ( java . io . InputStream , java . nio . charset . Charset ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; byte [ ] byteBuffer = new byte [ 1024 ] ; int bytesRead = 0 ; while ( ( bytesRead = from . read ( byteBuffer , 0 , 1024 ) ) >= 0 ) { builder . append ( new java . lang . String ( byteBuffer , 0 , bytesRead , toCharset ) ) ; } return builder . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testIsNotEdit ( ) { when ( request . getAttribute ( com . day . cq . wcm . api . WCMMode . class . getName ( ) ) ) . thenReturn ( WCMMode . PREVIEW ) ; "<AssertPlaceHolder>" ; verify ( request , atLeast ( 1 ) ) . getAttribute ( com . day . cq . wcm . api . WCMMode . class . getName ( ) ) ; verifyNoMoreInteractions ( request ) ; } isEdit ( org . apache . sling . api . SlingHttpServletRequest ) { return ( com . day . cq . wcm . api . WCMMode . EDIT ) == ( com . adobe . acs . commons . util . ModeUtil . getMode ( request ) ) ; }
|
org . junit . Assert . assertFalse ( com . adobe . acs . commons . util . ModeUtil . isEdit ( request ) )
|
testPositiveInfinity ( ) { org . apache . commons . math . geometry . euclidean . threed . Vector3D c = org . apache . commons . math . geometry . euclidean . threed . Vector3D . POSITIVE_INFINITY ; java . lang . String expected = "{(Infinity);<sp>(Infinity);<sp>(Infinity)}" ; java . lang . String actual = vector3DFormat . format ( c ) ; "<AssertPlaceHolder>" ; } format ( java . lang . Object [ ] ) { return format . format ( arguments ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testStaticInjectionMethodAsDefaultCharacteristicDoesntThrowExceptionOnNormalRegistration ( ) { com . picocontainer . MutablePicoContainer mpc = createPicoContainer ( null ) ; mpc . change ( Characteristics . STATIC_INJECTION ) ; com . picocontainer . ComponentAdapter < ? > ca = new com . picocontainer . adapters . InstanceAdapter < java . lang . Object > ( java . lang . Object . class , new java . lang . Object ( ) ) ; mpc . addAdapter ( ca ) ; "<AssertPlaceHolder>" ; } getComponent ( com . googlecode . jtype . Generic ) { return null ; }
|
org . junit . Assert . assertNotNull ( mpc . getComponent ( java . lang . Object . class ) )
|
processOptionsPrint0 ( ) { org . apache . hadoop . fs . shell . find . Find find = new org . apache . hadoop . fs . shell . find . Find ( ) ; find . setConf ( org . apache . hadoop . fs . shell . find . TestFind . conf ) ; java . lang . String args = "path<sp>-print0" ; java . lang . String expected = "Print0-Print(;)" ; find . processOptions ( getArgs ( args ) ) ; org . apache . hadoop . fs . shell . find . Expression expression = find . getRootExpression ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( "OzoneFileSystem{URI=" + ( uri ) ) + ",<sp>" ) + "workingDir=" ) + ( workingDir ) ) + ",<sp>" ) + "userName=" ) + ( userName ) ) + ",<sp>" ) + "statistics=" ) + ( statistics ) ) + "}" ; }
|
org . junit . Assert . assertEquals ( expected , expression . toString ( ) )
|
updatesProjectionQuery ( ) { final java . lang . String stream = generateStreamName ( ) ; eventstore . appendToStream ( stream , ExpectedVersion . ANY , newTestEvent ( ) ) . join ( ) ; eventstore . appendToStream ( stream , ExpectedVersion . ANY , newTestEvent ( ) ) . join ( ) ; java . lang . String projection = "projection-" + stream ; java . lang . String originalQuery = com . github . msemys . esjc . projection . ITProjectionManager . createStandardQuery ( stream ) ; java . lang . String newQuery = com . github . msemys . esjc . projection . ITProjectionManager . createStandardQuery ( "DifferentStream" ) ; projectionManager . create ( projection , originalQuery , com . github . msemys . esjc . projection . CONTINUOUS ) . join ( ) ; projectionManager . update ( projection , newQuery ) . join ( ) ; java . lang . String result = projectionManager . getQuery ( projection ) . join ( ) ; "<AssertPlaceHolder>" ; } createStandardQuery ( java . lang . String ) { return ( ( ( ( ( ( ( "fromStream(\"" + stream ) + "\")<sp>\n" ) + "<sp>.when({<sp>\n" ) + "<sp>\"$any\":function(s,e)<sp>{<sp>\n" ) + "<sp>s.count<sp>=<sp>1;<sp>\n" ) + "<sp>return<sp>s;<sp>\n" ) + "<sp>}<sp>\n" ) + "<sp>});" ; }
|
org . junit . Assert . assertEquals ( newQuery , result )
|
doubleFailureFirstEarlier ( ) { first . failure ( new java . lang . Throwable ( ) ) ; second . failure ( new java . lang . Throwable ( ) ) ; "<AssertPlaceHolder>" ; } failure ( java . lang . Throwable ) { if ( alreadyHandled ( ) ) { throw new java . lang . IllegalStateException ( "Async<sp>already<sp>completed" ) ; } myFailureThrowable = throwable ; myFailed = true ; for ( jetbrains . jetpad . base . function . Consumer < java . lang . Throwable > handler : myFailureHandlers ) { try { handler . accept ( throwable ) ; } catch ( java . lang . Throwable t ) { jetbrains . jetpad . base . ThrowableHandlers . handle ( t ) ; } } clearHandlers ( ) ; }
|
org . junit . Assert . assertNotNull ( error )
|
dereferenceNullPointer ( ) { "<AssertPlaceHolder>" ; } deref ( org . openscience . cdk . interfaces . IAtom ) { while ( atom instanceof org . openscience . cdk . AtomRef ) atom = ( ( org . openscience . cdk . AtomRef ) ( atom ) ) . deref ( ) ; return atom ; }
|
org . junit . Assert . assertNull ( org . openscience . cdk . AtomRef . deref ( null ) )
|
insertOwner ( ) { javax . sql . DataSource ds = createDs ( ) ; com . example . OwnerRecord r = new com . example . OwnerRecord ( ) ; r . setName ( "Humberto" ) ; table ( ) . insert ( r ) ; table ( ) . findByPK ( 1 ) ; java . util . List < com . example . OwnerRecord > owners = table ( ) . queryAll ( ) ; "<AssertPlaceHolder>" ; } queryAll ( ) { java . util . List < com . example . OwnerRecord > all = table ( ) . queryAll ( ) ; org . junit . Assert . assertTrue ( ( ( all . size ( ) ) >= 0 ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( owners . size ( ) ) >= 1 ) )
|
testDataloss2 ( ) { net . tomp2p . dht . PeerDHT p1 = null ; net . tomp2p . dht . PeerDHT p2 = null ; net . tomp2p . dht . PeerDHT p3 = null ; try { p1 = new net . tomp2p . dht . PeerBuilderDHT ( new net . tomp2p . p2p . PeerBuilder ( net . tomp2p . peers . Number160 . createHash ( "111" ) ) . ports ( net . tomp2p . replication . TestReplication . PORT ) . start ( ) ) . start ( ) ; p2 = new net . tomp2p . dht . PeerBuilderDHT ( new net . tomp2p . p2p . PeerBuilder ( net . tomp2p . peers . Number160 . createHash ( "22" ) ) . ports ( ( ( net . tomp2p . replication . TestReplication . PORT ) + 1 ) ) . start ( ) ) . start ( ) ; p3 = new net . tomp2p . dht . PeerBuilderDHT ( new net . tomp2p . p2p . PeerBuilder ( net . tomp2p . peers . Number160 . createHash ( "33" ) ) . ports ( ( ( net . tomp2p . replication . TestReplication . PORT ) + 2 ) ) . start ( ) ) . start ( ) ; net . tomp2p . replication . IndirectReplication i1 = new net . tomp2p . replication . IndirectReplication ( p1 ) ; i1 . start ( ) ; net . tomp2p . replication . IndirectReplication i2 = new net . tomp2p . replication . IndirectReplication ( p2 ) ; i2 . start ( ) ; net . tomp2p . replication . IndirectReplication i3 = new net . tomp2p . replication . IndirectReplication ( p3 ) ; i3 . start ( ) ; net . tomp2p . Utils2 . perfectRouting ( p1 , p2 , p3 ) ; net . tomp2p . peers . Number160 locationKey = net . tomp2p . peers . Number160 . createHash ( "test1" ) ; net . tomp2p . dht . FuturePut fp = p2 . put ( locationKey ) . data ( new net . tomp2p . storage . Data ( "hallo" ) ) . requestP2PConfiguration ( new net . tomp2p . p2p . RequestP2PConfiguration ( 2 , 10 , 0 ) ) . start ( ) ; fp . awaitUninterruptibly ( ) ; net . tomp2p . replication . TestReplication . getReplicasCount ( locationKey , p1 , p2 , p3 ) ; p3 . peer ( ) . announceShutdown ( ) . start ( ) . awaitUninterruptibly ( ) ; p3 . shutdown ( ) . awaitUninterruptibly ( ) ; p1 . peer ( ) . announceShutdown ( ) . start ( ) . awaitUninterruptibly ( ) ; p1 . shutdown ( ) . awaitUninterruptibly ( ) ; java . lang . Thread . sleep ( 500 ) ; net . tomp2p . replication . TestReplication . getReplicasCount ( locationKey , p1 , p2 , p3 ) ; p3 = new net . tomp2p . dht . PeerBuilderDHT ( new net . tomp2p . p2p . PeerBuilder ( locationKey ) . ports ( ( ( net . tomp2p . replication . TestReplication . PORT ) + 3 ) ) . start ( ) ) . start ( ) ; i3 = new net . tomp2p . replication . IndirectReplication ( p3 ) ; i3 . start ( ) ; System . out . println ( ( ( "now<sp>we<sp>add<sp>a<sp>peer<sp>that<sp>matches<sp>perfectly<sp>the<sp>key<sp>" + locationKey ) + ".<sp>This<sp>will<sp>now<sp>become<sp>the<sp>responsible<sp>peer" ) ) ; p3 . peer ( ) . bootstrap ( ) . peerAddress ( p2 . peerAddress ( ) ) . start ( ) . awaitUninterruptibly ( ) ; p1 = new net . tomp2p . dht . PeerBuilderDHT ( new net . tomp2p . p2p . PeerBuilder ( net . tomp2p . peers . Number160 . createHash ( "1111" ) ) . ports ( ( ( net . tomp2p . replication . TestReplication . PORT ) + 4 ) ) . start ( ) ) . start ( ) ; i1 = new net . tomp2p . replication . IndirectReplication ( p1 ) ; i1 . start ( ) ; p1 . peer ( ) . bootstrap ( ) . peerAddress ( p2 . peerAddress ( ) ) . start ( ) . awaitUninterruptibly ( ) ; net . tomp2p . replication . TestReplication . getReplicasCount ( locationKey , p1 , p2 , p3 ) ; java . lang . Thread . sleep ( 500 ) ; int count = net . tomp2p . replication . TestReplication . getReplicasCount ( locationKey , p1 , p2 , p3 ) ; "<AssertPlaceHolder>" ; } finally { if ( ( p1 != null ) && ( ! ( p1 . peer ( ) . isShutdown ( ) ) ) ) { p1 . shutdown ( ) . awaitUninterruptibly ( ) ; } if ( ( p2 != null ) && ( ! ( p2 . peer ( ) . isShutdown ( ) ) ) ) { p2 . shutdown ( ) . awaitUninterruptibly ( ) ; } if ( ( p3 != null ) && ( ! ( p3 . peer ( ) . isShutdown ( ) ) ) ) { p3 . shutdown ( ) . awaitUninterruptibly ( ) ; } } } awaitUninterruptibly ( ) { synchronized ( lock ) { checkDeadlock ( ) ; while ( ! ( completed ) ) { try { lock . wait ( ) ; } catch ( final java . lang . InterruptedException e ) { net . tomp2p . futures . BaseFutureImpl . LOG . debug ( "interrupted,<sp>but<sp>ignoring" , e ) ; } } } return self ; }
|
org . junit . Assert . assertEquals ( 2 , count )
|
testConstructor_ExprAndExprList ( ) { org . apache . jena . sparql . expr . Expr e = new org . apache . jena . sparql . expr . E_FunctionDynamic ( Expr . NONE , new org . apache . jena . sparql . expr . ExprList ( ) ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( ( e instanceof org . apache . jena . sparql . expr . E_FunctionDynamic ) )
|
testSerde ( ) { final com . fasterxml . jackson . databind . ObjectMapper mapper = new org . apache . druid . jackson . DefaultObjectMapper ( ) ; final org . apache . druid . segment . realtime . firehose . HttpFirehoseFactory factory = new org . apache . druid . segment . realtime . firehose . HttpFirehoseFactory ( com . google . common . collect . ImmutableList . of ( java . net . URI . create ( "http://foo/bar" ) , java . net . URI . create ( "http://foo/bar2" ) ) , 2048L , 1024L , 512L , 100L , 5 ) ; final org . apache . druid . segment . realtime . firehose . HttpFirehoseFactory outputFact = mapper . readValue ( mapper . writeValueAsString ( factory ) , org . apache . druid . segment . realtime . firehose . HttpFirehoseFactory . class ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Iterable ) { return new org . apache . druid . java . util . common . guava . FunctionalIterable ( delegate ) ; }
|
org . junit . Assert . assertEquals ( factory , outputFact )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.