input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testNoTableMatchesTablePatternValidationError ( ) { com . streamsets . pipeline . stage . origin . jdbc . table . TableConfigBean tableConfigBean = new com . streamsets . pipeline . stage . origin . jdbc . table . TableJdbcSourceTestBuilder . TableConfigBeanTestBuilder ( ) . tablePattern ( "NO_TABLE%" ) . schema ( database ) . build ( ) ; com . streamsets . pipeline . stage . origin . jdbc . table . TableJdbcSource tableJdbcSource = new com . streamsets . pipeline . stage . origin . jdbc . table . TableJdbcSourceTestBuilder ( JDBC_URL , true , USER_NAME , PASSWORD ) . tableConfigBeans ( com . google . common . collect . ImmutableList . of ( tableConfigBean ) ) . build ( ) ; com . streamsets . pipeline . sdk . PushSourceRunner runner = new com . streamsets . pipeline . sdk . PushSourceRunner . Builder ( com . streamsets . pipeline . stage . origin . jdbc . table . TableJdbcDSource . class , tableJdbcSource ) . addOutputLane ( "a" ) . build ( ) ; java . util . List < com . streamsets . pipeline . api . Stage . ConfigIssue > issues = runner . runValidateConfigs ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return delegate . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , issues . size ( ) )
testWriteBodyResponseAsJson_json_exception_exception ( ) { try { java . util . HashMap < java . lang . String , java . lang . String > errors = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; org . json . JSONObject object = new org . json . JSONObject ( ) ; javax . servlet . http . HttpServletResponse responseMock = org . easymock . EasyMock . createMock ( javax . servlet . http . HttpServletResponse . class ) ; responseMock . setContentType ( "application/json" ) ; responseMock . setCharacterEncoding ( "UTF-8" ) ; org . easymock . EasyMock . expect ( responseMock . getOutputStream ( ) ) . andThrow ( new java . io . IOException ( ) ) ; org . easymock . EasyMock . expect ( responseMock . getOutputStream ( ) ) . andThrow ( new java . io . IOException ( ) ) ; responseMock . setStatus ( HttpServletResponse . SC_INTERNAL_SERVER_ERROR ) ; org . easymock . EasyMock . replay ( responseMock ) ; httpServletToolbox . writeBodyResponseAsJson ( responseMock , object , errors ) ; org . easymock . EasyMock . verify ( responseMock ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertTrue ( false )
testEquals ( ) { java . io . File harFile = new java . io . File ( "src/test/resources/sstoehr.har" ) ; de . sstoehr . harreader . model . Har har1 = harReader . readFromFile ( harFile ) ; de . sstoehr . harreader . model . Har har2 = harReader . readFromFile ( harFile ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; de . sstoehr . harreader . model . HarPostData that = ( ( de . sstoehr . harreader . model . HarPostData ) ( o ) ) ; return ( ( ( java . util . Objects . equals ( mimeType , that . mimeType ) ) && ( java . util . Objects . equals ( params , that . params ) ) ) && ( java . util . Objects . equals ( text , that . text ) ) ) && ( java . util . Objects . equals ( comment , that . comment ) ) ; }
org . junit . Assert . assertTrue ( har1 . equals ( har2 ) )
testFromApplicationTokenToDTO ( ) { java . lang . String accessToken = "123123123123123123132" ; org . wso2 . carbon . apimgt . core . models . ApplicationToken applicationToken = new org . wso2 . carbon . apimgt . core . models . ApplicationToken ( ) ; applicationToken . setAccessToken ( accessToken ) ; applicationToken . setScopes ( "Scope1" ) ; applicationToken . setValidityPeriod ( 100000 ) ; org . wso2 . carbon . apimgt . rest . api . store . dto . ApplicationTokenDTO applicationTokenDTO = org . wso2 . carbon . apimgt . rest . api . store . mappings . ApplicationKeyMappingUtil . fromApplicationTokenToDTO ( applicationToken ) ; "<AssertPlaceHolder>" ; } getAccessToken ( ) { return accessToken ; }
org . junit . Assert . assertEquals ( applicationTokenDTO . getAccessToken ( ) , accessToken )
TestMaterieleHistorieMigratie ( ) { nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon persoon = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortPersoon . INGESCHREVENE ) ; nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonMigratieHistorie his = new nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonMigratieHistorie ( persoon , nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortMigratie . EMIGRATIE ) ; nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonMigratieHistorie his2 = new nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonMigratieHistorie ( persoon , nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortMigratie . EMIGRATIE ) ; his2 . setDatumEindeGeldigheid ( 20170101 ) ; nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonMigratieHistorie his3 = new nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonMigratieHistorie ( persoon , nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortMigratie . IMMIGRATIE ) ; his3 . setActieVerval ( brpActie ) ; his3 . setDatumTijdVerval ( nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonTest . TIJDSTIP ) ; persoon . getPersoonMigratieHistorieSet ( ) . add ( his ) ; persoon . getPersoonMigratieHistorieSet ( ) . add ( his2 ) ; persoon . getPersoonMigratieHistorieSet ( ) . add ( his3 ) ; "<AssertPlaceHolder>" ; } getNietVervallenMaterieleGroepen ( ) { return delegates . get ( 0 ) . getNietVervallenMaterieleGroepen ( ) ; }
org . junit . Assert . assertEquals ( 2 , persoon . getNietVervallenMaterieleGroepen ( ) . size ( ) )
testGetNotFound ( ) { com . riversoft . weixin . mp . user . bean . User user = com . riversoft . weixin . mp . user . Users . defaultUsers ( ) . get ( "not-found-user-open-id" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { java . lang . String json = "{\"card_id\":\"%s\"}" ; com . riversoft . weixin . mp . card . Cards . logger . debug ( "get<sp>card:<sp>{}" , cardId ) ; java . lang . String url = com . riversoft . weixin . mp . base . WxEndpoint . get ( "url.card.get" ) ; java . lang . String response = wxClient . post ( url , java . lang . String . format ( json , cardId ) ) ; com . riversoft . weixin . mp . card . Cards . CardWrapper cardWrapper = com . riversoft . weixin . common . util . JsonMapper . defaultMapper ( ) . fromJson ( response , com . riversoft . weixin . mp . card . Cards . CardWrapper . class ) ; return cardWrapper . getCard ( ) ; }
org . junit . Assert . assertNull ( user )
createInvalidInterceptor ( ) { de . devsurf . injection . guice . scanner . StartupModule startup = de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . asm . ASMClasspathScanner . class , de . devsurf . injection . guice . scanner . PackageFilter . create ( de . devsurf . injection . guice . test . aop . invalid . InvalidInterceptorTests . class ) ) ; startup . addFeature ( de . devsurf . injection . guice . aop . feature . InterceptorFeature . class ) ; com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( startup ) ; "<AssertPlaceHolder>" ; de . devsurf . injection . guice . test . aop . invalid . InvalidInterceptorTests . TestInterface instance = injector . getInstance ( de . devsurf . injection . guice . test . aop . invalid . InvalidInterceptorTests . TestInterface . class ) ; instance . sayHello ( ) ; } addFeature ( de . devsurf . injection . guice . scanner . features . ScannerFeature ) { _collector . addScannerFeature ( listener ) ; }
org . junit . Assert . assertNotNull ( injector )
happy_case ( ) { java . util . List < org . estatio . module . lease . dom . invoicing . InvoiceForLease > invoiceList = invoiceForLeaseRepository . findByFixedAssetAndDueDate ( propertyKal , org . incode . module . base . integtests . VT . ld ( 2012 , 1 , 1 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { assertThat ( linkRepository . findAllForClassHierarchy ( org . estatio . module . link . dom . LinkRepository_Test . Animal . class ) ) . hasSize ( 2 ) ; assertThat ( linkRepository . findAllForClassHierarchy ( org . estatio . module . link . dom . LinkRepository_Test . Mammal . class ) ) . hasSize ( 2 ) ; assertThat ( linkRepository . findAllForClassHierarchy ( org . estatio . module . link . dom . LinkRepository_Test . Lion . class ) ) . hasSize ( 5 ) ; }
org . junit . Assert . assertThat ( invoiceList . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) )
findRoomByAlias ( ) { org . swarmcom . jsynapse . domain . Room foundRoom = roomService . findRoomByAlias ( "Room<sp>alias" ) ; "<AssertPlaceHolder>" ; } getAlias ( ) { return alias ; }
org . junit . Assert . assertEquals ( "Room<sp>alias" , foundRoom . getAlias ( ) )
testNewArrayList ( ) { java . util . ArrayList < java . lang . Object > newArrayList = com . feilong . core . util . CollectionsUtil . newArrayList ( ) ; "<AssertPlaceHolder>" ; } newArrayList ( ) { return new java . util . ArrayList ( ) ; }
org . junit . Assert . assertEquals ( emptyList ( ) , newArrayList )
testGetMissingExecution ( ) { org . springframework . batch . mongo . dao . JobExecution value = dao . getJobExecution ( 54321L ) ; "<AssertPlaceHolder>" ; } getJobExecution ( java . lang . Long ) { return mapJobExecution ( getCollection ( ) . findOne ( org . springframework . batch . mongo . dao . MongoJobExecutionDao . jobExecutionIdObj ( executionId ) ) ) ; }
org . junit . Assert . assertNull ( value )
testRemovalOfNodeJustTraversed ( ) { if ( ( baseConf . getLedgerManagerFactoryClass ( ) ) != ( org . apache . bookkeeper . meta . LongHierarchicalLedgerManagerFactory . class ) ) { return ; } org . apache . bookkeeper . meta . LedgerManager lm = getLedgerManager ( ) ; java . util . Set < java . lang . Long > toRemove = new java . util . TreeSet ( java . util . Arrays . asList ( 3394498498348983841L , 3394498498348983842L , 3394498498348993841L ) ) ; long first = 2345678901234567890L ; java . util . Set < java . lang . Long > mustHave = new java . util . TreeSet ( java . util . Arrays . asList ( first , 6334994393848474732L ) ) ; java . util . Set < java . lang . Long > ids = new java . util . TreeSet ( ) ; ids . addAll ( toRemove ) ; ids . addAll ( mustHave ) ; for ( java . lang . Long id : ids ) { createLedger ( lm , id ) ; } java . util . Set < java . lang . Long > found = new java . util . TreeSet ( ) ; org . apache . bookkeeper . meta . LedgerManager . LedgerRangeIterator lri = lm . getLedgerRanges ( 0 ) ; while ( lri . hasNext ( ) ) { org . apache . bookkeeper . meta . LedgerManager . LedgerRange lr = lri . next ( ) ; found . addAll ( lr . getLedgers ( ) ) ; if ( lr . getLedgers ( ) . contains ( first ) ) { for ( long id : toRemove ) { removeLedger ( lm , id ) ; } toRemove . clear ( ) ; } } for ( long id : mustHave ) { "<AssertPlaceHolder>" ; } } contains ( int ) { return ( indexOf ( i ) ) != ( - 1 ) ; }
org . junit . Assert . assertTrue ( found . contains ( id ) )
convertToFloatNull ( ) { java . lang . Double df = null ; java . lang . Float f = converter . toFloat ( df ) ; "<AssertPlaceHolder>" ; } toFloat ( java . lang . Long ) { if ( value == null ) { return null ; } return value . floatValue ( ) ; }
org . junit . Assert . assertNull ( f )
testDataStoreNameIsSet ( ) { doAnswer ( new org . mockito . stubbing . Answer ( ) { @ org . jbpm . workbench . pr . client . editors . definition . list . Override public org . jbpm . workbench . pr . client . editors . definition . list . Void answer ( org . mockito . invocation . InvocationOnMock invocationOnMock ) throws java . lang . Throwable { final java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > columns = ( ( java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > ) ( invocationOnMock . getArguments ( ) [ 0 ] ) ) ; for ( org . uberfire . ext . widgets . table . client . ColumnMeta columnMeta : columns ) { "<AssertPlaceHolder>" ; } return null ; } } ) . when ( currentListGrid ) . addColumns ( anyList ( ) ) ; when ( currentListGrid . getColumnSortList ( ) ) . thenReturn ( new com . google . gwt . user . cellview . client . ColumnSortList ( ) ) ; view . initColumns ( currentListGrid ) ; verify ( currentListGrid ) . addColumns ( anyList ( ) ) ; } answer ( org . mockito . invocation . InvocationOnMock ) { final java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > columns = ( ( java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > ) ( invocationOnMock . getArguments ( ) [ 0 ] ) ) ; for ( org . uberfire . ext . widgets . table . client . ColumnMeta columnMeta : columns ) { org . junit . Assert . assertNotNull ( columnMeta . getColumn ( ) . getDataStoreName ( ) ) ; } return null ; }
org . junit . Assert . assertNotNull ( columnMeta . getColumn ( ) . getDataStoreName ( ) )
testLooseDelete ( ) { final java . lang . String newRef = "refs/heads/abc" ; org . eclipse . jgit . lib . RefUpdate ref = updateRef ( newRef ) ; ref . update ( ) ; ref = updateRef ( newRef ) ; delete ( ref , Result . NO_CHANGE ) ; "<AssertPlaceHolder>" ; } getReflogReader ( java . lang . String ) { org . eclipse . jgit . lib . Ref ref = findRef ( refName ) ; if ( ref != null ) return new org . eclipse . jgit . internal . storage . file . ReflogReaderImpl ( this , ref . getName ( ) ) ; return null ; }
org . junit . Assert . assertNull ( db . getReflogReader ( "refs/heads/abc" ) )
cmd_mk_rm ( ) { java . lang . String LOG_NAME = "ABC_2" ; org . seaborne . delta . cmds . CmdTestLib . cmdq ( "mk" , ( "--server=" + ( serverURL ) ) , LOG_NAME ) ; org . seaborne . delta . cmds . CmdTestLib . cmdq ( "rm" , ( "--server=" + ( serverURL ) ) , LOG_NAME ) ; org . seaborne . delta . DataSourceDescription dsd1 = dLink . getDataSourceDescriptionByName ( LOG_NAME ) ; "<AssertPlaceHolder>" ; } getDataSourceDescriptionByName ( java . lang . String ) { return execRtn ( ( ) -> get ( ) . getDataSourceDescriptionByName ( name ) ) ; }
org . junit . Assert . assertNull ( dsd1 )
testToList ( ) { org . antlr . misc . IntervalSet s = org . antlr . misc . IntervalSet . of ( 20 , 25 ) ; s . add ( 50 , 55 ) ; s . add ( 5 , 5 ) ; java . lang . String expecting = "[5,<sp>20,<sp>21,<sp>22,<sp>23,<sp>24,<sp>25,<sp>50,<sp>51,<sp>52,<sp>53,<sp>54,<sp>55]" ; java . lang . String result = java . lang . String . valueOf ( s . toList ( ) ) ; "<AssertPlaceHolder>" ; } toList ( ) { throw new java . lang . NoSuchMethodError ( "BitSet.toList()<sp>unimplemented" ) ; }
org . junit . Assert . assertEquals ( result , expecting )
shouldReturnSingleNumber ( ) { org . neo4j . neode . probabilities . ProbabilityDistribution generator = org . neo4j . neode . probabilities . FlatProbabilityDistributionUnique . flatDistribution ( ) ; int result = generator . generateSingle ( org . neo4j . neode . Range . exactly ( 1 ) ) ; "<AssertPlaceHolder>" ; } exactly ( int ) { return new org . neo4j . neode . Range ( count , count ) ; }
org . junit . Assert . assertEquals ( 1 , result )
testValidate ( ) { final com . allanbank . mongodb . bson . builder . DocumentBuilder fileResult = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) ; fileResult . addString ( "_id" , "id" ) . add ( GridFs . MD5_FIELD , "abcdef" ) ; final com . allanbank . mongodb . bson . builder . DocumentBuilder commandDoc = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) ; commandDoc . add ( "filemd5" , "id" ) ; commandDoc . add ( "root" , "fs" ) ; final com . allanbank . mongodb . bson . builder . DocumentBuilder cmdResult = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) ; cmdResult . add ( "ok" , 1 ) . add ( GridFs . MD5_FIELD , "abcdef" ) ; final com . allanbank . mongodb . MongoDatabase mockDb = createMock ( com . allanbank . mongodb . MongoDatabase . class ) ; final com . allanbank . mongodb . MongoCollection mockFiles = createMock ( com . allanbank . mongodb . MongoCollection . class ) ; final com . allanbank . mongodb . MongoCollection mockChunks = createMock ( com . allanbank . mongodb . MongoCollection . class ) ; expect ( mockFiles . findOne ( anyObject ( com . allanbank . mongodb . bson . DocumentAssignable . class ) ) ) . andReturn ( fileResult . build ( ) ) ; expect ( mockDb . getCollection ( ( "fs" + ( GridFs . FILES_SUFFIX ) ) ) ) . andReturn ( mockFiles ) ; expect ( mockDb . getCollection ( ( "fs" + ( GridFs . CHUNKS_SUFFIX ) ) ) ) . andReturn ( mockChunks ) ; expect ( mockDb . runCommand ( commandDoc . build ( ) ) ) . andReturn ( cmdResult . build ( ) ) ; replay ( mockDb , mockFiles , mockChunks ) ; final com . allanbank . mongodb . gridfs . GridFs fs = new com . allanbank . mongodb . gridfs . GridFs ( mockDb ) ; "<AssertPlaceHolder>" ; verify ( mockDb , mockFiles , mockChunks ) ; } validate ( com . allanbank . mongodb . bson . element . ObjectId ) { final com . allanbank . mongodb . bson . Document fileDoc = myFilesCollection . findOne ( where ( com . allanbank . mongodb . gridfs . GridFs . ID_FIELD ) . equals ( id ) ) ; if ( fileDoc == null ) { throw new java . io . FileNotFoundException ( id . toString ( ) ) ; } return doValidate ( fileDoc ) ; }
org . junit . Assert . assertTrue ( fs . validate ( "foo" ) )
getNSSymbol_returns_zero_when_namespace_is_empty_string ( ) { final org . exist . dom . persistent . SymbolTable symbolTable = createSymbolTable ( org . exist . dom . persistent . SymbolTableTest . createTempDir ( ) ) ; "<AssertPlaceHolder>" ; symbolTable . close ( ) ; } getNSSymbol ( java . lang . String ) { if ( ( ns == null ) || ( ( ns . length ( ) ) == 0 ) ) { return 0 ; } return ( ( short ) ( namespaceSymbols . getId ( ns ) ) ) ; }
org . junit . Assert . assertEquals ( 0 , symbolTable . getNSSymbol ( "" ) )
testGetSampleStructureDefinition ( ) { "<AssertPlaceHolder>" ; } getSampleDDMForm ( ) { return com . liferay . dynamic . data . mapping . test . util . DDMStructureTestUtil . getSampleDDMForm ( "name" ) ; }
org . junit . Assert . assertNotNull ( com . liferay . dynamic . data . mapping . test . util . DDMStructureTestUtil . getSampleDDMForm ( ) )
consumesOnDifferentThreadTest ( ) { final java . lang . String producerThreadName = java . lang . Thread . currentThread ( ) . getName ( ) ; final org . xmpp . packet . IQ request = new org . xmpp . packet . IQ ( org . xmpp . packet . IQ . Type . get ) ; request . setChildElement ( SlowRespondingThreadNameComponent . ELEMENTNAME_THREADNAME , SlowRespondingThreadNameComponent . DEBUG_NAMESPACE ) ; debugComp . processPacket ( request ) ; final org . xmpp . packet . IQ response = ( ( org . xmpp . packet . IQ ) ( debugComp . getSentPacket ( ) ) ) ; final org . dom4j . Element elem = response . getChildElement ( ) ; final java . lang . String consumerThreadName = elem . getText ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( object instanceof org . xmpp . packet . JID ) ) { return false ; } if ( ( this ) == object ) { return true ; } org . xmpp . packet . JID jid = ( ( org . xmpp . packet . JID ) ( object ) ) ; if ( ( node ) != null ) { if ( ! ( node . equals ( jid . node ) ) ) { return false ; } } else if ( ( jid . node ) != null ) { return false ; } if ( ! ( domain . equals ( jid . domain ) ) ) { return false ; } if ( ( resource ) != null ) { return resource . equals ( jid . resource ) ; } else return ( jid . resource ) == null ; }
org . junit . Assert . assertFalse ( consumerThreadName . equals ( producerThreadName ) )
getServletURI_servletAndPathInfoWithSemiColon ( ) { final java . lang . String uri = "/servlet:one" ; final java . lang . String pathInfo = "/path;Info" ; final java . lang . String expected = "/servlet%3Aone/path" ; mock . checking ( new org . jmock . Expectations ( ) { { allowing ( req ) . getServletPath ( ) ; will ( returnValue ( uri ) ) ; allowing ( req ) . getPathInfo ( ) ; will ( returnValue ( pathInfo ) ) ; } } ) ; "<AssertPlaceHolder>" ; } getServletURI ( javax . servlet . http . HttpServletRequest ) { java . lang . String uriName = req . getServletPath ( ) ; java . lang . String pathInfo = req . getPathInfo ( ) ; if ( pathInfo != null ) uriName = uriName . concat ( pathInfo ) ; if ( ( uriName == null ) || ( ( uriName . length ( ) ) == 0 ) ) uriName = "/" ; uriName = com . ibm . ws . util . WSUtil . resolveURI ( uriName ) ; int sindex ; if ( ( sindex = uriName . indexOf ( ";" ) ) != ( - 1 ) ) { uriName = uriName . substring ( 0 , sindex ) ; } if ( ( uriName . indexOf ( ":" ) ) >= 0 ) { uriName = uriName . replaceAll ( ":" , "%3A" ) ; } return uriName ; }
org . junit . Assert . assertEquals ( expected , handler . getServletURI ( req ) )
testGetSymmetryOrderWithCECP ( ) { java . lang . String name1 ; java . lang . String name2 ; int trueOrder ; name1 = "1QDM.A" ; name2 = "1NKL" ; trueOrder = 2 ; org . biojava . nbio . structure . align . util . AtomCache cache = new org . biojava . nbio . structure . align . util . AtomCache ( ) ; org . biojava . nbio . structure . Atom [ ] ca1 = cache . getAtoms ( name1 ) ; org . biojava . nbio . structure . Atom [ ] ca2 = cache . getAtoms ( name2 ) ; org . biojava . nbio . structure . align . StructureAlignment cecp = org . biojava . nbio . structure . align . StructureAlignmentFactory . getAlgorithm ( CeCPMain . algorithmName ) ; org . biojava . nbio . structure . align . model . AFPChain afpChain = cecp . align ( ca1 , ca2 ) ; final int maxSymmetry = 8 ; final float minimumMetricChange = 0.4F ; int order = org . biojava . nbio . structure . align . util . AlignmentTools . getSymmetryOrder ( afpChain , maxSymmetry , minimumMetricChange ) ; "<AssertPlaceHolder>" ; } getSymmetryOrder ( org . biojava . nbio . structure . align . util . Map , int , float ) { return org . biojava . nbio . structure . align . util . AlignmentTools . getSymmetryOrder ( alignment , new org . biojava . nbio . structure . align . util . AlignmentTools . IdentityMap < java . lang . Integer > ( ) , maxSymmetry , minimumMetricChange ) ; }
org . junit . Assert . assertEquals ( ( ( ( "1NKL" 2 + name1 ) + "1NKL" 1 ) + name2 ) , trueOrder , order )
testGetExcludeRegexpPattern ( ) { hudson . plugins . jobConfigHistory . JobConfigHistory sut = createSut ( ) ; java . util . regex . Pattern expResult = null ; java . util . regex . Pattern result = sut . getExcludeRegexpPattern ( ) ; "<AssertPlaceHolder>" ; } getExcludeRegexpPattern ( ) { return excludeRegexpPattern ; }
org . junit . Assert . assertEquals ( expResult , result )
spacesBeforeAndAfterKey ( ) { java . util . Map < java . lang . String , java . lang . String > actual = io . strimzi . operator . cluster . model . OrderedPropertiesTest . propertiesCompatibility ( "<sp>before:<sp>1\nafter<sp>:<sp>2" ) ; io . strimzi . operator . cluster . model . OrderedProperties expected = new io . strimzi . operator . cluster . model . OrderedProperties ( ) . addPair ( "before" , "1" ) . addPair ( "after" , "2" ) ; "<AssertPlaceHolder>" ; } asMap ( ) { return pairs ; }
org . junit . Assert . assertEquals ( expected . asMap ( ) , actual )
testInvokeUndefined ( ) { com . google . cloud . teleport . templates . common . JavascriptTextTransformer . JavascriptRuntime javascriptRuntime = com . google . cloud . teleport . templates . common . JavascriptTextTransformer . JavascriptRuntime . newBuilder ( ) . setFileSystemPath ( com . google . cloud . teleport . templates . common . JavascriptTextTransformerTest . TRANSFORM_FILE_PATH ) . setFunctionName ( "transformWithFilter" ) . build ( ) ; java . lang . String data = javascriptRuntime . invoke ( "{\"answerToLife\":<sp>43}" ) ; "<AssertPlaceHolder>" ; } build ( ) { return new com . google . cloud . teleport . spanner . ddl . Ddl ( com . google . common . collect . ImmutableSortedMap . copyOf ( tables ) , parents ) ; }
org . junit . Assert . assertNull ( data )
testI2os_ByteArray_lengthShorterThanOctetString ( ) { byte [ ] bigInt = new byte [ ] { ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 42 ) ) } ; byte [ ] expectedResult = new byte [ ] { ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 42 ) ) } ; byte [ ] result = de . persosim . simulator . crypto . Tr03111Utils . i2os ( bigInt , expectedResult . length ) ; "<AssertPlaceHolder>" ; } i2os ( java . math . BigInteger , int ) { if ( ( x . compareTo ( BigInteger . ZERO ) ) < 0 ) { throw new java . lang . IllegalArgumentException ( "x<sp>must<sp>be<sp>non-negative" ) ; } byte [ ] result = de . persosim . simulator . utils . Utils . toUnsignedByteArray ( x ) ; return de . persosim . simulator . crypto . Tr03111Utils . i2os ( result , l ) ; }
org . junit . Assert . assertArrayEquals ( expectedResult , result )
testCreate ( ) { org . oscarehr . common . model . QuickListUser ql = new org . oscarehr . common . model . QuickListUser ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( ql ) ; dao . persist ( ql ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
org . junit . Assert . assertNotNull ( ql . getId ( ) )
permuteTH_4_ring ( ) { java . lang . String input = "C[C@]12CCCC[C@@]1(C)OCCC2" ; uk . ac . ebi . beam . Graph g = uk . ac . ebi . beam . Parser . parse ( input ) ; "<AssertPlaceHolder>" ; } generate ( uk . ac . ebi . beam . Graph ) { return new uk . ac . ebi . beam . Generator ( g , new uk . ac . ebi . beam . Generator . IterativeRingNumbering ( 1 ) ) . string ( ) ; }
org . junit . Assert . assertThat ( uk . ac . ebi . beam . Generator . generate ( g ) , org . hamcrest . CoreMatchers . is ( input ) )
testConvert ( ) { java . lang . Long id = 1L ; java . lang . String value = "sfas" ; java . lang . Long personId = 2L ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; person . setId ( personId ) ; java . lang . Long contactTypeId = 3L ; org . lnu . is . domain . contact . type . ContactType contactType = new org . lnu . is . domain . contact . type . ContactType ( ) ; contactType . setId ( contactTypeId ) ; org . lnu . is . domain . person . contact . PersonContact expected = new org . lnu . is . domain . person . contact . PersonContact ( ) ; expected . setPerson ( person ) ; expected . setContactType ( contactType ) ; expected . setValue ( value ) ; org . lnu . is . resource . person . contact . PersonContactResource source = new org . lnu . is . resource . person . contact . PersonContactResource ( ) ; source . setPersonId ( personId ) ; source . setContactTypeId ( contactTypeId ) ; source . setId ( id ) ; source . setValue ( value ) ; org . lnu . is . domain . person . contact . PersonContact actual = unit . convert ( source ) ; "<AssertPlaceHolder>" ; } convert ( org . lnu . is . domain . admin . unit . AdminUnit ) { return convert ( source , new org . lnu . is . resource . adminunit . AdminUnitResource ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testNullDefaultWithValidator ( ) { final java . lang . String key = "enum_test" ; org . apache . kafka . common . config . ConfigDef def = new org . apache . kafka . common . config . ConfigDef ( ) ; def . define ( key , Type . STRING , ConfigDef . NO_DEFAULT_VALUE , org . apache . kafka . common . config . ConfigDef . ValidString . in ( "ONE" , "TWO" , "THREE" ) , Importance . HIGH , "docs" ) ; java . util . Properties props = new java . util . Properties ( ) ; props . put ( key , "ONE" ) ; java . util . Map < java . lang . String , java . lang . Object > vals = def . parse ( props ) ; "<AssertPlaceHolder>" ; } get ( org . apache . kafka . connect . data . Field ) { java . lang . Object val = values [ field . index ( ) ] ; if ( ( val == null ) && ( ( field . schema ( ) . defaultValue ( ) ) != null ) ) { val = field . schema ( ) . defaultValue ( ) ; } return val ; }
org . junit . Assert . assertEquals ( "ONE" , vals . get ( key ) )
get_whenCached ( ) { final java . lang . String customerClassName = org . apache . isis . core . metamodel . specloader . SpecificationCacheDefaultTest . Customer . class . getName ( ) ; specificationCache . cache ( customerClassName , customerSpec ) ; final org . apache . isis . core . metamodel . spec . ObjectSpecification objectSpecification = specificationCache . get ( customerClassName ) ; "<AssertPlaceHolder>" ; } get ( org . apache . wicket . Page ) { return decorate ( ajaxRequestTargetProvider . get ( context ) ) ; }
org . junit . Assert . assertSame ( objectSpecification , customerSpec )
sortMapsByValue ( ) { final java . util . Map < java . lang . String , java . lang . Integer > expectedSorting = getNerdsSortedByBirthDate ( ) ; java . util . Comparator < java . lang . Integer > valueComparator = new java . util . Comparator < java . lang . Integer > ( ) { @ org . alfresco . util . collections . Override public int compare ( java . lang . Integer i1 , java . lang . Integer i2 ) { return ( i1 . intValue ( ) ) - ( i2 . intValue ( ) ) ; } } ; java . util . Comparator < java . util . Map . Entry < java . lang . String , java . lang . Integer > > entryComparator = org . alfresco . util . collections . CollectionUtils . < java . lang . String , java . lang . Integer > toEntryComparator ( valueComparator ) ; final java . util . Map < java . lang . String , java . lang . Integer > actualSorting = org . alfresco . util . collections . CollectionUtils . sortMapByValue ( org . alfresco . util . collections . CollectionUtilsTest . nerdsBirthdays , entryComparator ) ; "<AssertPlaceHolder>" ; } sortMapByValue ( java . util . Map , java . util . Comparator ) { if ( map == null ) { return java . util . Collections . emptyMap ( ) ; } java . util . List < java . util . Map . Entry < K , V > > entriesList = new java . util . LinkedList ( map . entrySet ( ) ) ; java . util . Collections . sort ( entriesList , valueComparator ) ; java . util . Map < K , V > orderedMap = new java . util . LinkedHashMap ( entriesList . size ( ) ) ; for ( java . util . Map . Entry < K , V > entry : entriesList ) { orderedMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } return orderedMap ; }
org . junit . Assert . assertEquals ( expectedSorting , actualSorting )
testCountEmptyOrInvalidRowIdsMixed ( ) { java . util . Iterator < org . sagebionetworks . table . model . SparseRow > it = validSparseRowSet . rowIterator ( ) . iterator ( ) ; it . next ( ) . setRowId ( ( - 1L ) ) ; it . next ( ) . setRowId ( null ) ; "<AssertPlaceHolder>" ; } countEmptyOrInvalidRowIds ( org . sagebionetworks . table . model . SparseChangeSet ) { org . sagebionetworks . table . cluster . utils . TableModelUtils . validateRowSet ( set ) ; int count = 0 ; for ( org . sagebionetworks . table . model . SparseRow row : set . rowIterator ( ) ) { if ( org . sagebionetworks . table . cluster . utils . TableModelUtils . isNullOrInvalid ( row . getRowId ( ) ) ) { count ++ ; } } return count ; }
org . junit . Assert . assertEquals ( 2 , org . sagebionetworks . table . cluster . utils . TableModelUtils . countEmptyOrInvalidRowIds ( validSparseRowSet ) )
parseEmptyString ( ) { com . github . dockerjava . api . model . PortBinding [ ] bindings = org . jenkinsci . plugins . dockerbuildstep . util . PortBindingParser . parse ( "" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( isEmpty ( definition ) ) return new com . github . dockerjava . api . model . PortBinding [ 0 ] ; java . lang . String [ ] lines = definition . split ( "\\r?\\n" ) ; com . github . dockerjava . api . model . PortBinding [ ] result = new com . github . dockerjava . api . model . PortBinding [ lines . length ] ; for ( int i = 0 ; i < ( lines . length ) ; i ++ ) { result [ i ] = org . jenkinsci . plugins . dockerbuildstep . util . PortBindingParser . parseOnePortBinding ( lines [ i ] ) ; } return result ; }
org . junit . Assert . assertEquals ( 0 , bindings . length )
testGetMediaGatewayExceptionHandling ( ) { new akka . testkit . JavaTestKit ( system ) { { final akka . actor . ActorRef tester = getRef ( ) ; if ( org . restcomm . connect . mrb . MediaResourceBrokerTestExceptionHandling . logger . isDebugEnabled ( ) ) org . restcomm . connect . mrb . MediaResourceBrokerTestExceptionHandling . logger . debug ( "test<sp>GetMediaGateway<sp>Exception<sp>Handling" ) ; java . lang . String mrbRequest = new java . lang . String ( "Hello" ) ; mediaResourceBrokerNode1 . tell ( mrbRequest , tester ) ; java . lang . String mrbResponse = expectMsgClass ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } } ; } equals ( java . lang . Object ) { if ( object == null ) { return false ; } else if ( ( this ) == object ) { return true ; } else if ( ( getClass ( ) ) != ( object . getClass ( ) ) ) { return false ; } final org . restcomm . connect . commons . fsm . State state = ( ( org . restcomm . connect . commons . fsm . State ) ( object ) ) ; if ( ! ( id . equals ( state . getId ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( mrbResponse . equals ( mrbRequest ) )
shouldProduceSchemaValidatedXml ( ) { java . lang . String actualXml = net . ripe . rpki . commons . provisioning . payload . issue . response . CertificateIssuanceResponsePayloadBuilderTest . SERIALIZER . serialize ( net . ripe . rpki . commons . provisioning . payload . issue . response . CertificateIssuanceResponsePayloadBuilderTest . TEST_CERTIFICATE_ISSUANCE_RESPONSE_PAYLOAD ) ; "<AssertPlaceHolder>" ; } validateAgainstRelaxNg ( java . lang . String ) { java . lang . System . setProperty ( ( ( ( javax . xml . validation . SchemaFactory . class . getName ( ) ) + ":" ) + ( javax . xml . XMLConstants . RELAXNG_NS_URI ) ) , "com.thaiopensource.relaxng.jaxp.CompactSyntaxSchemaFactory" ) ; javax . xml . validation . SchemaFactory factory = javax . xml . validation . SchemaFactory . newInstance ( XMLConstants . RELAXNG_NS_URI ) ; java . io . File schemaLocation = new java . io . File ( net . ripe . rpki . commons . provisioning . payload . RelaxNgSchemaValidator . SCHEMA_LOCATION ) ; javax . xml . validation . Schema schema = factory . newSchema ( schemaLocation ) ; javax . xml . validation . Validator validator = schema . newValidator ( ) ; javax . xml . transform . stream . StreamSource source = new javax . xml . transform . stream . StreamSource ( new java . io . StringReader ( xml ) ) ; validator . validate ( source ) ; return true ; }
org . junit . Assert . assertTrue ( net . ripe . rpki . commons . provisioning . payload . RelaxNgSchemaValidator . validateAgainstRelaxNg ( actualXml ) )
testDropSchema ( ) { java . lang . String ddl = "CREATE<sp>DATABASE<sp>FOO;" + ( ( ( ( "USE<sp>DATABASE<sp>FOO<sp>;" + "CREATE<sp>VIRTUAL<sp>SCHEMA<sp>test;" ) + "SET<sp>SCHEMA<sp>test;" ) + "CREATE<sp>VIRTUAL<sp>VIEW<sp>G1<sp>AS<sp>SELECT<sp>1<sp>as<sp>e1,<sp>'2'<sp>as<sp>e2,<sp>curdate()<sp>as<sp>e3;" ) + "DROP<sp>VIRTUAL<sp>SCHEMA<sp>test" ) ; org . teiid . query . parser . Database db = org . teiid . query . parser . TestDDLParser . helpParse ( ddl ) ; org . teiid . query . parser . Schema s = db . getSchema ( "test" ) ; "<AssertPlaceHolder>" ; } getSchema ( java . lang . String ) { org . teiid . query . processor . proc . ProcedurePlan . CursorState cursorState = getCursorState ( rsName ) ; java . util . List schema = cursorState . processor . getOutputElements ( ) ; return schema ; }
org . junit . Assert . assertNull ( s )
testToBooleanFromNonZeroNumber ( ) { java . lang . Object result = com . orientechnologies . orient . core . metadata . schema . OType . convert ( 1 , com . orientechnologies . orient . core . metadata . schema . Boolean . class ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class ) { if ( iValue == null ) return null ; if ( iTargetClass == null ) return iValue ; if ( iValue . getClass ( ) . equals ( iTargetClass ) ) return iValue ; if ( iTargetClass . isAssignableFrom ( iValue . getClass ( ) ) ) return iValue ; try { if ( ( iValue instanceof com . orientechnologies . common . types . OBinary ) && ( iTargetClass . isAssignableFrom ( byte [ ] . class ) ) ) return ( ( com . orientechnologies . common . types . OBinary ) ( iValue ) ) . toByteArray ( ) ; else if ( byte [ ] . class . isAssignableFrom ( iTargetClass ) ) { return com . orientechnologies . orient . core . serialization . serializer . OStringSerializerHelper . getBinaryContent ( iValue ) ; } else if ( byte [ ] . class . isAssignableFrom ( iValue . getClass ( ) ) ) { return iValue ; } else if ( iTargetClass . isEnum ( ) ) { if ( iValue instanceof java . lang . Number ) return ( ( java . lang . Class < java . lang . Enum > ) ( iTargetClass ) ) . getEnumConstants ( ) [ ( ( java . lang . Number ) ( iValue ) ) . intValue ( ) ] ; return java . lang . Enum . valueOf ( ( ( java . lang . Class < java . lang . Enum > ) ( iTargetClass ) ) , iValue . toString ( ) ) ; } else if ( ( iTargetClass . equals ( Byte . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Byte . class ) ) ) { if ( iValue instanceof java . lang . Byte ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Byte . parseByte ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . byteValue ( ) ; } else if ( ( iTargetClass . equals ( Short . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Short . class ) ) ) { if ( iValue instanceof java . lang . Short ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Short . parseShort ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . shortValue ( ) ; } else if ( ( iTargetClass . equals ( Integer . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Integer . class ) ) ) { if ( iValue instanceof java . lang . Integer ) return iValue ; else if ( iValue instanceof java . lang . String ) { if ( iValue . toString ( ) . equals ( "" ) ) { return null ; } return java . lang . Integer . parseInt ( ( ( java . lang . String ) ( iValue ) ) ) ; } else return ( ( java . lang . Number ) ( iValue ) ) . intValue ( ) ; } else if ( ( iTargetClass . equals ( Long . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Long . class ) ) ) { if ( iValue instanceof java . lang . Long ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Long . parseLong ( ( ( java . lang . String ) ( iValue ) ) ) ; else if ( iValue instanceof java . util . Date ) return ( ( java . util . Date ) ( iValue ) ) . getTime ( ) ; else return ( ( java . lang . Number ) ( iValue ) ) . longValue ( ) ; } else if ( ( iTargetClass . equals ( Float . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Float . class ) ) ) { if ( iValue instanceof java . lang . Float ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Float . parseFloat ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . floatValue ( ) ; } else if ( iTargetClass . equals ( java . math . BigDecimal . class ) ) { if ( iValue instanceof java . lang . String ) return new java . math . BigDecimal ( ( ( java . lang . String ) ( iValue ) ) ) ; else if ( iValue instanceof java . lang . Number ) return new java . math . BigDecimal ( iValue . toString ( ) ) ; } else if ( ( iTargetClass . equals ( Double . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient
org . junit . Assert . assertEquals ( result , true )
parseIotHubName_no_separator ( ) { java . lang . String iotHubName = "IOTHUBNAME" ; java . lang . String iotHostName = "HostName=" 1 ; java . lang . String sharedAccessKeyName = "ACCESSKEYNAME" ; java . lang . String policyName = "HostName=" 2 ; java . lang . String sharedAccessKey = "1234567890abcdefghijklmnopqrstvwxyz=" ; java . lang . String connectionString = ( ( ( ( ( ( "HostName=" + iotHubName ) + ";SharedAccessKeyName=" ) + sharedAccessKeyName ) + ";" ) + policyName ) + "=" ) + sharedAccessKey ; java . lang . String userString = ( sharedAccessKeyName + "@SAS.root." ) + iotHubName ; tests . unit . com . microsoft . azure . sdk . iot . service . IotHubConnectionString iotHubConnectionString = tests . unit . com . microsoft . azure . sdk . iot . service . IotHubConnectionStringBuilder . createConnectionString ( connectionString ) ; java . lang . String expected = "" ; java . lang . String actual = mockit . Deencapsulation . invoke ( iotHubConnectionString , "parseIotHubName" , iotHubConnectionString ) ; "<AssertPlaceHolder>" ; } createConnectionString ( java . lang . String ) { if ( com . microsoft . azure . sdk . iot . service . Tools . isNullOrEmpty ( connectionString ) ) { throw new java . lang . IllegalArgumentException ( "connection<sp>string<sp>cannotbe<sp>null<sp>or<sp>empty" ) ; } com . microsoft . azure . sdk . iot . service . IotHubConnectionString iotHubConnectionString = new com . microsoft . azure . sdk . iot . service . IotHubConnectionString ( ) ; com . microsoft . azure . sdk . iot . service . IotHubConnectionStringBuilder . parse ( connectionString , iotHubConnectionString ) ; return iotHubConnectionString ; }
org . junit . Assert . assertEquals ( "HostName=" 0 , expected , actual )
testCloneModel ( ) { importModels ( ) ; org . powermock . api . easymock . PowerMock . resetAll ( ) ; org . easymock . EasyMock . expect ( ctx . getCallerPrincipal ( ) ) . andReturn ( principal ) ; java . util . HashMap < java . lang . String , java . lang . String > trackingMap = new java . util . HashMap ( ) ; org . easymock . EasyMock . expect ( connectionFactory . getTrackingMap ( ( ( java . lang . StackTraceElement [ ] ) ( org . easymock . EasyMock . anyObject ( ) ) ) ) ) . andReturn ( trackingMap ) ; org . easymock . EasyMock . expect ( connectionFactory . getConnection ( org . easymock . EasyMock . eq ( AccumuloConnectionFactory . Priority . LOW ) , org . easymock . EasyMock . eq ( trackingMap ) ) ) . andReturn ( connector ) ; connectionFactory . returnConnection ( connector ) ; org . easymock . EasyMock . expect ( connectionFactory . getTrackingMap ( ( ( java . lang . StackTraceElement [ ] ) ( org . easymock . EasyMock . anyObject ( ) ) ) ) ) . andReturn ( trackingMap ) ; org . easymock . EasyMock . expect ( connectionFactory . getConnection ( org . easymock . EasyMock . eq ( AccumuloConnectionFactory . Priority . LOW ) , org . easymock . EasyMock . eq ( trackingMap ) ) ) . andReturn ( connector ) ; connectionFactory . returnConnection ( connector ) ; org . easymock . EasyMock . expect ( ctx . getCallerPrincipal ( ) ) . andReturn ( principal ) ; org . easymock . EasyMock . expect ( connectionFactory . getTrackingMap ( ( ( java . lang . StackTraceElement [ ] ) ( org . easymock . EasyMock . anyObject ( ) ) ) ) ) . andReturn ( trackingMap ) ; org . easymock . EasyMock . expect ( connectionFactory . getConnection ( org . easymock . EasyMock . eq ( AccumuloConnectionFactory . Priority . LOW ) , org . easymock . EasyMock . eq ( trackingMap ) ) ) . andReturn ( connector ) ; org . easymock . EasyMock . expect ( cache . reloadCache ( ModelBean . DEFAULT_MODEL_TABLE_NAME ) ) . andReturn ( null ) ; org . easymock . EasyMock . expect ( java . lang . System . currentTimeMillis ( ) ) . andReturn ( datawave . webservice . query . model . ModelBeanTest . TIMESTAMP ) ; connectionFactory . returnConnection ( connector ) ; org . easymock . EasyMock . expect ( java . lang . System . currentTimeMillis ( ) ) . andReturn ( datawave . webservice . query . model . ModelBeanTest . TIMESTAMP ) ; org . easymock . EasyMock . expect ( java . lang . System . currentTimeMillis ( ) ) . andReturn ( datawave . webservice . query . model . ModelBeanTest . TIMESTAMP ) ; org . powermock . api . easymock . PowerMock . replayAll ( ) ; bean . cloneModel ( MODEL_ONE . getName ( ) , "MODEL2" , ( ( java . lang . String ) ( null ) ) ) ; org . powermock . api . easymock . PowerMock . verifyAll ( ) ; org . powermock . api . easymock . PowerMock . resetAll ( ) ; org . easymock . EasyMock . expect ( ctx . getCallerPrincipal ( ) ) . andReturn ( principal ) ; org . easymock . EasyMock . expect ( connectionFactory . getTrackingMap ( ( ( java . lang . StackTraceElement [ ] ) ( org . easymock . EasyMock . anyObject ( ) ) ) ) ) . andReturn ( trackingMap ) ; org . easymock . EasyMock . expect ( connectionFactory . getConnection ( org . easymock . EasyMock . eq ( AccumuloConnectionFactory . Priority . LOW ) , org . easymock . EasyMock . eq ( trackingMap ) ) ) . andReturn ( connector ) ; connectionFactory . returnConnection ( connector ) ; org . powermock . api . easymock . PowerMock . replayAll ( ) ; datawave . webservice . model . Model model = bean . getModel ( "MODEL2" , ( ( java . lang . String ) ( null ) ) ) ; org . powermock . api . easymock . PowerMock . verifyAll ( ) ; MODEL_ONE . setName ( "MODEL2" ) ; "<AssertPlaceHolder>" ; } setName ( java . lang . String ) { this . name = name ; }
org . junit . Assert . assertEquals ( MODEL_ONE , model )
testReadUI32DoesNotSignExtend ( ) { final byte [ ] data = new byte [ ] { 0 , 0 , 0 , - 1 , 0 , 0 , 0 , 0 } ; final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . BigDecoder fixture = new com . flagstone . transform . coder . BigDecoder ( stream ) ; "<AssertPlaceHolder>" ; } readInt ( ) { if ( ( ( size ) - ( index ) ) < 4 ) { fill ( ) ; } if ( ( ( index ) + 4 ) > ( size ) ) { throw new java . lang . ArrayIndexOutOfBoundsException ( ) ; } int value = ( buffer [ ( ( index ) ++ ) ] ) & ( com . flagstone . transform . coder . SWFDecoder . BYTE_MASK ) ; value |= ( ( buffer [ ( ( index ) ++ ) ] ) & ( com . flagstone . transform . coder . SWFDecoder . BYTE_MASK ) ) << ( com . flagstone . transform . coder . SWFDecoder . TO_BYTE1 ) ; value |= ( ( buffer [ ( ( index ) ++ ) ] ) & ( com . flagstone . transform . coder . SWFDecoder . BYTE_MASK ) ) << ( com . flagstone . transform . coder . SWFDecoder . TO_BYTE2 ) ; value |= ( ( buffer [ ( ( index ) ++ ) ] ) & ( com . flagstone . transform . coder . SWFDecoder . BYTE_MASK ) ) << ( com . flagstone . transform . coder . SWFDecoder . TO_BYTE3 ) ; return value ; }
org . junit . Assert . assertEquals ( 255 , fixture . readInt ( ) )
backreferences_should_be_loaded ( ) { setupLoungeWithLoadableBackrefs ( ) ; org . ektorp . impl . docref . SetLounge ektorp = dbCon . get ( org . ektorp . impl . docref . SetLounge . class , "lounge_id" ) ; "<AssertPlaceHolder>" ; } getSeatedPeople ( ) { return seatedPeople ; }
org . junit . Assert . assertEquals ( 2 , ektorp . getSeatedPeople ( ) . size ( ) )
shiftArray_InTheMiddle ( ) { java . lang . String [ ] array = org . pentaho . reporting . engine . classic . core . layout . process . alignment . AbstractAlignmentProcessorTest . createArray ( "a" , "b" , "c" ) ; org . pentaho . reporting . engine . classic . core . layout . process . alignment . AbstractAlignmentProcessor . shiftArray ( array , 1 , 2 , 3 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertArrayEquals ( org . pentaho . reporting . engine . classic . core . layout . process . alignment . AbstractAlignmentProcessorTest . createArray ( "a" , "b" , "c" , null , "b" , "c" ) , array )
coercingAppleSourcePaths ( ) { java . lang . reflect . Type type = com . facebook . buck . rules . coercer . TypeCoercerTest . TestFields . class . getField ( "listOfSourcesWithFlags" ) . getGenericType ( ) ; com . facebook . buck . rules . coercer . TypeCoercer < ? > coercer = typeCoercerFactory . typeCoercerForType ( type ) ; com . google . common . collect . ImmutableList < java . lang . String > input = com . google . common . collect . ImmutableList . of ( "foo.m" , "bar.m" ) ; java . lang . Object result = coercer . coerce ( cellRoots , filesystem , java . nio . file . Paths . get ( "" ) , EmptyTargetConfiguration . INSTANCE , input ) ; com . google . common . collect . ImmutableList < com . facebook . buck . core . sourcepath . SourceWithFlags > expectedResult = com . google . common . collect . ImmutableList . of ( com . facebook . buck . core . sourcepath . SourceWithFlags . of ( com . facebook . buck . core . sourcepath . FakeSourcePath . of ( "foo.m" ) ) , com . facebook . buck . core . sourcepath . SourceWithFlags . of ( com . facebook . buck . core . sourcepath . FakeSourcePath . of ( "bar.m" ) ) ) ; "<AssertPlaceHolder>" ; } of ( java . lang . String ) { return com . facebook . buck . core . sourcepath . FakeSourcePath . of ( new com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem ( ) , path ) ; }
org . junit . Assert . assertEquals ( expectedResult , result )
test_allInValidStringCode ( ) { org . terasoluna . gfw . common . codelist . Person p = new org . terasoluna . gfw . common . codelist . Person ( ) ; p . gender = "G" ; p . lang = "FR" ; java . util . Set < javax . validation . ConstraintViolation < org . terasoluna . gfw . common . codelist . Person > > result = validator . validate ( p ) ; "<AssertPlaceHolder>" ; } size ( ) { return java . lang . reflect . Array . getLength ( arrayObject ) ; }
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
orCompressedSize ( ) { com . googlecode . javaewah . EWAHCompressedBitmap b1 = com . googlecode . javaewah . EWAHCompressedBitmap . bitmapOf ( ) ; com . googlecode . javaewah . EWAHCompressedBitmap b2 = com . googlecode . javaewah . EWAHCompressedBitmap . bitmapOf ( ) ; b1 . set ( 0 ) ; b1 . set ( com . googlecode . javaewah . EWAHCompressedBitmap . WORD_IN_BITS ) ; b2 . setSizeInBits ( 1 , false ) ; b2 . setSizeInBits ( com . googlecode . javaewah . EWAHCompressedBitmap . WORD_IN_BITS , true ) ; com . googlecode . javaewah . EWAHCompressedBitmap result = b1 . or ( b2 ) ; "<AssertPlaceHolder>" ; } sizeInBytes ( ) { return ( this . buffer . sizeInWords ( ) ) * ( ( com . googlecode . javaewah . EWAHCompressedBitmap . WORD_IN_BITS ) / 8 ) ; }
org . junit . Assert . assertEquals ( ( ( 2 * ( com . googlecode . javaewah . EWAHCompressedBitmap . WORD_IN_BITS ) ) / 8 ) , result . sizeInBytes ( ) )
getConstructor ( ) { java . lang . reflect . Constructor < java . lang . Object > constructor = java . lang . Object . class . getConstructor ( ) ; com . kaching . platform . converters . InstantiatorImpl < java . lang . Object > instantiator = new com . kaching . platform . converters . InstantiatorImpl < java . lang . Object > ( constructor , null , null , new java . util . BitSet ( ) , new java . util . BitSet ( ) , null , null , null ) ; "<AssertPlaceHolder>" ; } getConstructor ( ) { @ com . kaching . platform . converters . SuppressWarnings ( "unchecked" ) java . lang . reflect . Constructor < T > [ ] constructors = ( ( java . lang . reflect . Constructor < T > [ ] ) ( klass . getDeclaredConstructors ( ) ) ) ; if ( ( constructors . length ) > 1 ) { java . lang . reflect . Constructor < T > convertableConstructor = null ; for ( java . lang . reflect . Constructor < T > constructor : constructors ) { if ( ( constructor . getAnnotation ( com . kaching . platform . converters . Instantiate . class ) ) != null ) { if ( convertableConstructor == null ) { convertableConstructor = constructor ; } else { com . kaching . platform . converters . InstantiatorErrors . moreThanOneConstructorWithInstantiate ( errors , klass ) ; return com . kaching . platform . common . Option . none ( ) ; } } } if ( convertableConstructor != null ) { return com . kaching . platform . common . Option . some ( convertableConstructor ) ; } else { com . kaching . platform . converters . InstantiatorErrors . moreThanOneConstructor ( errors , klass ) ; return com . kaching . platform . common . Option . none ( ) ; } } else if ( ( constructors . length ) == 0 ) { com . kaching . platform . converters . InstantiatorErrors . noConstructorFound ( errors , klass ) ; return com . kaching . platform . common . Option . none ( ) ; } else { return com . kaching . platform . common . Option . some ( constructors [ 0 ] ) ; } }
org . junit . Assert . assertTrue ( ( constructor == ( instantiator . getConstructor ( ) ) ) )
getServerConfiguration_useDynamic ( ) { org . mockito . Mockito . when ( mockStaticService . getServerConfiguration ( issuer ) ) . thenReturn ( null ) ; org . mockito . Mockito . when ( mockDynamicService . getServerConfiguration ( issuer ) ) . thenReturn ( mockServerConfig ) ; org . mitre . openid . connect . config . ServerConfiguration result = hybridService . getServerConfiguration ( issuer ) ; org . mockito . Mockito . verify ( mockStaticService ) . getServerConfiguration ( issuer ) ; org . mockito . Mockito . verify ( mockDynamicService ) . getServerConfiguration ( issuer ) ; "<AssertPlaceHolder>" ; } getServerConfiguration ( java . lang . String ) { org . mitre . openid . connect . config . ServerConfiguration server = staticServerService . getServerConfiguration ( issuer ) ; if ( server != null ) { return server ; } else { return dynamicServerService . getServerConfiguration ( issuer ) ; } }
org . junit . Assert . assertEquals ( mockServerConfig , result )
testGetSoortAdministratieveHandeling ( ) { final nl . bzk . brp . model . bericht . kern . PersoonBericht persoonBericht = new nl . bzk . brp . model . bericht . kern . PersoonBericht ( ) ; final nl . bzk . brp . business . regels . context . BerichtRegelContext berichtRegelContext = new nl . bzk . brp . business . regels . context . BerichtRegelContext ( persoonBericht , nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortAdministratieveHandeling . DUMMY ) ; final nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortAdministratieveHandeling soortAdministratieveHandeling = berichtRegelContext . getSoortAdministratieveHandeling ( ) ; "<AssertPlaceHolder>" ; } getSoortAdministratieveHandeling ( ) { return nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . SoortAdministratieveHandeling . parseId ( soortAdministratieveHandelingId ) ; }
org . junit . Assert . assertEquals ( SoortAdministratieveHandeling . DUMMY , soortAdministratieveHandeling )
testBasicNumbers ( ) { for ( int i = - 100 ; i <= ( + 100 ) ; i ++ ) { "<AssertPlaceHolder>" ; } } any ( ) { return new playn . core . json . JsonParser . JsonParserContext < java . lang . Object > ( java . lang . Object . class ) ; }
org . junit . Assert . assertEquals ( i , ( ( int ) ( ( java . lang . Integer ) ( playn . core . json . JsonParser . any ( ) . from ( ( "" + i ) ) ) ) ) )
runTest ( ) { final uk . ac . ed . ph . qtiworks . mathassess . glue . maxima . MaximaDataBinder binder = new uk . ac . ed . ph . qtiworks . mathassess . glue . maxima . MaximaDataBinder ( ) ; final uk . ac . ed . ph . qtiworks . mathassess . glue . types . ValueWrapper valueWrapperResult = binder . parseMaximaLinearOutput ( maximaRepresentation , valueWrapperClass ) ; "<AssertPlaceHolder>" ; } parseMaximaLinearOutput ( java . lang . String , java . lang . Class ) { uk . ac . ed . ph . snuggletex . internal . util . ConstraintUtilities . ensureNotNull ( maximaLinearOutput , "Maxima<sp>linear<sp>output" ) ; uk . ac . ed . ph . snuggletex . internal . util . ConstraintUtilities . ensureNotNull ( resultClass , "result<sp>Class" ) ; if ( uk . ac . ed . ph . qtiworks . mathassess . glue . types . SingleValueWrapper . class . isAssignableFrom ( resultClass ) ) { return ( ( V ) ( parseSingleLinearOutput ( maximaLinearOutput , ( ( java . lang . Class < ? extends uk . ac . ed . ph . qtiworks . mathassess . glue . types . SingleValueWrapper > ) ( resultClass ) ) ) ) ) ; } else if ( uk . ac . ed . ph . qtiworks . mathassess . glue . types . MultipleValueWrapper . class . isAssignableFrom ( resultClass ) ) { return ( ( V ) ( parseMultipleLinearOutput ( maximaLinearOutput , ( ( java . lang . Class < ? extends uk . ac . ed . ph . qtiworks . mathassess . glue . types . MultipleValueWrapper > ) ( resultClass ) ) ) ) ) ; } else if ( uk . ac . ed . ph . qtiworks . mathassess . glue . types . OrderedValueWrapper . class . isAssignableFrom ( resultClass ) ) { return ( ( V ) ( parseOrderedLinearOutput ( maximaLinearOutput , ( ( java . lang . Class < ? extends uk . ac . ed . ph . qtiworks . mathassess . glue . types . OrderedValueWrapper > ) ( resultClass ) ) ) ) ) ; } else if ( uk . ac . ed . ph . qtiworks . mathassess . glue . types . MathsContentValueWrapper . class . isInstance ( resultClass ) ) { throw new java . lang . IllegalArgumentException ( "This<sp>method<sp>should<sp>not<sp>be<sp>used<sp>to<sp>extract<sp>MathsContent<sp>values" ) ; } else { throw new uk . ac . ed . ph . qtiworks . mathassess . glue . MathAssessSpecUnimplementedException ( ( ( "Support<sp>for<sp>parsing<sp>raw<sp>Maxima<sp>output<sp>into<sp>values<sp>of<sp>class<sp>" + resultClass ) + "<sp>has<sp>not<sp>yet<sp>been<sp>implemented" ) ) ; } }
org . junit . Assert . assertNull ( valueWrapperResult )
initializeMultiwordSurname ( ) { gov . uspto . patent . model . entity . NamePerson name = new gov . uspto . patent . model . entity . NamePerson ( "Bernardus" , "van<sp>den<sp>Bosch" ) ; java . lang . String abbrev = name . getInitials ( ) ; java . lang . String expect = "BvdB" ; "<AssertPlaceHolder>" ; } getInitials ( ) { java . lang . String shortest = super . getShortestSynonym ( ) ; java . lang . String check1 = ( shortest . isEmpty ( ) ) ? getName ( ) : shortest ; java . lang . String [ ] reduced = gov . uspto . common . text . StringCaseUtil . removeLowercaseTitleWords ( check1 . split ( "[\\s-]+" ) ) ; java . lang . String [ ] words = java . lang . String . join ( "<sp>" , reduced ) . split ( "[\\s-]+" , 2 ) ; java . lang . StringBuilder stb = new java . lang . StringBuilder ( ) ; for ( java . lang . String word : words ) { stb . append ( abbreviateText ( word , 3 ) ) . append ( "-" ) ; } if ( ( stb . length ( ) ) > 0 ) { stb . replace ( ( ( stb . length ( ) ) - 1 ) , stb . length ( ) , "" ) ; } return stb . toString ( ) ; }
org . junit . Assert . assertEquals ( expect , abbrev )
testGetBrowser ( ) { org . eclipse . swt . browser . BrowserFunction function = new org . eclipse . swt . browser . BrowserFunction ( browser , org . eclipse . swt . browser . BrowserFunction_Test . FUNC ) ; "<AssertPlaceHolder>" ; } getBrowser ( ) { if ( disposed ) { org . eclipse . swt . SWT . error ( SWT . ERROR_FUNCTION_DISPOSED ) ; } browser . checkWidget ( ) ; return browser ; }
org . junit . Assert . assertEquals ( browser , function . getBrowser ( ) )
customValuesTest ( ) { javax . ws . rs . core . Response response = org . jboss . resteasy . test . resource . param . RESTEasyParamBasicTest . client . target ( generateURL ( "/custom/values/a/pathParam0/pathParam1/pathParam2/pathParam3" ) ) . queryParam ( "queryParam0" , "queryParam0" ) . queryParam ( "cookieParam3" 7 , "cookieParam3" 7 ) . queryParam ( "cookieParam3" 1 , "cookieParam3" 1 ) . queryParam ( "cookieParam3" 4 , "cookieParam3" 4 ) . matrixParam ( "cookieParam3" 2 , "cookieParam3" 2 ) . matrixParam ( "Success" 0 , "Success" 0 ) . matrixParam ( "cookieParam3" 8 , "cookieParam3" 8 ) . matrixParam ( "cookieParam3" 0 , "cookieParam3" 0 ) . request ( ) . header ( "cookieParam3" 9 , "cookieParam3" 9 ) . header ( "cookieParam3" 6 , "cookieParam3" 6 ) . header ( "Success" 1 , "Success" 1 ) . header ( "headerParam3" , "headerParam3" ) . cookie ( "cookieParam0" , "cookieParam0" ) . cookie ( "cookieParam1" , "cookieParam1" ) . cookie ( "cookieParam3" 3 , "cookieParam3" 3 ) . cookie ( "cookieParam3" , "cookieParam3" ) . post ( javax . ws . rs . client . Entity . form ( new javax . ws . rs . core . Form ( ) . param ( "formParam0" , "formParam0" ) . param ( "formParam1" , "formParam1" ) . param ( "cookieParam3" 5 , "cookieParam3" 5 ) . param ( "formParam3" , "formParam3" ) ) ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; }
org . junit . Assert . assertEquals ( "Success" , 200 , response . getStatus ( ) )
ruleKeyIsDeterministic ( ) { com . facebook . buck . core . rulekey . RuleKey originalKey = getRuleKey ( "foo" , ArchiveFormat . TAR , java . util . Optional . of ( "foo-1.2.3" ) ) ; for ( int i = 0 ; i < 20 ; i ++ ) { "<AssertPlaceHolder>" ; } } getRuleKey ( java . lang . String , com . facebook . buck . util . unarchive . ArchiveFormat , java . util . Optional ) { com . facebook . buck . core . model . BuildTarget target = com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//foo:bar" ) ; com . facebook . buck . core . rules . BuildRuleParams params = new com . facebook . buck . core . rules . BuildRuleParams ( ImmutableSortedSet :: of , ImmutableSortedSet :: of , com . google . common . collect . ImmutableSortedSet . of ( ) ) ; com . facebook . buck . file . HttpFile httpFile = new com . facebook . buck . file . HttpFile ( target . withAppendedFlavors ( com . facebook . buck . core . model . InternalFlavor . of ( "archive-download" ) ) , filesystem , params , ( eventBus , path , output ) -> false , com . google . common . collect . ImmutableList . of ( java . net . URI . create ( "http://example.com/foo.zip" ) ) , com . google . common . hash . HashCode . fromString ( "d29acd2e2a5bc00e04c85a44c3ca7106c51dc0d2488f8222b07179d567a7f128" ) , out , false ) ; com . facebook . buck . file . HttpArchive httpArchive = new com . facebook . buck . file . HttpArchive ( target , filesystem , params , httpFile , out , format , stripPrefix . map ( Paths :: get ) ) ; com . facebook . buck . core . rules . SourcePathRuleFinder ruleFinder = new com . facebook . buck . core . rules . SourcePathRuleFinder ( new com . facebook . buck . core . rules . resolver . impl . TestActionGraphBuilder ( ) ) ; com . facebook . buck . core . sourcepath . resolver . SourcePathResolver pathResolver = com . facebook . buck . core . sourcepath . resolver . impl . DefaultSourcePathResolver . from ( ruleFinder ) ; com . facebook . buck . testutil . FakeFileHashCache hashCache = com . facebook . buck . testutil . FakeFileHashCache . createFromStrings ( com . google . common . collect . ImmutableMap . of ( ) ) ; return new com . facebook . buck . rules . keys . TestDefaultRuleKeyFactory ( hashCache , pathResolver , ruleFinder ) . build ( httpArchive ) ; }
org . junit . Assert . assertEquals ( originalKey , getRuleKey ( "foo" , ArchiveFormat . TAR , java . util . Optional . of ( "foo-1.2.3" ) ) )
testGetTimestamp ( ) { java . sql . PreparedStatement preparedStatement = createMock ( java . sql . PreparedStatement . class ) ; java . sql . ResultSet resultSet = createMock ( java . sql . ResultSet . class ) ; int colN = 120 ; java . sql . Timestamp val = new java . sql . Timestamp ( 123123123123L ) ; expect ( resultSet . getMetaData ( ) ) . andReturn ( null ) ; expect ( resultSet . getTimestamp ( ( colN + 1 ) ) ) . andReturn ( val ) ; resultSet . close ( ) ; replay ( preparedStatement , resultSet ) ; com . j256 . ormlite . jdbc . JdbcDatabaseResults results = new com . j256 . ormlite . jdbc . JdbcDatabaseResults ( preparedStatement , resultSet , null , false ) ; "<AssertPlaceHolder>" ; results . close ( ) ; verify ( preparedStatement , resultSet ) ; } getTimestamp ( int ) { return resultSet . getTimestamp ( ( columnIndex + 1 ) ) ; }
org . junit . Assert . assertEquals ( val , results . getTimestamp ( colN ) )
shouldCreateARandomNumber ( ) { java . lang . Double result = numberGenerator . generate ( new ch . nerdin . generators . testdata . framework . FieldProperty ( ) ) ; "<AssertPlaceHolder>" ; } generate ( ch . nerdin . generators . testdata . framework . FieldProperty ) { java . lang . String regularExpression = property . getRegex ( ) ; validateExpression ( regularExpression ) ; java . util . List < ch . nerdin . generators . testdata . framework . Expression > expressionList = parse ( regularExpression ) ; return generateString ( expressionList ) ; }
org . junit . Assert . assertNotNull ( result )
shouldAcceptMessageWithNoParameters ( ) { logger . error ( org . modeshape . common . logging . LoggerTest . errorMessageWithNoParameters ) ; logger . warn ( org . modeshape . common . logging . LoggerTest . warningMessageWithNoParameters ) ; logger . info ( org . modeshape . common . logging . LoggerTest . infoMessageWithNoParameters ) ; logger . debug ( "This<sp>is<sp>a<sp>debug<sp>message<sp>with<sp>no<sp>parameters" ) ; logger . trace ( "This<sp>is<sp>a<sp>trace<sp>message<sp>with<sp>no<sp>parameters" ) ; log . removeFirst ( Logger . Level . ERROR , "This<sp>is<sp>an<sp>error<sp>message<sp>with<sp>no<sp>parameters" ) ; log . removeFirst ( Logger . Level . WARNING , "This<sp>is<sp>a<sp>warning<sp>message<sp>with<sp>no<sp>parameters" ) ; log . removeFirst ( Logger . Level . INFO , "This<sp>is<sp>an<sp>info<sp>message<sp>with<sp>no<sp>parameters" ) ; log . removeFirst ( Logger . Level . DEBUG , "This<sp>is<sp>a<sp>debug<sp>message<sp>with<sp>no<sp>parameters" ) ; log . removeFirst ( Logger . Level . TRACE , "This<sp>is<sp>a<sp>trace<sp>message<sp>with<sp>no<sp>parameters" ) ; "<AssertPlaceHolder>" ; } hasEvents ( ) { return ( this . events . size ( ) ) != 0 ; }
org . junit . Assert . assertEquals ( false , log . hasEvents ( ) )
testGetDataWithLong2 ( ) { final java . lang . String name = "success-test" ; java . util . Map < java . lang . String , java . lang . Object > attribute = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; attribute . put ( "first-key" , 15000 ) ; final java . util . Optional < java . util . Map < java . lang . String , java . lang . Object > > data = java . util . Optional . of ( attribute ) ; org . eclipse . microprofile . health . HealthCheckResponse response = new com . ibm . ws . microprofile . health . impl . HealthCheckResponseImpl ( name , null , data ) ; java . util . Optional < java . util . Map < java . lang . String , java . lang . Object > > testData = response . getData ( ) ; "<AssertPlaceHolder>" ; } getData ( ) { return data ; }
org . junit . Assert . assertEquals ( data , testData )
testIndexOf ( ) { final org . jtrfp . trcl . coll . ListActionDispatcher < java . lang . String > out = ( ( org . jtrfp . trcl . coll . ListActionDispatcher < java . lang . String > ) ( subject . getOutput ( ) ) ) ; subject . add ( 0 ) ; subject . add ( 1 ) ; "<AssertPlaceHolder>" ; } indexOf ( java . lang . Object ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 1 , out . indexOf ( "1" ) )
testIsReplaceableByTimestampEqual ( ) { java . lang . String expectedValue = "Some<sp>value" ; com . hazelcast . hibernate . serialization . Value value = new com . hazelcast . hibernate . serialization . Value ( null , 100L , expectedValue ) ; "<AssertPlaceHolder>" ; } isReplaceableBy ( long , java . lang . Object , java . util . Comparator ) { return ( version ) == null ? ( timestamp ) <= txTimestamp : ( versionComparator . compare ( version , newVersion ) ) < 0 ; }
org . junit . Assert . assertTrue ( value . isReplaceableBy ( 100L , null , null ) )
givenFolderAlreadyExistsWhenCheckContainerExistenceThenRetunTrue ( ) { storage . createContainer ( fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . CONTAINER_NAME ) ; storage . createFolder ( fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . CONTAINER_NAME , fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . FOLDER_NAME ) ; "<AssertPlaceHolder>" ; } isExistingFolder ( java . lang . String , java . lang . String ) { fr . gouv . vitam . common . ParametersChecker . checkParameter ( ErrorMessage . CONTAINER_FOLDER_NAMES_ARE_A_MANDATORY_PARAMETER . getMessage ( ) , containerName , folderName ) ; javax . ws . rs . core . Response response = null ; try { response = performRequest ( HttpMethod . HEAD , ( ( ( ( fr . gouv . vitam . workspace . client . WorkspaceClient . CONTAINERS ) + containerName ) + ( fr . gouv . vitam . workspace . client . WorkspaceClient . FOLDERS ) ) + folderName ) , null , MediaType . APPLICATION_JSON_TYPE ) ; return ( Response . Status . OK . getStatusCode ( ) ) == ( response . getStatus ( ) ) ; } catch ( final fr . gouv . vitam . common . exception . VitamClientInternalException e ) { fr . gouv . vitam . workspace . client . WorkspaceClient . LOGGER . error ( fr . gouv . vitam . workspace . client . WorkspaceClient . INTERNAL_SERVER_ERROR2 , e ) ; throw new fr . gouv . vitam . workspace . api . exception . ContentAddressableStorageServerException ( e ) ; } finally { consumeAnyEntityAndClose ( response ) ; } }
org . junit . Assert . assertTrue ( storage . isExistingFolder ( fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . CONTAINER_NAME , fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . FOLDER_NAME ) )
testDatumGeboorteSamengesteldeNaamGeslachtsnaamstamWoonPlaats ( ) { final java . util . Set < nl . bzk . brp . domain . algemeen . ZoekCriterium > zoekCriteria = new java . util . HashSet ( ) ; nl . bzk . brp . domain . algemeen . ZoekCriterium zoekCriteria1 = new nl . bzk . brp . domain . algemeen . ZoekCriterium ( getAttribuutElement ( Element . PERSOON_GEBOORTE_DATUM ) , nl . bzk . algemeenbrp . dal . domein . brp . enums . Zoekoptie . EXACT , 19811002 ) ; nl . bzk . brp . domain . algemeen . ZoekCriterium zoekCriteria2 = new nl . bzk . brp . domain . algemeen . ZoekCriterium ( getAttribuutElement ( Element . PERSOON_ADRES_WOONPLAATSNAAM ) , nl . bzk . algemeenbrp . dal . domein . brp . enums . Zoekoptie . EXACT , "Drachten" ) ; nl . bzk . brp . domain . algemeen . ZoekCriterium zoekCriteria3 = new nl . bzk . brp . domain . algemeen . ZoekCriterium ( getAttribuutElement ( Element . PERSOON_SAMENGESTELDENAAM_GESLACHTSNAAMSTAM ) , nl . bzk . algemeenbrp . dal . domein . brp . enums . Zoekoptie . EXACT , "WasVlagX" ) ; zoekCriteria . add ( zoekCriteria1 ) ; zoekCriteria . add ( zoekCriteria2 ) ; zoekCriteria . add ( zoekCriteria3 ) ; nl . bzk . brp . delivery . dataaccess . bevraging . SqlStamementZoekPersoon sql = new nl . bzk . brp . delivery . dataaccess . bevraging . SqlBepaler ( zoekCriteria , 10 , true , null , false ) . maakSql ( ) ; final java . util . List < java . lang . Long > ids = zoekPersoonRepository . zoekPersonen ( sql , postgres ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , ids . size ( ) )
testValueAsString ( ) { final com . allanbank . mongodb . bson . element . SymbolElement element = new com . allanbank . mongodb . bson . element . SymbolElement ( "foo" , "string" ) ; "<AssertPlaceHolder>" ; } getValueAsString ( ) { return myUuid . toString ( ) ; }
org . junit . Assert . assertEquals ( "string" , element . getValueAsString ( ) )
testUseTube ( ) { boolean f = client . useTube ( "br" ) ; "<AssertPlaceHolder>" ; } useTube ( java . lang . String ) { com . dinstone . beanstalkc . internal . operation . UseOperation operation = new com . dinstone . beanstalkc . internal . operation . UseOperation ( tube ) ; return getBoolean ( connection . handle ( operation ) ) ; }
org . junit . Assert . assertTrue ( f )
testCreateReplacementQuery_ParamsArray_Single ( ) { org . apache . cayenne . query . SQLSelect < org . apache . cayenne . DataRow > q = org . apache . cayenne . query . SQLSelect . dataRowQuery ( "bla" ) . paramsArray ( "a" ) ; org . apache . cayenne . query . SQLTemplate replacement = ( ( org . apache . cayenne . query . SQLTemplate ) ( q . createReplacementQuery ( mock ( org . apache . cayenne . map . EntityResolver . class ) ) ) ) ; "<AssertPlaceHolder>" ; } getPositionalParams ( ) { return ( positionalParams ) != null ? positionalParams : java . util . Collections . emptyList ( ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . Object [ ] { "a" } , replacement . getPositionalParams ( ) . toArray ( ) )
testDownloadFileAlreadyExistingSameContent ( ) { java . io . File existing = new java . io . File ( org . hive2hive . core . processes . files . download . DownloadSmallFileTest . downloaderRoot , uploadedFile . getName ( ) ) ; org . apache . commons . io . FileUtils . write ( existing , org . apache . commons . io . FileUtils . readFileToString ( uploadedFile ) ) ; long lastModifiedBefore = existing . lastModified ( ) ; org . hive2hive . processframework . interfaces . IProcessComponent < java . lang . Void > process = org . hive2hive . core . processes . ProcessFactory . instance ( ) . createDownloadFileProcess ( fileNode . getFilePublicKey ( ) , org . hive2hive . core . processes . files . download . DownloadSmallFileTest . downloader ) ; org . hive2hive . core . utils . TestExecutionUtil . executeProcessTillFailed ( process ) ; "<AssertPlaceHolder>" ; } executeProcessTillFailed ( org . hive2hive . processframework . interfaces . IProcessComponent ) { try { process . execute ( ) ; System . err . println ( "ERROR:<sp>Cannot<sp>wait<sp>until<sp>process<sp>is<sp>done." ) ; org . junit . Assert . fail ( "Process<sp>should<sp>fail" ) ; } catch ( org . hive2hive . processframework . exceptions . InvalidProcessStateException | org . hive2hive . processframework . exceptions . ProcessExecutionException e ) { } }
org . junit . Assert . assertEquals ( lastModifiedBefore , existing . lastModified ( ) )
testCreateBeanInvokesModelCreation ( ) { com . dspot . declex . test . model . usemodel . model . ModelUser_ user = mock ( com . dspot . declex . test . model . usemodel . model . ModelUser_ . class ) ; stub ( method ( com . dspot . declex . test . model . usemodel . model . ModelUser_ . class , "getModel_" , android . content . Context . class , java . util . Map . class , java . util . List . class ) ) . toReturn ( user ) ; { com . dspot . declex . test . model . usemodel . model . ModelUser_ bean = com . dspot . declex . test . model . usemodel . model . ModelUser_ . getInstance_ ( RuntimeEnvironment . application ) ; "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertEquals ( user , bean )
testCustomType ( ) { final org . apache . commons . vfs2 . UserAuthenticationData . Type type = new org . apache . commons . vfs2 . UserAuthenticationData . Type ( "JUNIT" ) ; final org . apache . commons . vfs2 . UserAuthenticationData data = new org . apache . commons . vfs2 . UserAuthenticationData ( ) ; final char [ ] array = "test" . toCharArray ( ) ; data . setData ( type , array ) ; "<AssertPlaceHolder>" ; } getData ( org . apache . commons . vfs2 . UserAuthenticationData$Type ) { return authenticationData . get ( type ) ; }
org . junit . Assert . assertSame ( array , data . getData ( type ) )
testWriteNonMapPropertyWithWildcardWhenNotIndexed ( ) { org . springframework . data . solr . core . convert . MappingSolrConverterTests . BeanWithCatchAllField bean = new org . springframework . data . solr . core . convert . MappingSolrConverterTests . BeanWithCatchAllField ( ) ; bean . allStringProperties = new java . lang . String [ ] { "value_1" , "value_2" } ; org . apache . solr . common . SolrInputDocument solrDocument = new org . apache . solr . common . SolrInputDocument ( ) ; converter . write ( bean , solrDocument ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return this . parameters . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( solrDocument . isEmpty ( ) )
testGetByEObject_02 ( ) { final org . eclipse . xtext . resource . IEObjectDescription desc1 = new org . eclipse . xtext . scoping . impl . ImportScopeTest . ProxyReturningDescription ( org . eclipse . xtext . naming . QualifiedName . create ( "com" , "foo" ) , EcorePackage . Literals . EANNOTATION , null ) ; final org . eclipse . xtext . resource . IEObjectDescription desc2 = new org . eclipse . xtext . scoping . impl . ImportScopeTest . ProxyReturningDescription ( org . eclipse . xtext . naming . QualifiedName . create ( "de" , "foo" ) , EcorePackage . Literals . EATTRIBUTE , null ) ; org . eclipse . xtext . scoping . impl . SimpleScope outer = new org . eclipse . xtext . scoping . impl . SimpleScope ( newArrayList ( desc1 , desc2 ) , false ) ; org . eclipse . xtext . scoping . impl . ImportNormalizer n1 = new org . eclipse . xtext . scoping . impl . ImportNormalizer ( org . eclipse . xtext . naming . QualifiedName . create ( "com" ) , true , false ) ; org . eclipse . xtext . scoping . impl . ImportScopeTest . TestableImportScope scope = new org . eclipse . xtext . scoping . impl . ImportScopeTest . TestableImportScope ( newArrayList ( n1 ) , outer , new org . eclipse . xtext . scoping . impl . ScopeBasedSelectable ( outer ) , EcorePackage . Literals . EOBJECT , true ) ; org . eclipse . xtext . resource . IEObjectDescription description = scope . getSingleElement ( EcorePackage . Literals . EANNOTATION ) ; "<AssertPlaceHolder>" ; } getName ( ) { return ( ( ( getTestClass ( ) . getJavaClass ( ) . getSimpleName ( ) ) + "<sp>[" ) + ( getProcessorName ( ) ) ) + "]" ; }
org . junit . Assert . assertEquals ( "foo" , description . getName ( ) . toString ( ) )
testMeshGrid ( ) { org . nd4j . autodiff . opvalidation . List < java . lang . String > failed = new org . nd4j . autodiff . opvalidation . ArrayList ( ) ; for ( int rank = 2 ; rank <= 4 ; rank ++ ) { org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . samediff . SDVariable [ ] arr = new org . nd4j . autodiff . samediff . SDVariable [ rank ] ; org . nd4j . autodiff . opvalidation . List < java . lang . String > names = new org . nd4j . autodiff . opvalidation . ArrayList ( ) ; for ( int i = 0 ; i < rank ; i ++ ) { org . nd4j . linalg . api . ndarray . INDArray in = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , ( 3 + i ) , ( 3 + i ) ) . reshape ( ( 3 + i ) ) . castTo ( DataType . DOUBLE ) ; arr [ i ] = sd . var ( ( "in" + i ) , in ) ; names . add ( ( "meshgrid-" + i ) ) ; } org . nd4j . autodiff . samediff . SDVariable [ ] meshgrid = sd . math ( ) . meshgrid ( names , false , arr ) ; org . nd4j . autodiff . validation . TestCase tc = new org . nd4j . autodiff . validation . TestCase ( sd ) ; long [ ] shape ; if ( rank == 2 ) { shape = new long [ ] { 3 , 4 } ; } else if ( rank == 3 ) { shape = new long [ ] { 3 , 4 , 5 } ; } else { shape = new long [ ] { 3 , 4 , 5 , 6 } ; } org . nd4j . linalg . api . ndarray . INDArray [ ] exp = new org . nd4j . linalg . api . ndarray . INDArray [ shape . length ] ; for ( int i = 0 ; i < ( exp . length ) ; i ++ ) { exp [ i ] = org . nd4j . linalg . factory . Nd4j . create ( DataType . DOUBLE , shape ) ; long nTensors = exp [ i ] . tensorsAlongDimension ( i ) ; for ( long j = 0 ; j < nTensors ; j ++ ) { org . nd4j . linalg . api . ndarray . INDArray tad = exp [ i ] . tensorAlongDimension ( ( ( int ) ( j ) ) , i ) ; tad . assign ( arr [ i ] . getArr ( ) ) ; } tc . expected ( meshgrid [ i ] , exp [ i ] ) ; } org . nd4j . autodiff . samediff . SDVariable loss = null ; for ( int i = 0 ; i < rank ; i ++ ) { if ( i == 0 ) loss = meshgrid [ i ] . std ( true ) ; else { loss = loss . add ( ( "loss-" + i ) , meshgrid [ i ] . std ( true ) ) ; } } java . lang . String err = org . nd4j . autodiff . validation . OpValidation . validate ( tc , true ) ; if ( err != null ) failed . add ( err ) ; } "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder buff = new java . lang . StringBuilder ( "[" ) ; int sz = objects . size ( ) ; int i ; for ( i = 0 ; i < sz ; i ++ ) { java . lang . Object e = objects . get ( i ) ; buff . append ( e ) ; if ( i < ( sz - 1 ) ) buff . append ( "<sp>,<sp>" ) ; } buff . append ( "]" ) ; return buff . toString ( ) ; }
org . junit . Assert . assertEquals ( failed . toString ( ) , 0 , failed . size ( ) )
testHasQueryNullQueryTest ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; map . put ( "testKey" , "testVal" ) ; RequestParser < String > . ParsedRequest parsed = target . new org . o3project . odenos . remoteobject . ParsedRequest ( new org . o3project . odenos . remoteobject . message . Request ( "testID" , org . o3project . odenos . remoteobject . message . Request . Method . GET , "testPath" , "txid" , "testBody" ) , "testResult" , map , null ) ; "<AssertPlaceHolder>" ; } hasQuery ( ) { return ( this . queriesString ) != null ; }
org . junit . Assert . assertFalse ( parsed . hasQuery ( ) )
isProtected_A$String_true ( ) { java . lang . String methodSignature = "protected<sp>String<sp>hogehge(String<sp>hoge)<sp>throws<sp>Exception<sp>{" ; boolean actual = org . junithelper . core . util . AccessModifierDetector . isProtected ( methodSignature ) ; boolean expected = true ; "<AssertPlaceHolder>" ; } isProtected ( java . lang . String ) { return ( methodSignature != null ) && ( methodSignature . matches ( ( ( ( org . junithelper . core . util . AccessModifierDetector . RegExp . Prefix ) + "protected" ) + ( org . junithelper . core . util . AccessModifierDetector . RegExp . Suffix ) ) ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testPerformanceAndEntriesCount ( ) { long repeats = java . lang . Long . parseLong ( java . lang . System . getProperty ( "r" , "1" ) ) ; long n = java . lang . Long . parseLong ( java . lang . System . getProperty ( "n" , "10000" ) ) ; com . github . davidmoten . rtree3d . RTree < java . lang . Object , com . github . davidmoten . rtree3d . geometry . Geometry > tree = null ; while ( ( -- repeats ) >= 0 ) { long t = java . lang . System . currentTimeMillis ( ) ; tree = com . github . davidmoten . rtree3d . RTreeTest . createRandomRTree ( n ) ; long diff = ( java . lang . System . currentTimeMillis ( ) ) - t ; System . out . println ( ( "inserts/second<sp>=<sp>" + ( ( ( ( double ) ( n ) ) / diff ) * 1000 ) ) ) ; } "<AssertPlaceHolder>" ; long t = java . lang . System . currentTimeMillis ( ) ; com . github . davidmoten . rtree3d . Entry < java . lang . Object , com . github . davidmoten . rtree3d . geometry . Geometry > entry = tree . search ( com . github . davidmoten . rtree3d . RTreeTest . box ( 0 , 0 , 500 , 500 ) ) . first ( ) . toBlocking ( ) . single ( ) ; long diff = ( java . lang . System . currentTimeMillis ( ) ) - t ; System . out . println ( ( "found<sp>" + entry ) ) ; System . out . println ( ( ( ( "time<sp>to<sp>get<sp>nearest<sp>with<sp>" + n ) + "<sp>entries=" ) + diff ) ) ; } entries ( ) { rx . Observable < java . lang . String > source = rx . Observable . using ( new rx . functions . Func0 < java . io . InputStream > ( ) { @ com . github . davidmoten . rtree3d . Override public java . io . InputStream call ( ) { try { return new java . util . zip . GZIPInputStream ( com . github . davidmoten . rtree3d . GreekEarthquakes . class . getResourceAsStream ( "/greek-earthquakes-1964-2000.txt.gz" ) ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } } } , new rx . functions . Func1 < java . io . InputStream , rx . Observable < java . lang . String > > ( ) { @ com . github . davidmoten . rtree3d . Override public rx . Observable < java . lang . String > call ( java . io . InputStream is ) { return rx . observables . StringObservable . from ( new java . io . InputStreamReader ( is ) ) ; } } , new rx . functions . Action1 < java . io . InputStream > ( ) { @ com . github . davidmoten . rtree3d . Override public void call ( java . io . InputStream is ) { try { is . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } } } ) ; return rx . observables . StringObservable . split ( source , "\n" ) . flatMap ( new rx . functions . Func1 < java . lang . String , rx . Observable < com . github . davidmoten . rtree3d . Entry < java . lang . Object , com . github . davidmoten . rtree3d . geometry . Point > > > ( ) { @ com . github . davidmoten . rtree3d . Override public rx . Observable < com . github . davidmoten . rtree3d . Entry < java . lang . Object , com . github . davidmoten . rtree3d . geometry . Point > > call ( java . lang . String line ) { if ( ( line . trim ( ) . length ( ) ) > 0 ) { java . lang . String [ ] items = line . split ( "<sp>" ) ; double lat = java . lang . Double . parseDouble ( items [ 0 ] ) ; double lon = java . lang . Double . parseDouble ( items [ 1 ] ) ; return rx . Observable . just ( com . github . davidmoten . rtree3d . Entry . entry ( new java . lang . Object ( ) , com . github . davidmoten . rtree3d . geometry . Geometries . point ( lat , lon , 0 ) ) ) ; } else return rx . Observable . empty ( ) ; } } ) ; }
org . junit . Assert . assertEquals ( n , ( ( int ) ( tree . entries ( ) . count ( ) . toBlocking ( ) . single ( ) ) ) )
shouldReturnDefaultValueIfPropertyValueIsNull ( ) { java . lang . String propertyValue = null ; java . lang . String defaultValue = "default" ; java . lang . String context = "Global" ; ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty resourceEditProperty = new ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty ( "technicalKey" , "displayName" , propertyValue , "exampleValue" , defaultValue , "propertyComment" , true , true , false , null , true , "validationLogic" , "mik" , null , null , null , "propContName" , "typeContName" , null , null , null , null , null , null , null , null , null , null , null , null , null ) ; dto = new ch . mobi . itc . mobiliar . rest . dtos . PropertyDTO ( resourceEditProperty , context ) ; "<AssertPlaceHolder>" ; } getValue ( ) { if ( ( value ) != null ) { if ( isLabeledDateType ( ) ) { return ch . puzzle . itc . mobiliar . business . deploy . entity . CustomFilter . convertDateToString ( getDateValue ( ) ) ; } return value . toString ( ) ; } else { return null ; } }
org . junit . Assert . assertThat ( dto . getValue ( ) , org . hamcrest . CoreMatchers . is ( defaultValue ) )
testGetValidator ( ) { "<AssertPlaceHolder>" ; } getValidator ( ) { if ( ( com . erudika . para . validation . ValidationUtils . validator ) == null ) { com . erudika . para . validation . ValidationUtils . validator = javax . validation . Validation . buildDefaultValidatorFactory ( ) . getValidator ( ) ; } return com . erudika . para . validation . ValidationUtils . validator ; }
org . junit . Assert . assertNotNull ( getValidator ( ) )
sort_numeric_array_in_java8 ( ) { int [ ] uwConferenceTitles = new int [ ] { 1896 , 2011 , 1901 , 1912 , 1952 , 1959 , 1962 , 1999 , 1897 , 1906 , 1993 , 1998 , 2010 , 2012 } ; int [ ] sortedTitles = java . util . stream . IntStream . of ( uwConferenceTitles ) . sorted ( ) . toArray ( ) ; com . levelup . java . array . SortArray . logger . info ( java . util . Arrays . toString ( uwConferenceTitles ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertArrayEquals ( new int [ ] { 1896 , 1897 , 1901 , 1906 , 1912 , 1952 , 1959 , 1962 , 1993 , 1998 , 1999 , 2010 , 2011 , 2012 } , sortedTitles )
testJsonSerialization ( ) { org . batfish . datamodel . GeneratedRoute gr = org . batfish . datamodel . GeneratedRoute . builder ( ) . setNetwork ( org . batfish . datamodel . Prefix . parse ( "1.1.1.0/24" ) ) . setMetric ( 1L ) . build ( ) ; "<AssertPlaceHolder>" ; } clone ( java . lang . Object , java . lang . Class ) { return org . batfish . common . util . BatfishObjectMapper . MAPPER . readValue ( org . batfish . common . util . BatfishObjectMapper . WRITER . writeValueAsBytes ( o ) , clazz ) ; }
org . junit . Assert . assertThat ( org . batfish . common . util . BatfishObjectMapper . clone ( gr , org . batfish . datamodel . GeneratedRoute . class ) , org . hamcrest . Matchers . equalTo ( gr ) )
testDeprecatedCodeOkInSwitch ( ) { int test = 1 ; switch ( test ) { case org . apache . zookeeper . KeeperException . Code . Ok : "<AssertPlaceHolder>" ; break ; } }
org . junit . Assert . assertTrue ( true )
testUpdateCustomCoordinates ( ) { com . cloudinary . test . Coordinates coordinates = new com . cloudinary . test . Coordinates ( "121,31,110,151" ) ; com . cloudinary . test . Map uploadResult = cloudinary . uploader ( ) . upload ( com . cloudinary . test . SRC_TEST_IMAGE , com . cloudinary . utils . ObjectUtils . asMap ( "tags" , com . cloudinary . test . AbstractApiTest . UPLOAD_TAGS ) ) ; cloudinary . api ( ) . update ( uploadResult . get ( "public_id" ) . toString ( ) , com . cloudinary . utils . ObjectUtils . asMap ( "custom_coordinates" , coordinates ) ) ; com . cloudinary . test . Map result = cloudinary . api ( ) . resource ( uploadResult . get ( "public_id" ) . toString ( ) , com . cloudinary . utils . ObjectUtils . asMap ( "coordinates" , true ) ) ; int [ ] expected = new int [ ] { 121 , 31 , 110 , 151 } ; com . cloudinary . test . ArrayList actual = ( ( com . cloudinary . test . ArrayList ) ( ( ( com . cloudinary . test . ArrayList ) ( ( ( com . cloudinary . test . Map ) ( result . get ( "coordinates" ) ) ) . get ( "custom" ) ) ) . get ( 0 ) ) ) ; for ( int i = 0 ; i < ( expected . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } get ( java . lang . String ) { if ( key == null ) { throw new org . cloudinary . json . JSONException ( "Null<sp>key." ) ; } java . lang . Object object = this . opt ( key ) ; if ( object == null ) { throw new org . cloudinary . json . JSONException ( ( ( "JSONObject[" + ( org . cloudinary . json . JSONObject . quote ( key ) ) ) + "]<sp>not<sp>found." ) ) ; } return object ; }
org . junit . Assert . assertEquals ( expected [ i ] , actual . get ( i ) )
testGetWikiPage ( ) { System . out . println ( "getWikiPage" ) ; kg . apc . jmeter . vizualizers . LatenciesOverTimeGui instance = new kg . apc . jmeter . vizualizers . LatenciesOverTimeGui ( ) ; java . lang . String result = instance . getWikiPage ( ) ; "<AssertPlaceHolder>" ; } getWikiPage ( ) { return "ResponseCodesPerSecond" ; }
org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) )
testReadIndexOutOfBoundsWithParam ( ) { com . twelvemonkeys . imageio . util . ImageReader reader = createReader ( ) ; com . twelvemonkeys . imageio . util . ImageReaderAbstractTest . TestData data = getTestData ( ) . get ( 0 ) ; reader . setInput ( data . getInputStream ( ) ) ; java . awt . image . BufferedImage image = null ; try { image = reader . read ( Short . MAX_VALUE , reader . getDefaultReadParam ( ) ) ; org . junit . Assert . fail ( "Read<sp>image<sp>with<sp>index<sp>out<sp>of<sp>bounds" ) ; } catch ( java . lang . IndexOutOfBoundsException ignore ) { } catch ( java . io . IOException e ) { com . twelvemonkeys . imageio . util . ImageReaderAbstractTest . failBecause ( "Image<sp>could<sp>not<sp>be<sp>read" , e ) ; } "<AssertPlaceHolder>" ; reader . dispose ( ) ; } getDefaultReadParam ( ) { return new com . twelvemonkeys . imageio . plugins . svg . SVGReadParam ( ) ; }
org . junit . Assert . assertNull ( image )
itShouldTestStereoTypeNameOfLingualSchema ( ) { java . lang . String expectedStereotypeName = "test_stereo" ; com . google . gson . JsonObject lingualSchema = getLingualSchema ( hydrograph . server . debug . lingual . LingualSchemaCreatorTest . processingSchema ) ; com . google . gson . JsonArray jsonArray = ( ( com . google . gson . JsonArray ) ( lingualSchema . get ( "stereotypes" ) ) ) ; java . lang . String stereotypeName = null ; for ( java . lang . Object obj : jsonArray ) { com . google . gson . JsonObject jsonObj = ( ( com . google . gson . JsonObject ) ( obj ) ) ; stereotypeName = jsonObj . get ( "name" ) . getAsString ( ) ; } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; hydrograph . server . execution . tracking . server . status . datastructures . ExecutionStatus other = ( ( hydrograph . server . execution . tracking . server . status . datastructures . ExecutionStatus ) ( obj ) ) ; if ( ( componentStatus ) == null ) { if ( ( other . componentStatus ) != null ) return false ; } else if ( ! ( componentStatus . equals ( other . componentStatus ) ) ) return false ; if ( ( jobId ) == null ) { if ( ( other . jobId ) != null ) return false ; } else if ( ! ( jobId . equals ( other . jobId ) ) ) return false ; if ( ( type ) == null ) { if ( ( other . type ) != null ) return false ; } else if ( ! ( type . equals ( other . type ) ) ) return false ; if ( ( clientId ) == null ) { if ( ( other . clientId ) != null ) return false ; } else if ( ! ( clientId . equals ( other . clientId ) ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( expectedStereotypeName . equals ( stereotypeName ) )
composeBitmapOfOnesWithItself ( ) { com . googlecode . javaewah32 . EWAHCompressedBitmap32 bitmap = com . googlecode . javaewah32 . EWAHCompressedBitmap32 . bitmapOf ( ) ; bitmap . setSizeInBits ( com . googlecode . javaewah32 . EWAHCompressedBitmap32 . WORD_IN_BITS , true ) ; com . googlecode . javaewah32 . EWAHCompressedBitmap32 result = bitmap . compose ( bitmap ) ; "<AssertPlaceHolder>" ; } compose ( com . googlecode . javaewah . EWAHCompressedBitmap ) { int size = this . buffer . sizeInWords ( ) ; final com . googlecode . javaewah . EWAHCompressedBitmap container = new com . googlecode . javaewah . EWAHCompressedBitmap ( size ) ; composeToContainer ( a , container ) ; return container ; }
org . junit . Assert . assertEquals ( bitmap , result )
testUnRotatedText ( ) { byte [ ] bytes = com . itextpdf . text . pdf . parser . TextExtractionTest . createPdfWithRotatedText ( TEXT1 , TEXT2 , 0 , true , ( - 20 ) ) ; com . itextpdf . text . pdf . parser . PdfTextExtractor ex = new com . itextpdf . text . pdf . parser . PdfTextExtractor ( new com . itextpdf . text . pdf . PdfReader ( bytes ) ) ; "<AssertPlaceHolder>" ; } getTextFromPage ( int ) { com . lowagie . text . pdf . PdfDictionary pageDic = reader . getPageN ( page ) ; com . lowagie . text . pdf . PdfDictionary resourcesDic = pageDic . getAsDict ( PdfName . RESOURCES ) ; renderListener . reset ( ) ; com . lowagie . text . pdf . parser . PdfContentStreamProcessor processor = new com . lowagie . text . pdf . parser . PdfContentStreamProcessor ( renderListener ) ; processor . processContent ( getContentBytesForPage ( page ) , resourcesDic ) ; return renderListener . getResultantText ( ) ; }
org . junit . Assert . assertEquals ( ( ( ( TEXT1 ) + "\n" ) + ( TEXT2 ) ) , ex . getTextFromPage ( 1 ) )
assertSkipMultipleLineComment ( ) { java . lang . String comment = "/*--xyz<sp>\n<sp>WHERE<sp>XX=1<sp>//xyz*/" ; java . lang . String sql = ( "SELECT<sp>*<sp>FROM<sp>XXX_TABLE<sp>" + comment ) + "WHERE<sp>YY>2" ; org . apache . shardingsphere . core . parse . old . lexer . analyzer . Tokenizer tokenizer = new org . apache . shardingsphere . core . parse . old . lexer . analyzer . Tokenizer ( sql , dictionary , sql . indexOf ( "/" ) ) ; int expected = ( sql . indexOf ( "/" ) ) + ( comment . length ( ) ) ; "<AssertPlaceHolder>" ; } skipComment ( ) { char current = charAt ( offset ) ; char next = charAt ( ( ( offset ) + 1 ) ) ; if ( isSingleLineCommentBegin ( current , next ) ) { return skipSingleLineComment ( org . apache . shardingsphere . core . parse . old . lexer . analyzer . Tokenizer . COMMENT_BEGIN_SYMBOL_LENGTH ) ; } else if ( '#' == current ) { return skipSingleLineComment ( org . apache . shardingsphere . core . parse . old . lexer . analyzer . Tokenizer . MYSQL_SPECIAL_COMMENT_BEGIN_SYMBOL_LENGTH ) ; } else if ( isMultipleLineCommentBegin ( current , next ) ) { return skipMultiLineComment ( ) ; } return offset ; }
org . junit . Assert . assertThat ( tokenizer . skipComment ( ) , org . hamcrest . CoreMatchers . is ( expected ) )
testTimeout_writeBuffer_Success1 ( ) { final byte [ ] exp = new byte [ ] { 'a' , 'b' , 'c' } ; final byte [ ] act = new byte [ exp . length ] ; in . free ( exp . length ) ; os . write ( exp ) ; in . want ( exp . length ) ; in . read ( act ) ; "<AssertPlaceHolder>" ; } read ( byte [ ] ) { return new org . eclipse . jgit . internal . storage . reftable . ReftableReader ( org . eclipse . jgit . internal . storage . io . BlockSource . from ( table ) ) ; }
org . junit . Assert . assertArrayEquals ( exp , act )
testUpdate ( ) { org . sakaiproject . contentreview . dao . ContentReviewItem itemD = new org . sakaiproject . contentreview . dao . ContentReviewItem ( org . sakaiproject . contentreview . dao . ContentReviewDaoImplTest . USER , "site" , "task" , "content-D" , new java . util . Date ( ) , ContentReviewConstants . CONTENT_REVIEW_NOT_SUBMITTED_CODE , org . sakaiproject . contentreview . dao . ContentReviewDaoImplTest . providerId ) ; itemDao . create ( itemD ) ; log . info ( ( "Create<sp>itemD:<sp>" + ( itemD . toString ( ) ) ) ) ; java . util . Optional < org . sakaiproject . contentreview . dao . ContentReviewItem > item = itemDao . get ( itemD . getId ( ) ) ; if ( item . isPresent ( ) ) { item . get ( ) . setStatus ( ContentReviewConstants . CONTENT_REVIEW_SUBMITTED_AWAITING_REPORT_CODE ) ; itemDao . save ( item . get ( ) ) ; java . util . Optional < org . sakaiproject . contentreview . dao . ContentReviewItem > updatedItem = itemDao . get ( itemD . getId ( ) ) ; if ( updatedItem . isPresent ( ) ) { log . info ( ( "Updated<sp>itemD:<sp>" + ( itemD . toString ( ) ) ) ) ; "<AssertPlaceHolder>" ; return ; } } org . junit . Assert . fail ( "Update<sp>of<sp>itemD<sp>failed" ) ; } get ( ) { java . lang . String res ; if ( ( row_ ) == ( - 1 ) ) { if ( ( col_ ) == ( - 1 ) ) { res = java . lang . String . format ( "Error:<sp>%s" , msg_ ) ; } else { res = java . lang . String . format ( "Error:<sp>%s<sp>(col<sp>%d)" , msg_ , col_ ) ; } } else { res = java . lang . String . format ( "Error:<sp>%s<sp>(ln<sp>%d,<sp>col<sp>%d)" , msg_ , row_ , col_ ) ; } return res ; }
org . junit . Assert . assertEquals ( ContentReviewConstants . CONTENT_REVIEW_SUBMITTED_AWAITING_REPORT_CODE , updatedItem . get ( ) . getStatus ( ) )
testTipsAreSummedByHour ( ) { com . dataartisans . flinktraining . exercises . datastream_java . datatypes . TaxiFare oneIn1 = testFare ( 1 , t ( 0 ) , 1.0F ) ; com . dataartisans . flinktraining . exercises . datastream_java . datatypes . TaxiFare fiveIn1 = testFare ( 1 , t ( 15 ) , 5.0F ) ; com . dataartisans . flinktraining . exercises . datastream_java . datatypes . TaxiFare tenIn2 = testFare ( 1 , t ( 90 ) , 10.0F ) ; com . dataartisans . flinktraining . exercises . datastream_java . windows . TestFareSource source = new com . dataartisans . flinktraining . exercises . datastream_java . windows . TestFareSource ( oneIn1 , fiveIn1 , tenIn2 ) ; org . apache . flink . api . java . tuple . Tuple3 < java . lang . Long , java . lang . Long , java . lang . Float > hour1 = new org . apache . flink . api . java . tuple . Tuple3 < java . lang . Long , java . lang . Long , java . lang . Float > ( t ( 60 ) , 1L , 6.0F ) ; org . apache . flink . api . java . tuple . Tuple3 < java . lang . Long , java . lang . Long , java . lang . Float > hour2 = new org . apache . flink . api . java . tuple . Tuple3 < java . lang . Long , java . lang . Long , java . lang . Float > ( t ( 120 ) , 1L , 10.0F ) ; java . util . ArrayList < org . apache . flink . api . java . tuple . Tuple3 < java . lang . Long , java . lang . Long , java . lang . Float > > expected = com . google . common . collect . Lists . newArrayList ( hour1 , hour2 ) ; "<AssertPlaceHolder>" ; } results ( com . dataartisans . flinktraining . exercises . datastream_java . basics . TestRideSource ) { com . dataartisans . flinktraining . exercises . datastream_java . basics . Testable scalaSolution = ( ) -> com . dataartisans . flinktraining . solutions . datastream_scala . basics . RideCleansingSolution . main ( new java . lang . String [ ] { } ) ; return runApp ( source , new com . dataartisans . flinktraining . exercises . datastream_java . basics . TestSink ( ) , com . dataartisans . flinktraining . exercises . datastream_java . basics . RideCleansingScalaTest . scalaExercise , scalaSolution ) ; }
org . junit . Assert . assertEquals ( expected , results ( source ) )
testBinaryFunc1 ( ) { java . lang . String expected = "select<sp>mod(5,<sp>2)<sp>from<sp>`myschema`.`mytable`<sp>as<sp>t" ; org . verdictdb . sqlreader . NonValidatingSQLParser sqlToRelation = new org . verdictdb . sqlreader . NonValidatingSQLParser ( ) ; org . verdictdb . core . sqlobject . AbstractRelation sel = sqlToRelation . toRelation ( expected ) ; org . verdictdb . sqlwriter . SelectQueryToSql relToSql = new org . verdictdb . sqlwriter . SelectQueryToSql ( new org . verdictdb . sqlsyntax . MysqlSyntax ( ) ) ; java . lang . String actual = relToSql . toSql ( sel ) ; "<AssertPlaceHolder>" ; } toSql ( org . verdictdb . core . sqlobject . InsertValuesQuery ) { java . lang . StringBuilder sql = new java . lang . StringBuilder ( ) ; java . lang . String schemaName = query . getSchemaName ( ) ; java . lang . String tableName = query . getTableName ( ) ; java . util . List < java . lang . Object > values = query . getValues ( ) ; sql . append ( "insert<sp>into<sp>" ) ; sql . append ( quoteName ( schemaName ) ) ; sql . append ( "." ) ; sql . append ( quoteName ( tableName ) ) ; sql . append ( "<sp>values<sp>(" ) ; boolean isFirst = true ; for ( java . lang . Object v : values ) { if ( isFirst == false ) { sql . append ( ",<sp>" ) ; } if ( v instanceof org . verdictdb . commons . VerdictTimestamp ) { if ( ( syntax ) instanceof org . verdictdb . sqlsyntax . PrestoSyntax ) { sql . append ( ( ( "timestamp<sp>'" + ( v . toString ( ) ) ) + "'" ) ) ; } else { sql . append ( ( ( "'" + ( v . toString ( ) ) ) + "'" ) ) ; } } else if ( v instanceof java . lang . String ) { sql . append ( ( ( "'" + v ) + "'" ) ) ; } else { sql . append ( v . toString ( ) ) ; } isFirst = false ; } sql . append ( ")" ) ; return sql . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
processService_doNotCreateRevenueShareSummary ( ) { org . oscm . reportingservice . business . PartnerRevenueBuilder builder = spy ( new org . oscm . reportingservice . business . PartnerRevenueBuilder ( java . util . Locale . ENGLISH , null ) ) ; doReturn ( "0" ) . when ( builder ) . readServiceRevenue ( anyString ( ) , anyString ( ) , anyString ( ) ) ; doReturn ( "423" ) . when ( builder ) . getServiceKey ( any ( org . w3c . dom . Node . class ) ) ; java . util . List < org . oscm . reportingservice . business . model . partnerrevenue . RDORevenueDetailService > result = new java . util . LinkedList < org . oscm . reportingservice . business . model . partnerrevenue . RDORevenueDetailService > ( ) ; org . w3c . dom . Node dummyService = null ; builder . processService ( result , 0 , dummyService , "dummy" , "dummy" ) ; "<AssertPlaceHolder>" ; verify ( builder , times ( 0 ) ) . createRevenueDetailService ( anyInt ( ) , anyString ( ) , anyString ( ) , anyString ( ) ) ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
testEmptyFile ( ) { org . apache . hadoop . io . Configuration conf = new org . apache . hadoop . io . Configuration ( ) ; org . apache . hadoop . io . FileSystem fs = org . apache . hadoop . io . FileSystem . getLocal ( conf ) ; org . apache . hadoop . io . TestArrayFile . writeTest ( fs , new org . apache . hadoop . io . RandomDatum [ 0 ] , org . apache . hadoop . io . TestArrayFile . TEST_FILE ) ; org . apache . hadoop . io . ArrayFile . Reader reader = new org . apache . hadoop . io . ArrayFile . Reader ( fs , org . apache . hadoop . io . TestArrayFile . TEST_FILE , conf ) ; "<AssertPlaceHolder>" ; reader . close ( ) ; } get ( long , java . util . concurrent . TimeUnit ) { checkCancelled ( ) ; if ( ! ( latch . await ( timeout , unit ) ) ) { throw new java . util . concurrent . TimeoutException ( java . lang . String . format ( "Timed<sp>out<sp>waiting<sp>for<sp>HttpResponse<sp>after<sp>%d<sp>%s." , timeout , unit . toString ( ) . toLowerCase ( ) ) ) ; } return this . getOrThrow ( ) ; }
org . junit . Assert . assertNull ( reader . get ( 0 , new org . apache . hadoop . io . RandomDatum ( ) ) )
testForEachOnIterator ( ) { ch . lambdaj . List < ch . lambdaj . Person > personInFamily = asList ( new ch . lambdaj . Person ( "Domenico" ) , new ch . lambdaj . Person ( "Mario" ) , new ch . lambdaj . Person ( "Irma" ) ) ; forEach ( personInFamily . iterator ( ) ) . setLastName ( "Fusco" ) ; for ( ch . lambdaj . Person person : personInFamily ) "<AssertPlaceHolder>" ; } getLastName ( ) { return lastName ; }
org . junit . Assert . assertEquals ( "Fusco" , person . getLastName ( ) )
test_invalidIntegerAndLongCode ( ) { org . terasoluna . gfw . common . codelist . BirthDay b = new org . terasoluna . gfw . common . codelist . BirthDay ( ) ; b . month = 13 ; b . day = 32L ; java . util . Set < javax . validation . ConstraintViolation < org . terasoluna . gfw . common . codelist . BirthDay > > result = validator . validate ( b ) ; "<AssertPlaceHolder>" ; } size ( ) { return java . lang . reflect . Array . getLength ( arrayObject ) ; }
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
test2dDoubleArray ( ) { final double [ ] [ ] input = new double [ ] [ ] { new double [ ] { 2.0 , 1.0 , 2.0 } , new double [ ] { 1.0 , 2.0 , 1.0 } , new double [ ] { 0.0 , 0.0 , 0.0 } } ; final double [ ] [ ] expected = new double [ ] [ ] { new double [ ] { 1.0 , 1.0 / 3.0 , 1.0 } , new double [ ] { 1.0 / 3.0 , 1.0 , 1.0 / 3.0 } , new double [ ] { 1.0 , 1.0 / 3.0 , 1.0 } } ; "<AssertPlaceHolder>" ; } computeCorrelationMatrix ( org . apache . commons . math4 . linear . RealMatrix ) { int nVars = matrix . getColumnDimension ( ) ; org . apache . commons . math4 . linear . RealMatrix outMatrix = new org . apache . commons . math4 . linear . BlockRealMatrix ( nVars , nVars ) ; for ( int i = 0 ; i < nVars ; i ++ ) { for ( int j = 0 ; j < i ; j ++ ) { double corr = correlation ( matrix . getColumn ( i ) , matrix . getColumn ( j ) ) ; outMatrix . setEntry ( i , j , corr ) ; outMatrix . setEntry ( j , i , corr ) ; } outMatrix . setEntry ( i , i , 1.0 ) ; } return outMatrix ; }
org . junit . Assert . assertEquals ( correlation . computeCorrelationMatrix ( input ) , new org . apache . commons . math4 . linear . BlockRealMatrix ( expected ) )
isGeneric ( ) { "<AssertPlaceHolder>" ; } isGeneric ( ) { return true ; }
org . junit . Assert . assertEquals ( isGeneric , method . isGeneric ( ) )
equals_trueForSameInstance ( ) { "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return com . restfb . util . ReflectionUtils . equals ( this , object ) ; }
org . junit . Assert . assertTrue ( object . equals ( object ) )