input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
equals_shouldReturnFalseIfGivenObjIsNotInstanceOfBaseOpenmrsObject ( ) { org . openmrs . BaseOpenmrsObject o = new org . openmrs . BaseOpenmrsObjectTest . BaseOpenmrsObjectMock ( ) ; java . lang . Object obj = new java . lang . Object ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( obj instanceof org . openmrs . ConceptReferenceTermMap ) ) { return false ; } org . openmrs . ConceptReferenceTermMap rhs = ( ( org . openmrs . ConceptReferenceTermMap ) ( obj ) ) ; if ( ( ( this . conceptReferenceTermMapId ) != null ) && ( ( rhs . conceptReferenceTermMapId ) != null ) ) { return this . conceptReferenceTermMapId . equals ( rhs . conceptReferenceTermMapId ) ; } return ( this ) == obj ; }
org . junit . Assert . assertFalse ( o . equals ( obj ) )
testEmptyParagraphContainer ( ) { this . chain . addListener ( new org . xwiki . rendering . listener . chaining . AbstractChainingListener ( ) { { setListenerChain ( org . xwiki . rendering . listener . chaining . EmptyBlockChainingListenerTest . this . chain ) ; } @ org . xwiki . rendering . listener . chaining . Override public void endParagraph ( java . util . Map < java . lang . String , java . lang . String > parameters ) { org . xwiki . rendering . listener . chaining . EmptyBlockChainingListener blockState = ( ( org . xwiki . rendering . listener . chaining . EmptyBlockChainingListener ) ( getListenerChain ( ) . getListener ( org . xwiki . rendering . listener . chaining . EmptyBlockChainingListener . class ) ) ) ; "<AssertPlaceHolder>" ; } } ) ; this . listener . beginParagraph ( java . util . Collections . < java . lang . String , java . lang . String > emptyMap ( ) ) ; this . listener . endParagraph ( java . util . Collections . < java . lang . String , java . lang . String > emptyMap ( ) ) ; } isCurrentContainerBlockEmpty ( ) { return this . containerBlockStates . peek ( ) ; }
org . junit . Assert . assertTrue ( blockState . isCurrentContainerBlockEmpty ( ) )
testObjectDeserialization ( ) { com . owlike . genson . Genson genson = createTimestampGenson ( java . time . LocalDateTime . class , TimestampFormat . OBJECT ) ; java . time . LocalDateTime dt = java . time . LocalDateTime . of ( 2011 , 11 , 10 , 9 , 8 , 7 , 1223 ) ; java . lang . String json = "{\"year\":2011,\"month\":11,\"day\":10,\"hour\":9,\"minute\":8,\"second\":7,\"nano\":1223}" ; "<AssertPlaceHolder>" ; } deserialize ( com . owlike . genson . stream . ObjectReader , com . owlike . genson . Context ) { T obj ; if ( options . isAsTimestamp ( ) ) { switch ( options . getTimestampFormat ( ) ) { case ARRAY : obj = readArray ( reader ) ; break ; case OBJECT : obj = readObject ( reader ) ; break ; default : throw new java . lang . IllegalArgumentException ( "Unsupported<sp>timestamp<sp>format" ) ; } } else { obj = parseFunction . apply ( reader . valueAsString ( ) ) ; } return obj ; }
org . junit . Assert . assertEquals ( dt , genson . deserialize ( json , java . time . LocalDateTime . class ) )
testToString ( ) { io . ebeaninternal . json . ModifyAwareMap < java . lang . String , java . lang . String > map = createMap ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( "beanType:" + ( beanType ) ) + "<sp>queryKey:" ) + ( queryKey ) ) + "<sp>sql:" ) + ( sql ) ; }
org . junit . Assert . assertEquals ( map . map . toString ( ) , map . toString ( ) )
testSetItemCountWithSetDataListener ( ) { shell . setSize ( 100 , 100 ) ; shell . open ( ) ; org . eclipse . swt . widgets . Table table = new org . eclipse . swt . widgets . Table ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; table . setSize ( 90 , 90 ) ; table . addListener ( SWT . SetData , new org . eclipse . swt . widgets . Listener ( ) { @ org . eclipse . swt . widgets . Override public void handleEvent ( org . eclipse . swt . widgets . Event event ) { org . junit . Assert . fail ( "SetItemCount<sp>must<sp>not<sp>fire<sp>SetData<sp>events" ) ; } } ) ; table . setItemCount ( 200 ) ; "<AssertPlaceHolder>" ; } getItemCount ( ) { checkWidget ( ) ; return hasChildren ? getItemData ( ) . getChildren ( ) . size ( ) : 0 ; }
org . junit . Assert . assertEquals ( 200 , table . getItemCount ( ) )
testConvertFromLightwaveRfMessageOnCommand ( ) { org . openhab . binding . lightwaverf . internal . LightwaverfConvertor convertor = new org . openhab . binding . lightwaverf . internal . LightwaverfConvertor ( ) ; org . openhab . binding . lightwaverf . internal . command . LightwaveRFCommand command = convertor . convertFromLightwaveRfMessage ( "010,!R2D3F1" ) ; org . openhab . binding . lightwaverf . internal . command . LightwaveRFCommand expected = new org . openhab . binding . lightwaverf . internal . command . LightwaveRfOnOffCommand ( 10 , "2" , "3" , true ) ; "<AssertPlaceHolder>" ; } convertFromLightwaveRfMessage ( java . lang . String ) { if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfCommandOk . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfCommandOk ( message ) ; } else if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfVersionMessage . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfVersionMessage ( message ) ; } else if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfDeviceRegistrationCommand . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfDeviceRegistrationCommand ( message ) ; } else if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfHeatingInfoResponse . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfHeatingInfoResponse ( message ) ; } else if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfSetHeatingTemperatureCommand . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfSetHeatingTemperatureCommand ( message ) ; } else if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfHeatInfoRequest . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfHeatInfoRequest ( message ) ; } else if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfDimCommand . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfDimCommand ( message ) ; } else if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfOnOffCommand . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfOnOffCommand ( message ) ; } else if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfEnergyMonitorMessage . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfEnergyMonitorMessage ( message ) ; } else if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfWifiLinkStatusMessage . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfWifiLinkStatusMessage ( message ) ; } else if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfMoodCommand . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfMoodCommand ( message ) ; } else if ( org . openhab . binding . lightwaverf . internal . command . LightwaveRfAllOffCommand . matches ( message ) ) { return new org . openhab . binding . lightwaverf . internal . command . LightwaveRfAllOffCommand ( message ) ; } throw new org . openhab . binding . lightwaverf . internal . exception . LightwaveRfMessageException ( ( "Message<sp>not<sp>recorgnised:<sp>" + message ) ) ; }
org . junit . Assert . assertEquals ( expected , command )
shouldBeValidWhenAccessAndRefreshTokenArePresent ( ) { com . soundcloud . api . Token t = new com . soundcloud . api . Token ( "1" , "2" ) ; "<AssertPlaceHolder>" ; } valid ( ) { return ( ( access ) != null ) && ( ( scoped ( com . soundcloud . api . Token . SCOPE_NON_EXPIRING ) ) || ( ( refresh ) != null ) ) ; }
org . junit . Assert . assertTrue ( t . valid ( ) )
testNothingRenderedIfNotActivated ( ) { renderer . render ( ) ; org . eclipse . rap . rwt . testfixture . internal . TestMessage message = org . eclipse . rap . rwt . testfixture . internal . Fixture . getProtocolMessage ( ) ; "<AssertPlaceHolder>" ; } getOperationCount ( ) { return getOperations ( ) . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , message . getOperationCount ( ) )
testSetClock ( ) { org . opengis . temporal . Clock result = calendar1 . getClock ( ) ; ( ( org . geotools . temporal . reference . DefaultCalendar ) ( calendar1 ) ) . setClock ( null ) ; "<AssertPlaceHolder>" ; } getClock ( ) { return timeBasis ; }
org . junit . Assert . assertEquals ( calendar1 . getClock ( ) , result )
toStrTest2 ( ) { java . lang . String result = cn . hutool . core . convert . Convert . convert ( java . lang . String . class , "aaaa" ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . CharSequence ) { return "Custom:<sp>" + ( value . toString ( ) ) ; }
org . junit . Assert . assertEquals ( "aaaa" , result )
testAuthorAfterDocumentCopy ( ) { org . xwiki . model . reference . DocumentReference author = new org . xwiki . model . reference . DocumentReference ( "Wiki" , "XWiki" , "Albatross" ) ; this . document . setAuthorReference ( author ) ; com . xpn . xwiki . doc . XWikiDocument copy = this . document . copyDocument ( ( ( this . document . getName ( ) ) + "<sp>Copy" ) , this . oldcore . getXWikiContext ( ) ) ; "<AssertPlaceHolder>" ; } getAuthorReference ( ) { return authorReference ; }
org . junit . Assert . assertEquals ( author , copy . getAuthorReference ( ) )
testGetBuildTime ( ) { "<AssertPlaceHolder>" ; } getBuildTime ( ) { return com . hazelcast . simulator . common . GitInfo . INSTANCE . properties . getProperty ( com . hazelcast . simulator . common . GitInfo . GIT_BUILD_TIME , com . hazelcast . simulator . common . GitInfo . UNKNOWN ) ; }
org . junit . Assert . assertNotNull ( com . hazelcast . simulator . common . GitInfo . getBuildTime ( ) )
testCreateFillsMessageFromMessageParam ( ) { javax . jms . JMSException result = org . apache . qpid . jms . exceptions . JmsExceptionSupport . create ( ERROR_MESSAGE , new java . io . IOException ( CAUSE_MESSAGE ) ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; }
org . junit . Assert . assertEquals ( ERROR_MESSAGE , result . getMessage ( ) )
testCollectionInClassWithRandom ( ) { final net . sf . qualitytest . blueprint . BlueprintTest_collection . WithCollection wc = net . sf . qualitytest . blueprint . Blueprint . random ( ) . construct ( net . sf . qualitytest . blueprint . BlueprintTest_collection . WithCollection . class ) ; "<AssertPlaceHolder>" ; } getElements ( ) { return elements ; }
org . junit . Assert . assertTrue ( wc . getElements ( ) . isEmpty ( ) )
testGetTimeInstantISO8601TimestampWithMicroseconds ( ) { System . out . println ( ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[CommonUtils.getTimeInstant]" ) ) + "--------<sp>When<sp>getting<sp>a<sp>time<sp>instant,<sp>it<sp>is<sp>properly<sp>obtained<sp>when<sp>passing<sp>a<sp>valid<sp>" ) + "ISO<sp>8601<sp>timestamp<sp>with<sp>microseconds" ) ) ; org . json . simple . JSONObject metadataJson = new org . json . simple . JSONObject ( ) ; metadataJson . put ( "name" , "[CommonUtils.getTimeInstant]" 2 ) ; metadataJson . put ( "type" , "SQL<sp>timestamp" ) ; metadataJson . put ( "value" , "2017-01-01T00:00:01.123456Z" ) ; org . json . simple . JSONArray metadatasJson = new org . json . simple . JSONArray ( ) ; metadatasJson . add ( metadataJson ) ; java . lang . String metadatasStr = metadatasJson . toJSONString ( ) ; java . lang . Long timeInstant = com . telefonica . iot . cygnus . utils . CommonUtils . getTimeInstant ( metadatasStr ) ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( ( ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[CommonUtils.getTimeInstant]" ) ) + "[CommonUtils.getTimeInstant]" 0 ) + ( metadatasJson . toJSONString ( ) ) ) + "'<sp>is<sp>'" ) + timeInstant ) + "'" ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[CommonUtils.getTimeInstant]" ) ) + "[CommonUtils.getTimeInstant]" 1 ) ) ; throw e ; } getTimeInstant ( java . lang . String ) { java . lang . Long res = null ; org . json . simple . parser . JSONParser parser = new org . json . simple . parser . JSONParser ( ) ; org . json . simple . JSONArray mds ; try { mds = ( ( org . json . simple . JSONArray ) ( parser . parse ( metadata ) ) ) ; } catch ( org . json . simple . parser . ParseException e ) { com . telefonica . iot . cygnus . utils . CommonUtils . LOGGER . error ( ( "Error<sp>while<sp>parsing<sp>the<sp>metadaga.<sp>Details:<sp>" + ( e . getMessage ( ) ) ) ) ; return null ; } for ( java . lang . Object mdObject : mds ) { org . json . simple . JSONObject md = ( ( org . json . simple . JSONObject ) ( mdObject ) ) ; java . lang . String mdName = ( ( java . lang . String ) ( md . get ( "name" ) ) ) ; if ( mdName . equals ( "TimeInstant" ) ) { java . lang . String mdValue = ( ( java . lang . String ) ( md . get ( "value" ) ) ) ; if ( com . telefonica . iot . cygnus . utils . CommonUtils . isANumber ( mdValue ) ) { res = new java . lang . Long ( mdValue ) ; } else { org . joda . time . DateTime dateTime ; try { dateTime = com . telefonica . iot . cygnus . utils . CommonUtils . FORMATTER1 . parseDateTime ( mdValue ) ; } catch ( java . lang . Exception e1 ) { com . telefonica . iot . cygnus . utils . CommonUtils . LOGGER . debug ( e1 . getMessage ( ) ) ; try { dateTime = com . telefonica . iot . cygnus . utils . CommonUtils . FORMATTER2 . parseDateTime ( mdValue ) ; } catch ( java . lang . Exception e2 ) { com . telefonica . iot . cygnus . utils . CommonUtils . LOGGER . debug ( e2 . getMessage ( ) ) ; try { java . lang . String mdValueTruncated = ( mdValue . substring ( 0 , ( ( mdValue . length ( ) ) - 4 ) ) ) + "Z" ; dateTime = com . telefonica . iot . cygnus . utils . CommonUtils . FORMATTER2 . parseDateTime ( mdValueTruncated ) ; } catch ( java . lang . Exception e3 ) { com . telefonica . iot . cygnus . utils . CommonUtils . LOGGER . debug ( e3 . getMessage ( ) ) ; try { dateTime = com . telefonica . iot . cygnus . utils . CommonUtils . FORMATTER3 . parseDateTime ( mdValue ) ; } catch ( java . lang . Exception e4 ) { com . telefonica . iot . cygnus . utils . CommonUtils . LOGGER . debug ( e4 . getMessage ( ) ) ; try { dateTime = com . telefonica . iot . cygnus . utils . CommonUtils . FORMATTER4 . parseDateTime ( mdValue ) ; } catch ( java . lang . Exception e5 ) { com . telefonica . iot . cygnus . utils . CommonUtils . LOGGER . debug ( e5 . getMessage ( ) ) ; try { java . lang . String mdValueTruncated = mdValue . substring ( 0 , ( ( mdValue . length ( ) ) - 3 ) ) ; dateTime = com . telefonica . iot . cygnus . utils . CommonUtils . FORMATTER4 . parseDateTime ( mdValueTruncated ) ; } catch ( java . lang . Exception e6 ) { com . telefonica . iot . cygnus . utils . CommonUtils . LOGGER . debug ( e6 . getMessage ( ) ) ; try { dateTime = com . telefonica . iot . cygnus . utils . CommonUtils . FORMATTER5 . parseDateTime ( mdValue ) ; } catch ( java . lang . Exception e7 ) { com . telefonica . iot . cygnus . utils . CommonUtils . LOGGER . debug ( e7 . getMessage ( ) ) ; try { java . util . regex . Matcher matcher = com . telefonica . iot . cygnus . utils . CommonUtils . FORMATTER6_PATTERN . matcher ( mdValue )
org . junit . Assert . assertTrue ( ( timeInstant != null ) )
testDirectory ( ) { com . sapher . youtubedl . YoutubeDLRequest request = new com . sapher . youtubedl . YoutubeDLRequest ( com . sapher . youtubedl . YoutubeDLTest . VIDEO_URL , com . sapher . youtubedl . YoutubeDLTest . DIRECTORY ) ; request . setOption ( "simulate" ) ; com . sapher . youtubedl . YoutubeDLResponse response = com . sapher . youtubedl . YoutubeDL . execute ( request ) ; "<AssertPlaceHolder>" ; } getDirectory ( ) { return directory ; }
org . junit . Assert . assertEquals ( com . sapher . youtubedl . YoutubeDLTest . DIRECTORY , response . getDirectory ( ) )
testInvalidDialect ( ) { final org . drools . compiler . lang . descr . PackageDescr pkgDescr = new org . drools . compiler . lang . descr . PackageDescr ( "org.drools" ) ; final org . drools . compiler . lang . descr . RuleDescr ruleDescr = new org . drools . compiler . lang . descr . RuleDescr ( "Test<sp>Rule" ) ; ruleDescr . addAttribute ( new org . drools . compiler . lang . descr . AttributeDescr ( "dialect" , "mvl" ) ) ; ruleDescr . setConsequence ( "" ) ; pkgDescr . addRule ( ruleDescr ) ; final org . drools . compiler . builder . impl . KnowledgeBuilderImpl kBuilder = new org . drools . compiler . builder . impl . KnowledgeBuilderImpl ( ) ; kBuilder . addPackage ( pkgDescr ) ; "<AssertPlaceHolder>" ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertFalse ( kBuilder . getErrors ( ) . toString ( ) , kBuilder . getErrors ( ) . isEmpty ( ) )
testSerialization ( ) { org . jfree . data . KeyedObjects ko1 = new org . jfree . data . KeyedObjects ( ) ; ko1 . addObject ( "Key<sp>1" , "Object<sp>1" ) ; ko1 . addObject ( "Key<sp>2" , null ) ; ko1 . addObject ( "Key<sp>3" , "Object<sp>2" ) ; org . jfree . data . KeyedObjects ko2 = ( ( org . jfree . data . KeyedObjects ) ( org . jfree . chart . TestUtils . serialised ( ko1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( ko1 , ko2 )
shouldTerminateOnAuthExpiryDuringSTREAMINGPullAll ( ) { org . neo4j . bolt . runtime . BoltResponseHandler responseHandler = mock ( org . neo4j . bolt . runtime . BoltResponseHandler . class ) ; doThrow ( new org . neo4j . graphdb . security . AuthorizationExpiredException ( "Auth<sp>expired!" ) ) . when ( responseHandler ) . onRecords ( any ( ) , anyBoolean ( ) ) ; org . neo4j . bolt . runtime . BoltStateMachine machine = org . neo4j . bolt . v1 . runtime . MachineRoom . init ( org . neo4j . bolt . v1 . runtime . MachineRoom . newMachine ( ) ) ; machine . process ( new org . neo4j . bolt . v1 . messaging . request . RunMessage ( "RETURN<sp>1" , org . neo4j . bolt . v1 . runtime . MachineRoom . EMPTY_PARAMS ) , nullResponseHandler ( ) ) ; org . neo4j . bolt . v1 . runtime . BoltStateMachineV1Test . txStateMachine ( machine ) . ctx . currentResult = org . neo4j . bolt . runtime . BoltResult . EMPTY ; try { machine . process ( PullAllMessage . INSTANCE , responseHandler ) ; org . junit . Assert . fail ( "Exception<sp>expected" ) ; } catch ( org . neo4j . bolt . runtime . BoltConnectionAuthFatality e ) { "<AssertPlaceHolder>" ; } } getCause ( ) { return failure ; }
org . junit . Assert . assertEquals ( "Auth<sp>expired!" , e . getCause ( ) . getMessage ( ) )
shouldAppendParametersToSimpleUrl ( ) { java . lang . String url = "http://www.example.com" ; final java . lang . String expectedUrl = "http://www.example.com?param1=value1&param2=value%20with%20spaces" ; params . add ( "param1" , "value1" ) ; params . add ( "param2" , "value<sp>with<sp>spaces" ) ; url = params . appendTo ( url ) ; "<AssertPlaceHolder>" ; } appendTo ( java . lang . String ) { com . github . scribejava . core . utils . Preconditions . checkNotNull ( url , "Cannot<sp>append<sp>to<sp>null<sp>URL" ) ; final java . lang . String queryString = asFormUrlEncodedString ( ) ; if ( queryString . equals ( com . github . scribejava . core . model . ParameterList . EMPTY_STRING ) ) { return url ; } else { return ( url + ( ( url . indexOf ( com . github . scribejava . core . model . ParameterList . QUERY_STRING_SEPARATOR ) ) == ( - 1 ) ? com . github . scribejava . core . model . ParameterList . QUERY_STRING_SEPARATOR : com . github . scribejava . core . model . ParameterList . PARAM_SEPARATOR ) ) + queryString ; } }
org . junit . Assert . assertEquals ( expectedUrl , url )
updateTx1 ( ) { int effect = userInfoDBService . tx ( ( ) -> userInfoDBService . updateBatch2 ( "" , 6 , 2 ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( effect , equalTo ( ( - 1 ) ) )
testSize ( ) { com . flowpowered . math . vector . VectorNd vector = new com . flowpowered . math . vector . VectorNd ( 0 , ( ( double ) ( 1.1 ) ) , ( ( double ) ( 2.2 ) ) , ( ( double ) ( 3.3 ) ) , ( ( double ) ( 4.4 ) ) , ( ( double ) ( 5.5 ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return vec . length ; }
org . junit . Assert . assertEquals ( vector . size ( ) , 6 )
testFromEbXML ( ) { org . openehealth . ipf . commons . ihe . xds . core . ebxml . EbXMLClassification classification = transformer . toEbXML ( author , objectLibrary ) ; "<AssertPlaceHolder>" ; } fromEbXML ( org . openehealth . ipf . commons . ihe . xds . core . ebxml . EbXMLRetrieveDocumentSetRequest ) { if ( ebXML == null ) { return null ; } org . openehealth . ipf . commons . ihe . xds . core . requests . RetrieveDocumentSet request = new org . openehealth . ipf . commons . ihe . xds . core . requests . RetrieveDocumentSet ( ) ; request . getDocuments ( ) . addAll ( ebXML . getDocuments ( ) ) ; return request ; }
org . junit . Assert . assertEquals ( author , transformer . fromEbXML ( classification ) )
testWaitForJobs ( ) { org . opencastproject . job . api . Job job1 = new org . opencastproject . job . api . JobImpl ( 1 ) ; job1 . setStatus ( Status . FINISHED ) ; org . opencastproject . job . api . Job job2 = new org . opencastproject . job . api . JobImpl ( 2 ) ; job2 . setStatus ( Status . RUNNING ) ; org . opencastproject . job . api . Job job3 = new org . opencastproject . job . api . JobImpl ( 3 ) ; job3 . setStatus ( Status . FINISHED ) ; org . opencastproject . job . api . JobBarrier . Result result = org . opencastproject . util . JobUtil . waitForJobs ( job2 , serviceRegistry , 0L , 0L , new org . opencastproject . job . api . Job [ ] { job1 , job3 } ) ; "<AssertPlaceHolder>" ; } isSuccess ( ) { for ( final org . opencastproject . job . api . Job . Status state : status . values ( ) ) { if ( ! ( state . equals ( Job . Status . FINISHED ) ) ) return false ; } return true ; }
org . junit . Assert . assertTrue ( result . isSuccess ( ) )
testDdl_TYPE_NUMERIC ( ) { java . lang . String ddl = ( "CREATE<sp>FOREIGN<sp>TABLE<sp>ONE_TYPE<sp>(" + ( org . teiid . designer . vdb . dynamic . TestModelToDdlGenerator . BQT2_TYPE_DDL . TYPE_NUMERIC ) ) + ")<sp>OPTIONS(UPDATABLE<sp>'TRUE');" ; java . lang . String expectedDdl = ( "CREATE<sp>FOREIGN<sp>TABLE<sp>ONE_TYPE<sp>(" + ( org . teiid . designer . vdb . dynamic . TestModelToDdlGenerator . EXPECTED_BQT2_TYPE_DDL . TYPE_NUMERIC ) ) + ")<sp>OPTIONS(UPDATABLE<sp>'TRUE');" ; java . lang . String generatedDdl = roundTrip ( ddl , false ) ; "<AssertPlaceHolder>" ; } roundTrip ( java . lang . String , boolean ) { org . teiid . designer . core . workspace . ModelResource modelResource = createModelResource ( ddl , isVirtual ) ; java . lang . String generatedDdl = generator . generate ( modelResource ) ; generatedDdl = removeWhitespace ( generatedDdl ) ; return generatedDdl ; }
org . junit . Assert . assertEquals ( expectedDdl , generatedDdl )
inOnlyInAMutable ( ) { com . gs . collections . api . set . MutableSet < java . lang . Integer > onlyInA = this . setA . reject ( com . gs . collections . impl . block . factory . Predicates . in ( this . setB ) , com . gs . collections . impl . set . mutable . UnifiedSet . < java . lang . Integer > newSet ( ) ) ; "<AssertPlaceHolder>" ; } newSetWith ( com . gs . collections . api . block . HashingStrategy , K [ ] ) { return com . gs . collections . impl . set . strategy . mutable . UnifiedSetWithHashingStrategy . newSet ( hashingStrategy , elements . length ) . with ( elements ) ; }
org . junit . Assert . assertEquals ( com . gs . collections . impl . set . mutable . UnifiedSet . newSetWith ( 1 , 2 ) , onlyInA )
testGetServerDefaults ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; org . apache . hadoop . hdfs . MiniDFSCluster cluster = new org . apache . hadoop . hdfs . MiniDFSCluster . Builder ( conf ) . build ( ) ; try { cluster . waitActive ( ) ; org . apache . hadoop . hdfs . DistributedFileSystem dfs = cluster . getFileSystem ( ) ; org . apache . hadoop . fs . FsServerDefaults fsServerDefaults = dfs . getServerDefaults ( ) ; "<AssertPlaceHolder>" ; } finally { cluster . shutdown ( ) ; } } getServerDefaults ( ) { org . apache . hadoop . hdfs . protocol . proto . ClientNamenodeProtocolProtos . GetServerDefaultsRequestProto req = org . apache . hadoop . hdfs . protocolPB . ClientNamenodeProtocolTranslatorPB . VOID_GET_SERVER_DEFAULT_REQUEST ; try { return org . apache . hadoop . hdfs . protocolPB . PBHelperClient . convert ( rpcProxy . getServerDefaults ( null , req ) . getServerDefaults ( ) ) ; } catch ( com . google . protobuf . ServiceException e ) { throw org . apache . hadoop . ipc . ProtobufHelper . getRemoteException ( e ) ; } }
org . junit . Assert . assertNotNull ( fsServerDefaults )
testGetValueRequiredFalse ( ) { javax . servlet . http . Cookie [ ] cookies = new javax . servlet . http . Cookie [ ] { new javax . servlet . http . Cookie ( "c1" , null ) } ; new mockit . Expectations ( ) { { request . getCookies ( ) ; result = cookies ; } } ; org . apache . servicecomb . common . rest . codec . param . CookieProcessorCreator . CookieProcessor processor = createProcessor ( "c1" , java . lang . String . class , "test" , false ) ; java . lang . Object result = processor . getValue ( request ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . Object [ ] ) { return ( ( T ) ( args [ paramIndex ] ) ) ; }
org . junit . Assert . assertEquals ( "test" , result )
testSetVar ( ) { org . nuxeo . ecm . automation . OperationContext ctx = new org . nuxeo . ecm . automation . OperationContext ( session ) ; ctx . setInput ( src ) ; org . nuxeo . ecm . automation . OperationChain chain = new org . nuxeo . ecm . automation . OperationChain ( "testChain" ) ; chain . add ( SetVar . ID ) . set ( "name" , "myvar" ) . set ( "value" , org . nuxeo . ecm . automation . core . scripting . Scripting . newExpression ( "Document['dc:title']" ) ) ; chain . add ( "GetVar" ) . set ( "name" , "myvar" ) . set ( "flag" , true ) ; java . lang . Object out = service . run ( ctx , chain ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { return title ; }
org . junit . Assert . assertEquals ( src . getTitle ( ) , out )
userRestored ( ) { alluxio . conf . InstancedConfiguration conf = alluxio . ConfigurationTestUtils . defaults ( ) ; alluxio . security . authentication . AuthenticatedClientUser . set ( alluxio . AuthenticatedClientUserResourceTest . ORIGINAL_USER ) ; alluxio . security . User original = alluxio . security . authentication . AuthenticatedClientUser . get ( conf ) ; new alluxio . AuthenticatedClientUserResource ( alluxio . AuthenticatedClientUserResourceTest . TESTCASE_USER , conf ) . close ( ) ; "<AssertPlaceHolder>" ; } get ( alluxio . conf . AlluxioConfiguration ) { if ( ! ( alluxio . util . SecurityUtils . isAuthenticationEnabled ( conf ) ) ) { throw new java . io . IOException ( ExceptionMessage . AUTHENTICATION_IS_NOT_ENABLED . getMessage ( ) ) ; } return alluxio . security . authentication . AuthenticatedClientUser . sUserThreadLocal . get ( ) ; }
org . junit . Assert . assertSame ( original , alluxio . security . authentication . AuthenticatedClientUser . get ( conf ) )
testGetProperties ( ) { System . out . println ( "getProperties" ) ; fish . payara . nucleus . microprofile . config . source . SystemPropertyConfigSource instance = new fish . payara . nucleus . microprofile . config . source . SystemPropertyConfigSource ( true ) ; java . util . Properties expResult = java . lang . System . getProperties ( ) ; java . util . Map < java . lang . String , java . lang . String > result = instance . getProperties ( ) ; for ( java . lang . String stringPropertyName : expResult . stringPropertyNames ( ) ) { "<AssertPlaceHolder>" ; } } getProperty ( java . lang . String ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>supported<sp>yet." ) ; }
org . junit . Assert . assertEquals ( expResult . getProperty ( stringPropertyName ) , instance . getValue ( stringPropertyName ) )
givenAutowiredCluster_whenNotNull_thenNotNull ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( cluster )
testWrite_ByteBuffer ( ) { System . out . println ( "write" ) ; java . nio . ByteBuffer src = java . nio . ByteBuffer . wrap ( "test" . getBytes ( ) ) ; int expResult = 4 ; int result = instance . write ( src ) ; "<AssertPlaceHolder>" ; } write ( java . nio . ByteBuffer ) { fastFirstPacketRead = false ; int res = 0 ; int size = src . remaining ( ) ; while ( res < size ) { res += channel . write ( src ) ; } return res ; }
org . junit . Assert . assertEquals ( expResult , result )
testAfgelopenPeriodeActieZonderEinde2 ( ) { java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = brby0527 . executeer ( null , maakPersoonMetPlaats ( maakGemeente ( "24" , "gemeente" , 20000101 , null ) ) , maakActie ( "id.actie1" , 19911231 , 19911231 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , meldingen . size ( ) )
testExExDb ( ) { org . apache . hadoop . hive . metastore . LockRequestBuilder bldr = new org . apache . hadoop . hive . metastore . LockRequestBuilder ( ) ; org . apache . hadoop . hive . metastore . api . LockComponent comp = new org . apache . hadoop . hive . metastore . api . LockComponent ( org . apache . hadoop . hive . metastore . api . LockType . EXCLUSIVE , org . apache . hadoop . hive . metastore . api . LockLevel . DB , "mydb" ) ; bldr . addLockComponent ( comp ) ; comp = new org . apache . hadoop . hive . metastore . api . LockComponent ( org . apache . hadoop . hive . metastore . api . LockType . EXCLUSIVE , org . apache . hadoop . hive . metastore . api . LockLevel . DB , "mydb" ) ; bldr . addLockComponent ( comp ) . setUser ( "fred" ) ; org . apache . hadoop . hive . metastore . api . LockRequest req = bldr . build ( ) ; java . util . List < org . apache . hadoop . hive . metastore . api . LockComponent > locks = req . getComponent ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
org . junit . Assert . assertEquals ( 1 , locks . size ( ) )
userOriginatedUpdate_unbound_singleEventOnSetValue ( ) { com . vaadin . data . BinderValueChangeTest . TestTextField field = new com . vaadin . data . BinderValueChangeTest . TestTextField ( ) ; binder . forField ( field ) . bind ( Person :: getFirstName , Person :: setFirstName ) ; binder . forField ( ageField ) . withConverter ( new com . vaadin . data . converter . StringToIntegerConverter ( "" ) ) . bind ( Person :: getAge , Person :: setAge ) ; binder . addValueChangeListener ( this :: statusChanged ) ; "<AssertPlaceHolder>" ; field . setValue ( "foo" , true ) ; verifyEvent ( field , true ) ; } get ( ) { return com . vaadin . event . dd . acceptcriteria . SourceIsTarget . INSTANCE ; }
org . junit . Assert . assertNull ( event . get ( ) )
getCachedTrueNotFound ( ) { jenkins . security . UserDetailsCache cache = jenkins . security . UserDetailsCache . get ( ) ; "<AssertPlaceHolder>" ; try { cache . loadUserByUsername ( "bob" ) ; org . junit . Assert . fail ( "Bob<sp>should<sp>not<sp>be<sp>found" ) ; } catch ( org . acegisecurity . userdetails . UsernameNotFoundException e ) { } cache . getCached ( "bob" ) ; } get ( ) { return hudson . ExtensionList . lookupSingleton ( jenkins . security . UserDetailsCache . class ) ; }
org . junit . Assert . assertNotNull ( cache )
createFigIdMulti ( ) { java . lang . String figId = gov . uspto . patent . ReferenceTagger . createFigId ( "FIGS.<sp>1A<sp>and<sp>1B" ) ; java . lang . String expect = "FIG-1A,FIG-1B" ; "<AssertPlaceHolder>" ; } createFigId ( java . lang . String ) { java . util . regex . Matcher figMatcher = gov . uspto . patent . ReferenceTagger . PATENT_FIG . matcher ( text ) ; java . lang . StringBuilder stb = new java . lang . StringBuilder ( ) ; if ( figMatcher . matches ( ) ) { stb . append ( "FIG-" ) ; stb . append ( figMatcher . group ( 2 ) ) ; if ( ( figMatcher . group ( 3 ) ) != null ) { stb . append ( "," ) . append ( "FIG-" ) . append ( figMatcher . group ( 4 ) ) ; } } return stb . toString ( ) ; }
org . junit . Assert . assertEquals ( expect , figId )
testGeenmap ( ) { nl . bzk . brp . business . dto . bijhouding . AbstractBijhoudingsBericht simplegGeboorteBericht = maakSimpleInschrijvingBericht2 ( ) ; org . springframework . test . util . ReflectionTestUtils . setField ( simplegGeboorteBericht , "identificeerbaarObjectIndex" , null ) ; nl . bzk . brp . business . util . BerichtAdministratieUtil . verrijktBerichtMetIdentificeerbaarObjectIndex ( simplegGeboorteBericht ) ; java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = bedrijfsregel . executeer ( simplegGeboorteBericht ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
testCompareAndSet1 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . zeros ( 25 ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . zeros ( 25 ) ; array . putScalar ( 0 , 0.1F ) ; array . putScalar ( 10 , 0.1F ) ; array . putScalar ( 20 , 0.1F ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ops . impl . transforms . comparison . CompareAndSet ( array , 0.1 , 0.0 , 0.01 ) ) ; "<AssertPlaceHolder>" ; } getExecutioner ( ) { return org . nd4j . linalg . factory . Nd4j . OP_EXECUTIONER_INSTANCE ; }
org . junit . Assert . assertEquals ( assertion , array )
testRemoveJob ( ) { org . joice . schedule . request . RemoveJobRequest request = new org . joice . schedule . request . RemoveJobRequest ( "simple-cron-job" , "quartz-test" ) ; boolean ret = manager . removeJob ( request ) ; "<AssertPlaceHolder>" ; } removeJob ( org . joice . schedule . request . RemoveJobRequest ) { org . joice . common . util . LogUtil . info ( org . joice . schedule . core . DefaultScheduleManager . logger , "" ) ; request . validate ( ) ; org . quartz . JobKey jobKey = new org . quartz . JobKey ( request . getJobName ( ) , request . getJobGroup ( ) ) ; try { return scheduler . deleteJob ( jobKey ) ; } catch ( org . quartz . SchedulerException e ) { throw new java . lang . RuntimeException ( "" , e ) ; } }
org . junit . Assert . assertTrue ( ret )
testReadValues ( ) { org . glassfish . json . tests . JsonReader reader = org . glassfish . json . tests . Json . createReader ( new java . io . StringReader ( "\"someString\"" ) ) ; org . glassfish . json . tests . JsonArrayBuilder builder = org . glassfish . json . tests . Json . createArrayBuilder ( ) ; builder . add ( reader . readValue ( ) ) ; reader = org . glassfish . json . tests . Json . createReader ( new java . io . StringReader ( "100" ) ) ; builder . add ( reader . readValue ( ) ) ; reader = org . glassfish . json . tests . Json . createReader ( new java . io . StringReader ( "12345.6789" ) ) ; builder . add ( reader . readValue ( ) ) ; org . glassfish . json . tests . JsonArray array = builder . build ( ) ; builder = org . glassfish . json . tests . Json . createArrayBuilder ( ) ; org . glassfish . json . tests . JsonArray expected = builder . add ( "someString" ) . add ( 100 ) . add ( 12345.6789 ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new org . glassfish . json . JsonPatchImpl ( buildAsJsonArray ( ) ) ; }
org . junit . Assert . assertEquals ( expected , array )
getRawInputStreamReturnsNull ( ) { try ( final org . apache . commons . compress . archivers . zip . ZipFile zf = org . apache . commons . compress . archivers . zip . ZipFileIgnoringLocalFileHeaderTest . openZipWithoutLFH ( "bla.zip" ) ) { org . apache . commons . compress . archivers . zip . ZipArchiveEntry ze = zf . getEntry ( "test1.xml" ) ; "<AssertPlaceHolder>" ; } } getRawInputStream ( org . apache . commons . compress . archivers . zip . ZipArchiveEntry ) { if ( ! ( ze instanceof org . apache . commons . compress . archivers . zip . ZipFile . Entry ) ) { return null ; } final long start = ze . getDataOffset ( ) ; if ( start == ( org . apache . commons . compress . archivers . EntryStreamOffsets . OFFSET_UNKNOWN ) ) { return null ; } return createBoundedInputStream ( start , ze . getCompressedSize ( ) ) ; }
org . junit . Assert . assertNull ( zf . getRawInputStream ( ze ) )
testSerialization ( ) { com . orsoncharts . data . DefaultKeyedValues < java . lang . String , java . lang . Number > kv1 = new com . orsoncharts . data . DefaultKeyedValues < java . lang . String , java . lang . Number > ( ) ; kv1 . put ( "A" , 1.0 ) ; kv1 . put ( "B" , 2.0 ) ; kv1 . put ( "C" , null ) ; com . orsoncharts . data . DefaultKeyedValues < java . lang . String , java . lang . Number > kv2 = ( ( com . orsoncharts . data . DefaultKeyedValues < java . lang . String , java . lang . Number > ) ( com . orsoncharts . TestUtils . serialized ( kv1 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof com . orsoncharts . graphics3d . Offset3D ) ) { return false ; } com . orsoncharts . graphics3d . Offset3D that = ( ( com . orsoncharts . graphics3d . Offset3D ) ( obj ) ) ; if ( ( this . dx ) != ( that . dx ) ) { return false ; } if ( ( this . dy ) != ( that . dy ) ) { return false ; } if ( ( this . dz ) != ( that . dz ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( kv1 . equals ( kv2 ) )
shouldReturnTrueForCorrectUser ( ) { org . togglz . core . user . FeatureUser user = new org . togglz . core . user . SimpleFeatureUser ( "ck" , false ) ; org . togglz . core . repository . FeatureState state = new org . togglz . core . repository . FeatureState ( org . togglz . core . activation . UsernameActivationStrategyTest . MyFeature . FEATURE ) . enable ( ) . setStrategyId ( UsernameActivationStrategy . ID ) . setParameter ( UsernameActivationStrategy . PARAM_USERS , "person1,ck,person2" ) ; boolean active = strategy . isActive ( state , user ) ; "<AssertPlaceHolder>" ; } isActive ( org . togglz . core . repository . FeatureState , org . togglz . core . user . FeatureUser ) { return true ; }
org . junit . Assert . assertEquals ( true , active )
testDistanceNullParentNullChild ( ) { "<AssertPlaceHolder>" ; } distance ( java . lang . Class , java . lang . Class ) { if ( ( child == null ) || ( parent == null ) ) { return - 1 ; } if ( child . equals ( parent ) ) { return 0 ; } final java . lang . Class < ? > cParent = child . getSuperclass ( ) ; int d = org . apache . commons . lang3 . BooleanUtils . toInteger ( parent . equals ( cParent ) ) ; if ( d == 1 ) { return d ; } d += org . apache . commons . lang3 . reflect . InheritanceUtils . distance ( cParent , parent ) ; return d > 0 ? d + 1 : - 1 ; }
org . junit . Assert . assertEquals ( ( - 1 ) , org . apache . commons . lang3 . reflect . InheritanceUtils . distance ( null , null ) )
testCreationOfExceptionIsAsExpected ( ) { final com . gazbert . bxbot . trading . api . TradingApiException exception = new com . gazbert . bxbot . trading . api . TradingApiException ( com . gazbert . bxbot . trading . api . TestTradingApiExceptionCreation . ERROR_MSG ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( com . gazbert . bxbot . trading . api . TestTradingApiExceptionCreation . ERROR_MSG , exception . getMessage ( ) )
testDeserialization_Value2 ( ) { java . time . Period p = deserialize ( java . time . Period . class , "\"P5Y8M3D\"" ) ; "<AssertPlaceHolder>" ; } deserialize ( java . lang . Class , java . lang . String ) { com . fasterxml . jackson . dataformat . yaml . YAMLParser parser = new com . fasterxml . jackson . dataformat . yaml . YAMLFactory ( ) . createParser ( yml ) ; return jacksonService . newObjectMapper ( ) . readValue ( parser , type ) ; }
org . junit . Assert . assertEquals ( java . time . Period . of ( 5 , 8 , 3 ) , p )
unprocessedPropertiesAfterBuild ( ) { org . everit . json . schema . ReferenceSchema . Builder builder = org . everit . json . schema . ReferenceSchema . builder ( ) . refValue ( "#/pointer" ) ; org . everit . json . schema . ReferenceSchema subject = builder . build ( ) ; subject . setReferredSchema ( org . everit . json . schema . EmptySchema . builder ( ) . build ( ) ) ; builder . unprocessedProperties ( org . everit . json . schema . ReferenceSchemaTest . UNPROC_PROPS ) ; "<AssertPlaceHolder>" ; } getUnprocessedProperties ( ) { return ( unprocessedProperties ) == null ? super . getUnprocessedProperties ( ) : unprocessedProperties ; }
org . junit . Assert . assertEquals ( org . everit . json . schema . ReferenceSchemaTest . UNPROC_PROPS , subject . getUnprocessedProperties ( ) )
testSingleWordQueryInTextField ( ) { java . lang . String query = "TaLL" ; java . util . ArrayList < java . lang . String > attributeNames = new java . util . ArrayList ( ) ; attributeNames . add ( TestConstants . FIRST_NAME ) ; attributeNames . add ( TestConstants . LAST_NAME ) ; attributeNames . add ( TestConstants . DESCRIPTION ) ; java . util . List < edu . uci . ics . texera . api . span . Span > list = new java . util . ArrayList ( ) ; edu . uci . ics . texera . api . span . Span span = new edu . uci . ics . texera . api . span . Span ( "description" , 0 , 4 , "tall" , "Tall" , 0 ) ; list . add ( span ) ; edu . uci . ics . texera . api . schema . Attribute [ ] schemaAttributes = new edu . uci . ics . texera . api . schema . Attribute [ ( TestConstants . ATTRIBUTES_PEOPLE . length ) + 1 ] ; for ( int count = 0 ; count < ( ( schemaAttributes . length ) - 1 ) ; count ++ ) { schemaAttributes [ count ] = edu . uci . ics . texera . api . constants . test . TestConstants . ATTRIBUTES_PEOPLE [ count ] ; } schemaAttributes [ ( ( schemaAttributes . length ) - 1 ) ] = new edu . uci . ics . texera . api . schema . Attribute ( edu . uci . ics . texera . dataflow . keywordmatcher . KeywordConjunctionTest . RESULTS , edu . uci . ics . texera . api . schema . AttributeType . LIST ) ; edu . uci . ics . texera . api . field . IField [ ] fields1 = new edu . uci . ics . texera . api . field . IField [ ] { new edu . uci . ics . texera . api . field . StringField ( "Tall" 1 ) , new edu . uci . ics . texera . api . field . StringField ( "john<sp>Lee" ) , new edu . uci . ics . texera . api . field . IntegerField ( 46 ) , new edu . uci . ics . texera . api . field . DoubleField ( 5.5 ) , new edu . uci . ics . texera . api . field . DateField ( new java . text . SimpleDateFormat ( "MM-dd-yyyy" ) . parse ( "01-14-1970" ) ) , new edu . uci . ics . texera . api . field . TextField ( "Tall" 0 ) , new edu . uci . ics . texera . api . field . ListField ( list ) } ; edu . uci . ics . texera . api . field . IField [ ] fields2 = new edu . uci . ics . texera . api . field . IField [ ] { new edu . uci . ics . texera . api . field . StringField ( "christian<sp>john<sp>wayne" ) , new edu . uci . ics . texera . api . field . StringField ( "rock<sp>bale" ) , new edu . uci . ics . texera . api . field . IntegerField ( 42 ) , new edu . uci . ics . texera . api . field . DoubleField ( 5.99 ) , new edu . uci . ics . texera . api . field . DateField ( new java . text . SimpleDateFormat ( "MM-dd-yyyy" ) . parse ( "Tall" 2 ) ) , new edu . uci . ics . texera . api . field . TextField ( "Tall<sp>Fair" ) , new edu . uci . ics . texera . api . field . ListField ( list ) } ; edu . uci . ics . texera . api . tuple . Tuple tuple1 = new edu . uci . ics . texera . api . tuple . Tuple ( new edu . uci . ics . texera . api . schema . Schema ( schemaAttributes ) , fields1 ) ; edu . uci . ics . texera . api . tuple . Tuple tuple2 = new edu . uci . ics . texera . api . tuple . Tuple ( new edu . uci . ics . texera . api . schema . Schema ( schemaAttributes ) , fields2 ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > expectedResultList = new java . util . ArrayList ( ) ; expectedResultList . add ( tuple1 ) ; expectedResultList . add ( tuple2 ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > resultList = edu . uci . ics . texera . dataflow . keywordmatcher . KeywordTestHelper . getQueryResults ( edu . uci . ics . texera . dataflow . keywordmatcher . KeywordConjunctionTest . PEOPLE_TABLE , query , attributeNames , edu . uci . ics . texera . dataflow . keywordmatcher . KeywordConjunctionTest . conjunction ) ; boolean contains = edu . uci . ics . texera . api . utils . TestUtils . equals ( expectedResultList , resultList ) ; "<AssertPlaceHolder>" ; } equals ( java . util . List , java . util . List ) { expectedResults = Tuple . Builder . removeIfExists ( expectedResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; exactResults = Tuple . Builder . removeIfExists ( exactResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; if ( ( expectedResults . size ( ) ) != ( exactResults . size ( ) ) ) return false ; return ( expectedResults . containsAll ( exactResults ) ) && ( exactResults . containsAll ( expectedResults ) ) ; }
org . junit . Assert . assertTrue ( contains )
subSequence ( ) { com . gs . collections . impl . string . immutable . CodePointAdapter adapt = com . gs . collections . impl . string . immutable . CodePointAdapter . adapt ( com . gs . collections . impl . string . immutable . CodePointAdapterTest . UNICODE_STRING ) ; java . lang . CharSequence sequence = adapt . subSequence ( 1 , 3 ) ; "<AssertPlaceHolder>" ; } subSequence ( int , int ) { return this . adapted . substring ( start , end ) ; }
org . junit . Assert . assertEquals ( com . gs . collections . impl . string . immutable . CodePointAdapterTest . UNICODE_STRING . subSequence ( 1 , 3 ) , sequence )
testEcommerceIdF ( ) { request . setEcommerceId ( null ) ; "<AssertPlaceHolder>" ; } getEcommerceId ( ) { return ( ( java . lang . String ) ( getParameter ( org . piwik . java . tracking . PiwikRequest . ECOMMERCE_ID ) ) ) ; }
org . junit . Assert . assertNull ( request . getEcommerceId ( ) )
shouldReturnAllActiveStates ( ) { storage . writeActiveState ( com . spotify . styx . storage . DatastoreStorageTest . WORKFLOW_INSTANCE1 , com . spotify . styx . storage . DatastoreStorageTest . RUN_STATE ) ; storage . writeActiveState ( com . spotify . styx . storage . DatastoreStorageTest . WORKFLOW_INSTANCE2 , com . spotify . styx . storage . DatastoreStorageTest . RUN_STATE2 ) ; final java . util . Map < com . spotify . styx . model . WorkflowInstance , com . spotify . styx . state . RunState > activeStates = storage . readActiveStates ( ) ; "<AssertPlaceHolder>" ; } readActiveStates ( ) { com . spotify . styx . storage . var timeout = java . util . concurrent . CompletableFuture . runAsync ( ( ) -> { } , delayedExecutor ( 30 , com . spotify . styx . storage . SECONDS ) ) ; com . spotify . styx . storage . var instances = listActiveInstances0 ( timeout ) ; com . spotify . styx . storage . var states = gatherIO ( com . google . common . collect . Lists . partition ( java . util . List . copyOf ( instances ) , com . spotify . styx . storage . DatastoreStorage . MAX_NUMBER_OF_ENTITIES_IN_ONE_BATCH_READ ) . stream ( ) . map ( ( batch ) -> asyncIO ( ( ) -> readRunStateBatch ( batch ) ) ) . collect ( toList ( ) ) , timeout ) . stream ( ) . flatMap ( Collection :: stream ) . collect ( toMap ( RunState :: workflowInstance , java . util . function . Function . identity ( ) ) ) ; timeout . cancel ( true ) ; return states ; }
org . junit . Assert . assertThat ( activeStates , org . hamcrest . Matchers . is ( java . util . Map . of ( com . spotify . styx . storage . DatastoreStorageTest . WORKFLOW_INSTANCE1 , com . spotify . styx . storage . DatastoreStorageTest . RUN_STATE , com . spotify . styx . storage . DatastoreStorageTest . WORKFLOW_INSTANCE2 , com . spotify . styx . storage . DatastoreStorageTest . RUN_STATE2 ) ) )
should_delete_comments_for_user ( ) { int rowCount = timesheetCommentDao . deleteCommentsForUser ( 1 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 2 , rowCount )
testAsText ( ) { org . apache . tajo . datum . Datum d = org . apache . tajo . datum . DatumFactory . createTimeStamp ( "1980-04-01<sp>01:50:01" ) ; org . apache . tajo . datum . Datum copy = org . apache . tajo . datum . DatumFactory . createTimeStamp ( d . asChars ( ) ) ; "<AssertPlaceHolder>" ; } asChars ( ) { throw new org . apache . tajo . datum . exception . InvalidCastException ( ( ( type ) + "<sp>cannot<sp>be<sp>casted<sp>to<sp>STRING<sp>type" ) ) ; }
org . junit . Assert . assertEquals ( d , copy )
testGetSelectedItem ( ) { final org . uberfire . ext . widgets . core . client . tree . TreeItem item1 = mock ( org . uberfire . ext . widgets . core . client . tree . TreeItem . class ) ; when ( container . getWidgetCount ( ) ) . thenReturn ( 1 ) ; when ( container . getWidget ( eq ( 0 ) ) ) . thenReturn ( item1 ) ; testedTree . addItem ( item1 ) ; testedTree . setSelectedItem ( item1 ) ; org . uberfire . ext . widgets . core . client . tree . TreeItem itemGet = testedTree . getSelectedItem ( ) ; "<AssertPlaceHolder>" ; } setSelectedItem ( TYPE ) { searchService . searchEntry ( key , ( results ) -> { if ( ( results . size ( ) ) == 1 ) { LiveSearchEntry < org . uberfire . ext . widgets . common . client . dropdown . TYPE > entry = results . get ( 0 ) ; changeCallbackEnabled = false ; LiveSearchSelectorItem < org . uberfire . ext . widgets . common . client . dropdown . TYPE > item = getSelectorItemForEntry ( entry ) ; selectionHandler . selectItem ( item ) ; item . select ( ) ; view . clearItems ( ) ; lastSearch = null ; changeCallbackEnabled = true ; } } ) ; }
org . junit . Assert . assertEquals ( itemGet , item1 )
testLaunch ( ) { org . apache . hadoop . util . ExitUtil . disableSystemExit ( ) ; try { historyServer = org . apache . hadoop . mapreduce . v2 . hs . JobHistoryServer . launchJobHistoryServer ( new java . lang . String [ 0 ] ) ; } catch ( org . apache . hadoop . util . ExitUtil e ) { "<AssertPlaceHolder>" ; org . apache . hadoop . util . ExitUtil . resetFirstExitException ( ) ; org . junit . Assert . fail ( ) ; } } launchJobHistoryServer ( java . lang . String [ ] ) { java . lang . Thread . setDefaultUncaughtExceptionHandler ( new org . apache . hadoop . yarn . YarnUncaughtExceptionHandler ( ) ) ; org . apache . hadoop . util . StringUtils . startupShutdownMessage ( org . apache . hadoop . mapreduce . v2 . hs . JobHistoryServer . class , args , org . apache . hadoop . mapreduce . v2 . hs . JobHistoryServer . LOG ) ; org . apache . hadoop . mapreduce . v2 . hs . JobHistoryServer jobHistoryServer = null ; try { jobHistoryServer = new org . apache . hadoop . mapreduce . v2 . hs . JobHistoryServer ( ) ; org . apache . hadoop . util . ShutdownHookManager . get ( ) . addShutdownHook ( new org . apache . hadoop . mapreduce . v2 . hs . CompositeServiceShutdownHook ( jobHistoryServer ) , org . apache . hadoop . mapreduce . v2 . hs . JobHistoryServer . SHUTDOWN_HOOK_PRIORITY ) ; org . apache . hadoop . yarn . conf . YarnConfiguration conf = new org . apache . hadoop . yarn . conf . YarnConfiguration ( new org . apache . hadoop . mapred . JobConf ( ) ) ; new org . apache . hadoop . util . GenericOptionsParser ( conf , args ) ; jobHistoryServer . init ( conf ) ; jobHistoryServer . start ( ) ; } catch ( java . lang . Throwable t ) { org . apache . hadoop . mapreduce . v2 . hs . JobHistoryServer . LOG . fatal ( "Error<sp>starting<sp>JobHistoryServer" , t ) ; org . apache . hadoop . util . ExitUtil . terminate ( ( - 1 ) , "Error<sp>starting<sp>JobHistoryServer" ) ; } return jobHistoryServer ; }
org . junit . Assert . assertEquals ( 0 , e . status )
testIsTupleMappingColumn_NotTupleColumn ( ) { boolean result = org . pentaho . big . data . kettle . plugins . hbase . mapping . MappingUtils . isTupleMappingColumn ( "NOT_A_TUPLE_COLUMN" ) ; "<AssertPlaceHolder>" ; } isTupleMappingColumn ( java . lang . String ) { return ( org . pentaho . big . data . kettle . plugins . hbase . mapping . MappingUtils . TUPLE_COLUMNS . contains ( columnName ) ) || ( columnName . equals ( org . pentaho . big . data . kettle . plugins . hbase . mapping . MappingUtils . TUPLE_MAPPING_VISIBILITY ) ) ; }
org . junit . Assert . assertFalse ( result )
testTrimmedSubtemplates ( ) { org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroup ( ) ; group . defineTemplate ( "test" , "names" , "<names:{n<sp>|<sp><n>}>!" ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "test" ) ; st . add ( "names" , "Ter" ) ; st . add ( "names" , "Tom" ) ; st . add ( "names" , "Sumana" ) ; java . lang . String expected = "TerTomSumana!" ; java . lang . String result = st . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
org . junit . Assert . assertEquals ( expected , result )
testNextNonce ( ) { org . jscep . transaction . Nonce nonce1 = org . jscep . transaction . Nonce . nextNonce ( ) ; org . jscep . transaction . Nonce nonce2 = org . jscep . transaction . Nonce . nextNonce ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return org . apache . commons . lang . builder . EqualsBuilder . reflectionEquals ( this , obj ) ; }
org . junit . Assert . assertFalse ( nonce1 . equals ( nonce2 ) )
testGetName ( ) { classUnderTest . setName ( "aTestString" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return _name ; }
org . junit . Assert . assertEquals ( "aTestString" , classUnderTest . getName ( ) )
testInDialog ( ) { new org . eclipse . reddeer . swt . impl . menu . ShellMenuItem ( "File" , "New" , "Other..." ) . select ( ) ; new org . eclipse . reddeer . swt . impl . shell . DefaultShell ( "New" ) ; org . eclipse . reddeer . swt . api . Text t = new org . eclipse . reddeer . swt . impl . text . DefaultText ( 0 ) ; t . setText ( "myvalue" ) ; "<AssertPlaceHolder>" ; new org . eclipse . reddeer . swt . impl . button . PushButton ( "Cancel" ) . click ( ) ; } getText ( ) { return org . eclipse . reddeer . core . handler . GroupHandler . getInstance ( ) . getText ( swtWidget ) ; }
org . junit . Assert . assertTrue ( t . getText ( ) . equals ( "myvalue" ) )
testLookUpWithCorrectHostname ( ) { org . jboss . additional . testsuite . jdkall . present . ejb . lookup . TestRemote proxy = lookup ( org . jboss . as . test . shared . TestSuiteEnvironment . getServerAddress ( ) ) ; java . lang . String echo = "Answer<sp>to<sp>the<sp>Ultimate<sp>Question<sp>of<sp>Life,<sp>the<sp>Universe,<sp>and<sp>Everything" ; java . lang . String result = proxy . invoke ( echo ) ; "<AssertPlaceHolder>" ; } invoke ( java . lang . String ) { return s ; }
org . junit . Assert . assertEquals ( echo , result )
testSetBitNegativeInside3 ( ) { java . lang . String as = "-18446744073709551615" ; java . lang . String res = "-18446744073709551611" ; int number = 2 ; java . math . BigInteger aNumber = new java . math . BigInteger ( as ) ; java . math . BigInteger result = aNumber . setBit ( number ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( getClass ( ) . getName ( ) ) + "[index=" ) + ( currentPosition ) ) + ",<sp>errorIndex=" ) + ( errorIndex ) ) + "]" ; }
org . junit . Assert . assertEquals ( res , result . toString ( ) )
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . asset . category . property . model . AssetCategoryProperty missingAssetCategoryProperty = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
org . junit . Assert . assertNull ( missingAssetCategoryProperty )
givenLoaderThrowsException_whenIsAllowed_thenReturnsTrue ( ) { when ( loader . load ( any ( java . net . URI . class ) ) ) . thenThrow ( com . brandwatch . robots . Exception . class ) ; boolean allowed = instance . isAllowed ( com . brandwatch . robots . RobotsServiceImplTest . CRAWLER_AGENT , com . brandwatch . robots . RobotsServiceImplTest . RESOURCE_URI ) ; "<AssertPlaceHolder>" ; } isAllowed ( java . lang . String , java . net . URI ) { checkNotNull ( crawlerAgentString , "crawlerAgentString<sp>is<sp>null" ) ; checkNotNull ( resourceUri , "resourceUri<sp>is<sp>null" ) ; com . brandwatch . robots . RobotsServiceImpl . log . debug ( "Resolving<sp>robots<sp>URL<sp>for:<sp>{}" , resourceUri ) ; final java . net . URI robotsUri = utilities . getRobotsURIForResource ( resourceUri ) ; com . brandwatch . robots . RobotsServiceImpl . log . debug ( "Resolved<sp>robots<sp>URI<sp>to:<sp>{}" , robotsUri ) ; final com . brandwatch . robots . domain . Robots robots ; try { robots = loader . load ( robotsUri ) ; } catch ( java . lang . Exception e ) { com . brandwatch . robots . RobotsServiceImpl . log . debug ( "Download<sp>failure<sp>{}" , e . getMessage ( ) ) ; return allow ( resourceUri ) ; } if ( robots . getGroups ( ) . isEmpty ( ) ) { com . brandwatch . robots . RobotsServiceImpl . log . debug ( "No<sp>agent<sp>groups<sp>found" , resourceUri ) ; return allow ( resourceUri ) ; } final com . google . common . base . Optional < com . brandwatch . robots . domain . Group > group = matcherUtils . getMostSpecificMatchingGroup ( robots . getGroups ( ) , crawlerAgentString ) ; if ( group . isPresent ( ) ) { if ( com . brandwatch . robots . RobotsServiceImpl . log . isDebugEnabled ( ) ) { com . brandwatch . robots . RobotsServiceImpl . log . debug ( "Matched<sp>user-agent<sp>group:<sp>{}" , matcherUtils . getMostSpecificMatch ( group . get ( ) , crawlerAgentString ) . get ( ) . getValue ( ) ) ; } } else { com . brandwatch . robots . RobotsServiceImpl . log . debug ( "No<sp>user-agent<sp>group<sp>matched" ) ; return allow ( resourceUri ) ; } final com . google . common . base . Optional < com . brandwatch . robots . domain . PathDirective > bestMatch = matcherUtils . getMostSpecificMatch ( group . get ( ) . getDirectives ( com . brandwatch . robots . domain . PathDirective . class ) , utilities . getResourceLocalComponents ( resourceUri ) ) ; if ( ! ( bestMatch . isPresent ( ) ) ) { com . brandwatch . robots . RobotsServiceImpl . log . debug ( "No<sp>matching<sp>path<sp>directive" ) ; return allow ( resourceUri ) ; } else { final com . brandwatch . robots . domain . PathDirective directive = bestMatch . get ( ) ; com . brandwatch . robots . RobotsServiceImpl . log . debug ( "Matched<sp>path<sp>directive<sp>{}:{}" , directive . getField ( ) , directive . getValue ( ) ) ; return directive . isAllowed ( ) ? allow ( resourceUri ) : disallow ( resourceUri ) ; } }
org . junit . Assert . assertThat ( allowed , org . hamcrest . Matchers . equalTo ( true ) )
getAllMarketplace_NoMarketplace ( ) { runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { @ org . oscm . marketplace . bean . Override public org . oscm . marketplace . bean . Void call ( ) throws org . oscm . marketplace . bean . Exception { container . login ( poUserKey , org . oscm . marketplace . bean . ROLE_PLATFORM_OPERATOR ) ; java . util . List < org . oscm . domobjects . Marketplace > result = marketplaceLocalService . getAllMarketplaces ( ) ; "<AssertPlaceHolder>" ; return null ; } } ) ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
testToJson ( ) { com . redhat . lightblue . query . RValueExpression instance = new com . redhat . lightblue . query . RValueExpression ( new com . redhat . lightblue . query . Value ( "test" ) ) ; com . fasterxml . jackson . databind . JsonNode expResult = com . redhat . lightblue . util . JsonUtils . json ( "\"test\"" ) ; com . fasterxml . jackson . databind . JsonNode result = instance . toJson ( ) ; "<AssertPlaceHolder>" ; } toJson ( ) { return getFactory ( ) . objectNode ( ) . put ( "field" , field . toString ( ) ) . put ( "op" , op . toString ( ) ) . put ( "rfield" , rfield . toString ( ) ) ; }
org . junit . Assert . assertEquals ( expResult , result )
addAndCompress ( ) { org . roaringbitmap . buffer . MappeableRunContainer container = new org . roaringbitmap . buffer . MappeableRunContainer ( ) ; container . add ( ( ( short ) ( 0 ) ) ) ; container . add ( ( ( short ) ( 99 ) ) ) ; container . add ( ( ( short ) ( 98 ) ) ) ; "<AssertPlaceHolder>" ; } getSizeInBytes ( ) { return ( ( int ) ( getLongSizeInBytes ( ) ) ) ; }
org . junit . Assert . assertEquals ( 12 , container . getSizeInBytes ( ) )
testClassWithCreator ( ) { final java . lang . String className = uk . gov . gchq . gaffer . serialisation . util . JsonSerialisationUtilTest . ClassWithCreator . class . getName ( ) ; final java . util . Map < java . lang . String , java . lang . String > expectedValues = new java . util . HashMap ( ) ; expectedValues . put ( "field1" , java . lang . String . class . getName ( ) ) ; final java . util . Map < java . lang . String , java . lang . String > result = uk . gov . gchq . gaffer . serialisation . util . JsonSerialisationUtil . getSerialisedFieldClasses ( className ) ; "<AssertPlaceHolder>" ; } entrySet ( ) { return multiMap . entrySet ( ) ; }
org . junit . Assert . assertEquals ( expectedValues . entrySet ( ) , result . entrySet ( ) )
testBatchSaveAsListFromArray ( ) { java . util . List < software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass > objs = new java . util . ArrayList < software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass > ( ) ; for ( int i = 0 ; i < 40 ; i ++ ) { software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass obj = getUniqueNumericObject ( ) ; objs . add ( obj ) ; } software . amazon . awssdk . services . dynamodb . datamodeling . DynamoDbMapper mapper = new software . amazon . awssdk . services . dynamodb . datamodeling . DynamoDbMapper ( dynamo ) ; software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass [ ] objsArray = objs . toArray ( new software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass [ objs . size ( ) ] ) ; mapper . batchSave ( java . util . Arrays . asList ( objsArray ) ) ; for ( software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass obj : objs ) { software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass loaded = mapper . load ( software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass . class , obj . getKey ( ) ) ; "<AssertPlaceHolder>" ; } } getKey ( ) { return this . key ; }
org . junit . Assert . assertEquals ( obj , loaded )
test3 ( ) { org . openl . rules . datatype . AliasDatatypeTest . ITest instance = org . openl . rules . TestUtils . create ( org . openl . rules . datatype . AliasDatatypeTest . SRC , org . openl . rules . datatype . AliasDatatypeTest . ITest . class ) ; int res = instance . test2 ( 1 ) ; "<AssertPlaceHolder>" ; } create ( java . lang . String , java . lang . Class ) { org . openl . rules . runtime . RulesEngineFactory < T > engineFactory = new org . openl . rules . runtime . RulesEngineFactory ( sourceFile , tClass ) ; return engineFactory . newEngineInstance ( ) ; }
org . junit . Assert . assertEquals ( 3 , res )
testUpRequestCreation ( ) { org . kaaproject . kaa . client . persistence . KaaClientState state = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . persistence . KaaClientState . class ) ; org . kaaproject . kaa . client . channel . impl . DefaultOperationDataProcessor operationsDataProcessor = new org . kaaproject . kaa . client . channel . impl . DefaultOperationDataProcessor ( state ) ; org . kaaproject . kaa . client . channel . ProfileTransport profileTransport = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . channel . ProfileTransport . class ) ; org . kaaproject . kaa . client . channel . EventTransport eventTransport = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . channel . EventTransport . class ) ; org . kaaproject . kaa . client . channel . NotificationTransport notificationTransport = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . channel . NotificationTransport . class ) ; org . kaaproject . kaa . client . channel . ConfigurationTransport configurationTransport = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . channel . ConfigurationTransport . class ) ; org . kaaproject . kaa . client . channel . UserTransport userTransport = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . channel . UserTransport . class ) ; org . kaaproject . kaa . client . channel . MetaDataTransport metaDataTransport = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . channel . MetaDataTransport . class ) ; org . kaaproject . kaa . client . channel . LogTransport logTransport = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . channel . LogTransport . class ) ; operationsDataProcessor . setConfigurationTransport ( configurationTransport ) ; operationsDataProcessor . setEventTransport ( eventTransport ) ; operationsDataProcessor . setMetaDataTransport ( metaDataTransport ) ; operationsDataProcessor . setNotificationTransport ( notificationTransport ) ; operationsDataProcessor . setProfileTransport ( profileTransport ) ; operationsDataProcessor . setUserTransport ( userTransport ) ; operationsDataProcessor . setLogTransport ( logTransport ) ; java . util . Map < org . kaaproject . kaa . common . TransportType , org . kaaproject . kaa . client . channel . ChannelDirection > transportTypes = new java . util . HashMap < org . kaaproject . kaa . common . TransportType , org . kaaproject . kaa . client . channel . ChannelDirection > ( ) ; transportTypes . put ( TransportType . PROFILE , ChannelDirection . BIDIRECTIONAL ) ; transportTypes . put ( TransportType . CONFIGURATION , ChannelDirection . BIDIRECTIONAL ) ; transportTypes . put ( TransportType . NOTIFICATION , ChannelDirection . BIDIRECTIONAL ) ; transportTypes . put ( TransportType . USER , ChannelDirection . BIDIRECTIONAL ) ; transportTypes . put ( TransportType . EVENT , ChannelDirection . BIDIRECTIONAL ) ; transportTypes . put ( TransportType . LOGGING , ChannelDirection . BIDIRECTIONAL ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( profileTransport , org . mockito . Mockito . times ( 1 ) ) . createProfileRequest ( ) ; org . mockito . Mockito . verify ( eventTransport , org . mockito . Mockito . times ( 1 ) ) . createEventRequest ( org . mockito . Mockito . anyInt ( ) ) ; org . mockito . Mockito . verify ( notificationTransport , org . mockito . Mockito . times ( 1 ) ) . createNotificationRequest ( ) ; org . mockito . Mockito . verify ( configurationTransport , org . mockito . Mockito . times ( 1 ) ) . createConfigurationRequest ( ) ; org . mockito . Mockito . verify ( userTransport , org . mockito . Mockito . times ( 1 ) ) . createUserRequest ( ) ; org . mockito . Mockito . verify ( metaDataTransport , org . mockito . Mockito . times ( 1 ) ) . createMetaDataRequest ( ) ; org . mockito . Mockito . verify ( logTransport , org . mockito . Mockito . times ( 1 ) ) . createLogRequest ( ) ; } compileRequest ( java . util . Map ) { if ( ( transport ) != null ) { org . kaaproject . kaa . common . endpoint . gen . SyncRequest request = transport . createResolveRequest ( ) ; org . kaaproject . kaa . client . channel . impl . DefaultBootstrapDataProcessor . LOG . trace ( "Created<sp>Resolve<sp>request<sp>{}" , request ) ; return requestConverter . toByteArray ( request ) ; } return null ; }
org . junit . Assert . assertNotNull ( operationsDataProcessor . compileRequest ( transportTypes ) )
testGetOwnedLiteral1 ( ) { isLiteralInEnum = false ; for ( org . dresdenocl . pivotmodel . EnumerationLiteral aLiteral : org . dresdenocl . metamodels . test . tests . TestEnumeration . enumerationLiterals ) { if ( aLiteral . getName ( ) . equals ( MetaModelTestServices . ENUMERATIONLITERAL_NAME_ENUMERATIONLITERAL2 ) ) { isLiteralInEnum = true ; break ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { boolean result ; try { org . dresdenocl . ocl2java . types . OclOrderedSet < T > aBag = ( ( org . dresdenocl . ocl2java . types . OclOrderedSet < T > ) ( anObject ) ) ; result = this . equals ( aBag ) ; } catch ( java . lang . ClassCastException e ) { result = false ; } return result ; }
org . junit . Assert . assertTrue ( msg , isLiteralInEnum )
testLspSequenceNumber ( ) { lspEntry . setLspSequenceNumber ( 0 ) ; result = lspEntry . lspSequenceNumber ( ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( 0 ) )
applyNotEmptyFile ( ) { org . apache . hadoop . fs . FileStatus fileStatus = mock ( org . apache . hadoop . fs . FileStatus . class ) ; when ( fileStatus . isDirectory ( ) ) . thenReturn ( false ) ; when ( fileStatus . getLen ( ) ) . thenReturn ( 1L ) ; fs . setFileStatus ( "notEmptyFile" , fileStatus ) ; org . apache . hadoop . fs . shell . PathData item = new org . apache . hadoop . fs . shell . PathData ( "notEmptyFile" , fs . getConf ( ) ) ; org . apache . hadoop . fs . shell . find . Empty empty = new org . apache . hadoop . fs . shell . find . Empty ( ) ; empty . initialise ( new org . apache . hadoop . fs . shell . find . FindOptions ( ) ) ; "<AssertPlaceHolder>" ; } apply ( org . apache . hadoop . fs . shell . PathData ) { for ( org . apache . hadoop . fs . shell . find . Expression child : getChildren ( ) ) { org . apache . hadoop . fs . shell . find . Result result = child . apply ( item ) ; if ( result . isPass ( ) ) { return result ; } } return Result . FAIL ; }
org . junit . Assert . assertEquals ( Result . FAIL , empty . apply ( item ) )
testGetMessageBoardThreadMyRating ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testReplace ( ) { top . replace ( 2 , 4 , "want" ) ; final java . lang . StringBuilder topRef = new java . lang . StringBuilder ( baseString ) ; topRef . replace ( 2 , 4 , "want" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return java . lang . String . format ( "[%s]<sp>%s" , ( ( source ) != null ? source . getSimpleName ( ) : "<unknown>" ) , message ) ; }
org . junit . Assert . assertEquals ( topRef . toString ( ) , top . get ( ) )
testMayReturnStaleWhileRevalidatingIsFalseWhenDirectiveEmpty ( ) { final org . apache . hc . core5 . http . Header [ ] headers = new org . apache . hc . core5 . http . Header [ ] { new org . apache . hc . core5 . http . message . BasicHeader ( "Date" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( tenSecondsAgo ) ) , new org . apache . hc . core5 . http . message . BasicHeader ( "Cache-Control" , "max-age=5,<sp>stale-while-revalidate=" ) } ; final org . apache . hc . client5 . http . cache . HttpCacheEntry entry = org . apache . hc . client5 . http . impl . cache . HttpTestUtils . makeCacheEntry ( now , now , headers ) ; "<AssertPlaceHolder>" ; } mayReturnStaleWhileRevalidating ( org . apache . hc . client5 . http . cache . HttpCacheEntry , java . util . Date ) { final java . util . Iterator < org . apache . hc . core5 . http . HeaderElement > it = org . apache . hc . core5 . http . message . MessageSupport . iterate ( entry , HeaderConstants . CACHE_CONTROL ) ; while ( it . hasNext ( ) ) { final org . apache . hc . core5 . http . HeaderElement elt = it . next ( ) ; if ( HeaderConstants . STALE_WHILE_REVALIDATE . equalsIgnoreCase ( elt . getName ( ) ) ) { try { final int allowedStalenessLifetime = java . lang . Integer . parseInt ( elt . getValue ( ) ) ; if ( ( getStalenessSecs ( entry , now ) ) <= allowedStalenessLifetime ) { return true ; } } catch ( final java . lang . NumberFormatException nfe ) { } } } return false ; }
org . junit . Assert . assertFalse ( impl . mayReturnStaleWhileRevalidating ( entry , now ) )
testLinkDestinationId ( ) { linkInformation . setLinkDestinationId ( org . onlab . packet . Ip4Address . valueOf ( "1.1.1.1" ) ) ; "<AssertPlaceHolder>" ; } linkDestinationId ( ) { return linkDestinationId ; }
org . junit . Assert . assertThat ( linkInformation . linkDestinationId ( ) , org . hamcrest . CoreMatchers . is ( org . onlab . packet . Ip4Address . valueOf ( "1.1.1.1" ) ) )
testDragStart ( ) { com . ait . lienzo . client . core . event . NodeDragStartHandler handler = mock ( com . ait . lienzo . client . core . event . NodeDragStartHandler . class ) ; final org . kie . workbench . common . stunner . lienzo . toolbox . items . impl . ButtonItemImpl cascade = tested . onDragStart ( handler ) ; "<AssertPlaceHolder>" ; verify ( groupItemPrim , times ( 1 ) ) . setDraggable ( eq ( true ) ) ; verify ( groupItemPrim , times ( 1 ) ) . addNodeDragStartHandler ( eq ( handler ) ) ; verify ( registrations , times ( 1 ) ) . register ( eq ( dragStartReg ) ) ; tested . destroy ( ) ; verify ( dragStartReg , times ( 1 ) ) . removeHandler ( ) ; } onDragStart ( com . ait . lienzo . client . core . event . NodeDragStartHandler ) { assert null != handler ; removeDragStartHandlerRegistration ( ) ; dragStartHandlerRegistration = item . getPrimitive ( ) . setDraggable ( true ) . addNodeDragStartHandler ( handler ) ; item . registrations ( ) . register ( dragStartHandlerRegistration ) ; return this ; }
org . junit . Assert . assertEquals ( tested , cascade )
testExecution ( ) { java . util . Set < java . lang . Integer > inputValues = new java . util . HashSet ( java . util . Arrays . asList ( 1 , 2 , 3 ) ) ; org . qcri . rheem . java . operators . JavaCollectionSource collectionSource = new org . qcri . rheem . java . operators . JavaCollectionSource ( inputValues , org . qcri . rheem . core . types . DataSetType . createDefault ( org . qcri . rheem . java . operators . Integer . class ) ) ; org . qcri . rheem . java . channels . JavaChannelInstance [ ] inputs = new org . qcri . rheem . java . channels . JavaChannelInstance [ 0 ] ; org . qcri . rheem . java . channels . JavaChannelInstance [ ] outputs = new org . qcri . rheem . java . channels . JavaChannelInstance [ ] { createCollectionChannelInstance ( ) } ; evaluate ( collectionSource , inputs , outputs ) ; final java . util . Set < java . lang . Object > outputValues = outputs [ 0 ] . provideStream ( ) . collect ( java . util . stream . Collectors . toSet ( ) ) ; "<AssertPlaceHolder>" ; } evaluate ( org . qcri . rheem . java . operators . JavaExecutionOperator , org . qcri . rheem . core . platform . ChannelInstance [ ] , org . qcri . rheem . core . platform . ChannelInstance [ ] ) { operator . evaluate ( inputs , outputs , org . qcri . rheem . iejoin . operators . JavaExecutionOperatorTestBase . createExecutor ( ) , org . qcri . rheem . iejoin . operators . JavaExecutionOperatorTestBase . createOperatorContext ( operator ) ) ; }
org . junit . Assert . assertEquals ( outputValues , inputValues )
conflict ( ) { org . apache . jackrabbit . oak . plugins . document . DocumentMK mk1 = createMK ( 1 , 0 ) ; org . apache . jackrabbit . oak . plugins . document . DocumentMK mk2 = createMK ( 2 , 0 ) ; java . lang . String m1r0 = mk1 . getHeadRevision ( ) ; java . lang . String m2r0 = mk2 . getHeadRevision ( ) ; mk1 . commit ( "/" , "+\"test\":{}" , m1r0 , null ) ; try { mk2 . commit ( "/" , "+\"test\":{}" , m2r0 , null ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . jackrabbit . mk . api . MicroKernelException e ) { } mk1 . runBackgroundOperations ( ) ; mk2 . runBackgroundOperations ( ) ; java . lang . String n1 = mk1 . getNodes ( "/" , mk1 . getHeadRevision ( ) , 0 , 0 , 10 , null ) ; java . lang . String n2 = mk2 . getNodes ( "/" , mk2 . getHeadRevision ( ) , 0 , 0 , 10 , null ) ; "<AssertPlaceHolder>" ; mk1 . dispose ( ) ; mk2 . dispose ( ) ; } getHeadRevision ( ) { org . apache . jackrabbit . oak . spi . state . NodeState root = store . getRoot ( ) ; if ( ! ( root . equals ( head . root ) ) ) { head = new org . apache . jackrabbit . oak . kernel . NodeStoreKernel . Revision ( head , root , "external" ) ; revisions . put ( head . id , head ) ; notifyAll ( ) ; } return head . id ; }
org . junit . Assert . assertEquals ( n1 , n2 )
testCreateQueryChainMultiCollectionEmpty ( ) { final java . util . List < org . apache . lucene . search . Query > query = new org . yes . cart . search . query . impl . ProductCategoryIncludingParentsSearchQueryBuilder ( ) . createQueryChain ( null , "productCategory.category.inc.parents" , java . util . Collections . emptyList ( ) ) ; "<AssertPlaceHolder>" ; } createQueryChain ( org . yes . cart . search . dto . NavigationContext , java . lang . String , java . lang . Object ) { java . lang . String strValue = "1" ; if ( value instanceof java . util . Collection ) { if ( org . apache . commons . collections . CollectionUtils . isNotEmpty ( ( ( java . util . Collection ) ( value ) ) ) ) { strValue = ( "0" . equals ( ( ( java . util . Collection ) ( value ) ) . iterator ( ) . next ( ) ) ) ? "0" : "1" ; } } else { strValue = ( "0" . equals ( value ) ) ? "0" : "1" ; } return java . util . Collections . singletonList ( createNumericQuery ( ( ( PRODUCT_SHOP_INSTOCK_FLAG_FIELD ) + strValue ) , navigationContext . getCustomerShopId ( ) ) ) ; }
org . junit . Assert . assertNull ( query )
test_sameContent_omitted_NOK ( ) { ch . puzzle . itc . mobiliar . business . generator . control . GeneratedTemplate thisTemplate = new ch . puzzle . itc . mobiliar . business . generator . control . GeneratedTemplate ( "name" , "path" , "content" ) ; thisTemplate . setOmitted ( true ) ; ch . puzzle . itc . mobiliar . business . generator . control . GeneratedTemplate otherTemplate = new ch . puzzle . itc . mobiliar . business . generator . control . GeneratedTemplate ( "name2" , "path2" , "contentX" ) ; otherTemplate . setOmitted ( true ) ; "<AssertPlaceHolder>" ; } isSameContent ( ch . puzzle . itc . mobiliar . business . generator . control . GeneratedTemplate ) { if ( otherTemplate == null ) { return false ; } return content . equals ( otherTemplate . content ) ; }
org . junit . Assert . assertFalse ( thisTemplate . isSameContent ( otherTemplate ) )
testPutIfAbsent ( ) { try ( net . openhft . chronicle . map . ChronicleMap map = net . openhft . chronicle . map . jsr166 . map . ChronicleMapTest . map5 ( ) ) { map . putIfAbsent ( six , "Z" ) ; "<AssertPlaceHolder>" ; } } containsKey ( java . lang . Object ) { return check ( new net . openhft . chronicle . map . ReplicationCheckingMap . Call < K , V > ( ) { @ net . openhft . chronicle . map . Override public java . lang . Object method ( java . util . concurrent . ConcurrentMap < K , V > map ) { return map . containsKey ( key ) ; } } ) ; }
org . junit . Assert . assertTrue ( map . containsKey ( six ) )
testJMSType ( ) { javax . jms . JMSProducer producer = context . createProducer ( ) ; producer . setJMSType ( JMS_TYPE_STRING ) ; "<AssertPlaceHolder>" ; } getJMSType ( ) { return type ; }
org . junit . Assert . assertEquals ( JMS_TYPE_STRING , producer . getJMSType ( ) )
parseEmptySample ( ) { org . kafsemo . titl . HohmPodcast hp = org . kafsemo . titl . HohmPodcast . parse ( new org . kafsemo . titl . InputImpl ( new java . io . ByteArrayInputStream ( org . kafsemo . titl . TestHohmPodcast . emptySample ) ) , org . kafsemo . titl . TestHohmPodcast . emptySample . length ) ; "<AssertPlaceHolder>" ; } parse ( org . kafsemo . titl . Input , int ) { java . lang . String url ; java . lang . String link ; java . lang . String aurl ; di . skipBytes ( ( 23 * 4 ) ) ; length -= 23 * 4 ; if ( length <= 0 ) { return null ; } int len = di . readInt ( ) ; java . lang . String type = org . kafsemo . titl . Util . toString ( di . readInt ( ) ) ; len -= 8 ; org . kafsemo . titl . Util . assertEquals ( "url<sp>" , type ) ; di . skipBytes ( 12 ) ; len -= 12 ; byte [ ] ba ; ba = new byte [ len ] ; di . readFully ( ba ) ; url = org . kafsemo . titl . HohmPodcast . toString ( ba ) ; di . skipBytes ( ( 15 * 4 ) ) ; len = di . readInt ( ) ; type = org . kafsemo . titl . Util . toString ( di . readInt ( ) ) ; len -= 8 ; org . kafsemo . titl . Util . assertEquals ( "link" , type ) ; di . skipBytes ( 12 ) ; len -= 12 ; ba = new byte [ len ] ; di . readFully ( ba ) ; link = org . kafsemo . titl . HohmPodcast . toString ( ba ) ; len = di . readInt ( ) ; type = org . kafsemo . titl . Util . toString ( di . readInt ( ) ) ; len -= 8 ; while ( ! ( "aurl" . equals ( type ) ) ) { System . out . println ( type ) ; if ( type . equals ( "pech" ) ) { System . out . println ( "Recurse" ) ; org . kafsemo . titl . HohmPodcast . dump ( di , len ) ; } else { ba = new byte [ len ] ; di . readFully ( ba ) ; System . out . println ( new java . lang . String ( ba ) ) ; } len = di . readInt ( ) ; type = org . kafsemo . titl . Util . toString ( di . readInt ( ) ) ; len -= 8 ; } org . kafsemo . titl . Util . assertEquals ( "aurl" , type ) ; di . skipBytes ( 12 ) ; len -= 12 ; ba = new byte [ len ] ; di . readFully ( ba ) ; aurl = org . kafsemo . titl . HohmPodcast . toString ( ba ) ; return new org . kafsemo . titl . HohmPodcast ( url , link , aurl ) ; }
org . junit . Assert . assertNull ( hp )
whenReadingInstance_itShouldReadCorrectNuOfType3Vehicles ( ) { com . graphhopper . jsprit . core . problem . VehicleRoutingProblem . Builder vrpBuilder = VehicleRoutingProblem . Builder . newInstance ( ) ; new com . graphhopper . jsprit . instance . reader . VrphGoldenReader ( vrpBuilder , com . graphhopper . jsprit . instance . reader . VrphGoldenReader . VrphType . HVRPD ) . read ( getPath ( "cn_13mix.txt" ) ) ; com . graphhopper . jsprit . core . problem . VehicleRoutingProblem vrp = vrpBuilder . build ( ) ; int nuOfType1Vehicles = 0 ; for ( com . graphhopper . jsprit . core . problem . vehicle . Vehicle v : vrp . getVehicles ( ) ) { if ( v . getType ( ) . getTypeId ( ) . equals ( "type_3" ) ) { nuOfType1Vehicles ++ ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; com . graphhopper . jsprit . core . util . VehicleRoutingTransportCostsMatrix . RelationKey other = ( ( com . graphhopper . jsprit . core . util . VehicleRoutingTransportCostsMatrix . RelationKey ) ( obj ) ) ; if ( ( from ) == null ) { if ( ( other . from ) != null ) return false ; } else if ( ! ( from . equals ( other . from ) ) ) return false ; if ( ( to ) == null ) { if ( ( other . to ) != null ) return false ; } else if ( ! ( to . equals ( other . to ) ) ) return false ; return true ; }
org . junit . Assert . assertEquals ( 4 , nuOfType1Vehicles )
testOrder ( ) { com . blade . ioc . bean . OrderComparator orderComparator = new com . blade . ioc . bean . OrderComparator ( ) ; int compare = orderComparator . compare ( "a" , "b" ) ; "<AssertPlaceHolder>" ; } compare ( T , T ) { com . blade . ioc . annotation . Order o1 = e1 . getClass ( ) . getAnnotation ( com . blade . ioc . annotation . Order . class ) ; com . blade . ioc . annotation . Order o2 = e2 . getClass ( ) . getAnnotation ( com . blade . ioc . annotation . Order . class ) ; java . lang . Integer order1 = ( null != o1 ) ? o1 . value ( ) : Integer . MAX_VALUE ; java . lang . Integer order2 = ( null != o2 ) ? o2 . value ( ) : Integer . MAX_VALUE ; return order1 . compareTo ( order2 ) ; }
org . junit . Assert . assertEquals ( 0 , compare )
should_return_null_if_Map_is_null ( ) { "<AssertPlaceHolder>" ; } format ( java . util . Map ) { if ( map == null ) { return null ; } java . util . Iterator < ? > i = map . entrySet ( ) . iterator ( ) ; if ( ! ( i . hasNext ( ) ) ) { return "{}" ; } java . lang . StringBuilder buffer = new java . lang . StringBuilder ( ) ; buffer . append ( "{" ) ; for ( ; ; ) { java . util . Map . Entry < ? , ? > e = ( ( java . util . Map . Entry < ? , ? > ) ( i . next ( ) ) ) ; buffer . append ( org . fest . util . Maps . format ( map , e . getKey ( ) ) ) ; buffer . append ( '=' ) ; buffer . append ( org . fest . util . Maps . format ( map , e . getValue ( ) ) ) ; if ( ! ( i . hasNext ( ) ) ) { return buffer . append ( "}" ) . toString ( ) ; } buffer . append ( ",<sp>" ) ; } }
org . junit . Assert . assertNull ( org . fest . util . Maps . format ( null ) )
protoToString ( ) { org . apache . servicecomb . foundation . protobuf . internal . parser . ProtoParser protoParser = new org . apache . servicecomb . foundation . protobuf . internal . parser . ProtoParser ( ) ; io . protostuff . compiler . model . Proto proto = protoParser . parseFromContent ( org . apache . servicecomb . codec . protobuf . internal . converter . TestProtoToStringGenerator . content ) ; java . lang . String newContent = new org . apache . servicecomb . codec . protobuf . internal . converter . ProtoToStringGenerator ( proto ) . protoToString ( ) ; "<AssertPlaceHolder>" ; } protoToString ( ) { org . apache . servicecomb . foundation . protobuf . internal . parser . ProtoParser protoParser = new org . apache . servicecomb . foundation . protobuf . internal . parser . ProtoParser ( ) ; io . protostuff . compiler . model . Proto proto = protoParser . parseFromContent ( org . apache . servicecomb . codec . protobuf . internal . converter . TestProtoToStringGenerator . content ) ; java . lang . String newContent = new org . apache . servicecomb . codec . protobuf . internal . converter . ProtoToStringGenerator ( proto ) . protoToString ( ) ; org . junit . Assert . assertEquals ( org . apache . servicecomb . codec . protobuf . internal . converter . TestProtoToStringGenerator . content , newContent ) ; }
org . junit . Assert . assertEquals ( org . apache . servicecomb . codec . protobuf . internal . converter . TestProtoToStringGenerator . content , newContent )
testPersoonMetIndicatieStaatsloosMetRegistratieIndicatieStaatsloos ( ) { final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView huidigePersoon = maakHuidigePersoon ( SoortIndicatie . INDICATIE_STAATLOOS ) ; final nl . bzk . brp . model . bericht . kern . PersoonBericht persoonBericht = maakNieuweSituatie ( SoortIndicatie . INDICATIE_STAATLOOS ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = brby0148 . voerRegelUit ( huidigePersoon , persoonBericht , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , berichtEntiteiten . size ( ) )
shouldBeAuthorizedForAnonymousAndPublicApiWithoutRestrictions ( ) { when ( api . getVisibility ( ) ) . thenReturn ( Visibility . PUBLIC ) ; boolean userAuthorizedToAccess = groupService . isUserAuthorizedToAccessApiData ( api , java . util . Collections . emptyList ( ) , null ) ; "<AssertPlaceHolder>" ; verify ( membershipService , never ( ) ) . getMember ( any ( ) , any ( ) , any ( ) , any ( ) ) ; verify ( groupRepository , never ( ) ) . findAll ( ) ; } isUserAuthorizedToAccessApiData ( io . gravitee . management . model . api . ApiEntity , io . gravitee . management . service . impl . List , java . lang . String ) { if ( username == null ) { return ( ( excludedGroups == null ) || ( excludedGroups . isEmpty ( ) ) ) && ( Visibility . PUBLIC . equals ( api . getVisibility ( ) ) ) ; } if ( ( ( excludedGroups != null ) && ( ! ( excludedGroups . isEmpty ( ) ) ) ) && ( ( membershipService . getMember ( MembershipReferenceType . API , api . getId ( ) , username , RoleScope . API ) ) == null ) ) { io . gravitee . management . service . impl . Set < java . lang . String > authorizedGroups = io . gravitee . management . service . impl . Collections . emptySet ( ) ; if ( ( ( Visibility . PRIVATE . equals ( api . getVisibility ( ) ) ) && ( ( api . getGroups ( ) ) != null ) ) && ( ! ( api . getGroups ( ) . isEmpty ( ) ) ) ) { authorizedGroups = new io . gravitee . management . service . impl . HashSet ( api . getGroups ( ) ) ; } if ( Visibility . PUBLIC . equals ( api . getVisibility ( ) ) ) { try { authorizedGroups = groupRepository . findAll ( ) . stream ( ) . map ( Group :: getId ) . collect ( java . util . stream . Collectors . toSet ( ) ) ; } catch ( io . gravitee . repository . exceptions . TechnicalException ex ) { logger . error ( "An<sp>error<sp>occurs<sp>while<sp>trying<sp>to<sp>find<sp>all<sp>groups" , ex ) ; throw new io . gravitee . management . service . exceptions . TechnicalManagementException ( "An<sp>error<sp>occurs<sp>while<sp>trying<sp>to<sp>find<sp>all<sp>groups" , ex ) ; } } authorizedGroups . removeAll ( excludedGroups ) ; for ( java . lang . String authorizedGroupId : authorizedGroups ) { if ( ( membershipService . getMember ( MembershipReferenceType . GROUP , authorizedGroupId , username , RoleScope . API ) ) != null ) { return true ; } } return false ; } return true ; }
org . junit . Assert . assertTrue ( userAuthorizedToAccess )
shouldReturnEmptyResultListWhenNoValidInterestCalculationInterevalsExist ( ) { java . util . List < org . mifos . accounts . savings . interest . EndOfDayDetail > endOfDayDetailsForCalculationPeriod = new java . util . ArrayList < org . mifos . accounts . savings . interest . EndOfDayDetail > ( ) ; org . mifos . accounts . savings . interest . CalendarPeriod calculationPeriod = new org . mifos . accounts . savings . interest . CalendarPeriodBuilder ( ) . build ( ) ; org . mifos . framework . util . helpers . Money totalBalanceBeforeCalculationPeriod = org . mifos . framework . TestUtils . createMoney ( "0" ) ; java . util . List < org . mifos . accounts . savings . interest . CalendarPeriod > noValidCalculationIntervalsInPeriod = new java . util . ArrayList < org . mifos . accounts . savings . interest . CalendarPeriod > ( ) ; when ( interestCalculationIntervalHelper . determineAllPossiblePeriods ( calculationPeriod . getStartDate ( ) , interestCalculationSchedule , calculationPeriod . getEndDate ( ) ) ) . thenReturn ( noValidCalculationIntervalsInPeriod ) ; java . util . List < org . mifos . accounts . savings . interest . InterestCalculationPeriodResult > results = this . interestCalculationPeriodCalculator . calculateDetails ( calculationPeriod , totalBalanceBeforeCalculationPeriod , endOfDayDetailsForCalculationPeriod ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( org . apache . commons . lang . StringUtils . isBlank ( loanAmount ) ) && ( org . apache . commons . lang . StringUtils . isBlank ( businessActivity ) ) ; }
org . junit . Assert . assertTrue ( results . isEmpty ( ) )
shouldDeduplicateElements ( ) { final int numSplits = 3 ; final java . util . List < uk . gov . gchq . gaffer . data . element . Element > elements = java . util . Collections . nCopies ( 10 , new uk . gov . gchq . gaffer . data . element . Entity ( uk . gov . gchq . gaffer . commonutil . TestGroups . ENTITY , "vertex" ) ) ; final uk . gov . gchq . gaffer . store . operation . handler . AbstractSampleElementsForSplitPointsHandler < ? , S > handler = createHandler ( ) ; final uk . gov . gchq . gaffer . operation . impl . SampleElementsForSplitPoints operation = new uk . gov . gchq . gaffer . operation . impl . SampleElementsForSplitPoints . Builder < > ( ) . input ( elements ) . numSplits ( numSplits ) . build ( ) ; final java . util . List < ? > splits = handler . doOperation ( operation , new uk . gov . gchq . gaffer . store . Context ( ) , createStore ( ) ) ; "<AssertPlaceHolder>" ; verifySplits ( java . util . Collections . singletonList ( 0 ) , elements , splits , handler ) ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , splits . size ( ) )
checkDate4 ( ) { char y0 = '2' ; char y1 = '1' ; char y2 = '1' ; char y3 = '1' ; char M0 = '1' ; char M1 = '0' ; int d0 = 50 ; int d1 = 32810 ; java . lang . Class < ? > c = com . diffblue . deeptestutils . Reflector . forName ( "com.alibaba.fastjson.parser.JSONScanner" ) ; java . lang . reflect . Method m = c . getDeclaredMethod ( "checkDate" , com . diffblue . deeptestutils . Reflector . forName ( "char" ) , com . diffblue . deeptestutils . Reflector . forName ( "char" ) , com . diffblue . deeptestutils . Reflector . forName ( "char" ) , com . diffblue . deeptestutils . Reflector . forName ( "char" ) , com . diffblue . deeptestutils . Reflector . forName ( "char" ) , com . diffblue . deeptestutils . Reflector . forName ( "char" ) , com . diffblue . deeptestutils . Reflector . forName ( "int" ) , com . diffblue . deeptestutils . Reflector . forName ( "int" ) ) ; m . setAccessible ( true ) ; boolean retval = ( ( java . lang . Boolean ) ( m . invoke ( null , y0 , y1 , y2 , y3 , M0 , M1 , d0 , d1 ) ) ) ; "<AssertPlaceHolder>" ; } setAccessible ( java . lang . reflect . AccessibleObject ) { if ( ! ( com . alibaba . fastjson . util . TypeUtils . setAccessibleEnable ) ) { return ; } if ( obj . isAccessible ( ) ) { return ; } try { obj . setAccessible ( true ) ; } catch ( java . security . AccessControlException error ) { com . alibaba . fastjson . util . TypeUtils . setAccessibleEnable = false ; } }
org . junit . Assert . assertEquals ( false , retval )
lookupUserByEmail ( ) { createClientWithTokenOrPassword ( ) ; java . lang . String requesterEmail = org . zendesk . client . v2 . RealSmokeTest . config . getProperty ( "requester.email" ) ; org . junit . Assume . assumeThat ( "Must<sp>have<sp>a<sp>requester<sp>email" , requesterEmail , org . hamcrest . CoreMatchers . notNullValue ( ) ) ; for ( org . zendesk . client . v2 . model . User user : instance . lookupUserByEmail ( requesterEmail ) ) { "<AssertPlaceHolder>" ; } } getEmail ( ) { return email ; }
org . junit . Assert . assertThat ( user . getEmail ( ) , org . hamcrest . CoreMatchers . is ( requesterEmail ) )
checkLoadExecution ( ) { info . smart_tools . smartactors . http_endpoint_plugins . http_endpoint_plugin . Checker checker = new info . smart_tools . smartactors . http_endpoint_plugins . http_endpoint_plugin . Checker ( ) ; checker . item = new info . smart_tools . smartactors . feature_loading_system . bootstrap_item . BootstrapItem ( "test" ) ; info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap . IBootstrap < info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap_item . IBootstrapItem < java . lang . String > > bootstrap = mock ( info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap . IBootstrap . class ) ; java . util . List < info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap_item . IBootstrapItem < java . lang . String > > itemList = new java . util . ArrayList ( ) ; doAnswer ( new org . mockito . stubbing . Answer < java . lang . Void > ( ) { public info . smart_tools . smartactors . http_endpoint_plugins . http_endpoint_plugin . Void answer ( org . mockito . invocation . InvocationOnMock invocation ) { java . lang . Object [ ] args = invocation . getArguments ( ) ; checker . item = ( ( info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap_item . IBootstrapItem < java . lang . String > ) ( args [ 0 ] ) ) ; itemList . add ( checker . item ) ; return null ; } } ) . when ( bootstrap ) . add ( any ( info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap_item . IBootstrapItem . class ) ) ; info . smart_tools . smartactors . feature_loading_system . interfaces . iplugin . IPlugin plugin = new info . smart_tools . smartactors . http_endpoint_plugins . http_endpoint_plugin . HttpEndpointPlugin ( bootstrap ) ; plugin . load ( ) ; "<AssertPlaceHolder>" ; info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap_item . IBootstrapItem < java . lang . String > item = itemList . get ( 0 ) ; item . executeProcess ( ) ; reset ( bootstrap ) ; } size ( ) { return template . size ( ) ; }
org . junit . Assert . assertEquals ( itemList . size ( ) , 1 )
finishFromThreadWithEqualName ( ) { final jetbrains . jetpad . base . edt . EdtManager manager = new jetbrains . jetpad . base . edt . ExecutorEdtManager ( "MyEdt3" ) ; manager . getEdt ( ) . schedule ( Runnables . EMPTY ) ; final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1 ) ; java . lang . Thread other = new java . lang . Thread ( new java . lang . Runnable ( ) { @ jetbrains . jetpad . base . edt . Override public void run ( ) { manager . finish ( ) ; latch . countDown ( ) ; } } , "MyEdt3" ) ; other . start ( ) ; await ( latch ) ; other . interrupt ( ) ; "<AssertPlaceHolder>" ; } isStopped ( ) { return myFinished ; }
org . junit . Assert . assertTrue ( manager . isStopped ( ) )