input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testKeySerialization ( ) { org . apache . hadoop . io . Text tableName = new org . apache . hadoop . io . Text ( "testTable" ) ; org . apache . accumulo . core . data . Key key = new org . apache . accumulo . core . data . Key ( new org . apache . hadoop . io . Text ( "row | org . junit . Assert . assertEquals ( 0 , expected . compareTo ( actual ) ) |
testSizeAt_1 ( ) { lombok . val array = org . nd4j . linalg . factory . Nd4j . create ( 10 , 20 , 30 ) ; lombok . val exp = org . nd4j . linalg . factory . Nd4j . scalar ( DataType . LONG , 20 ) ; lombok . val op = new org . nd4j . autodiff . opvalidation . SizeAt ( array , 1 ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( op ) ; lombok . val output = op . outputArguments ( ) [ 0 ] ; "<AssertPlaceHolder>" ; } outputArguments ( ) { return new org . nd4j . linalg . api . ndarray . INDArray [ 0 ] ; } | org . junit . Assert . assertEquals ( exp , output ) |
enterSafeModeOnPrimaryMasterStart ( ) { mSafeModeManager . notifyPrimaryMasterStarted ( ) ; "<AssertPlaceHolder>" ; } isInSafeMode ( ) { return mSafeModeManager . isInSafeMode ( ) ; } | org . junit . Assert . assertTrue ( mSafeModeManager . isInSafeMode ( ) ) |
testAuthenticationHostConfigWithHttpRemoting ( ) { org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . configureServerSideForInboundHttpRemoting ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . serverSideMCC ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddOutboundSocketBindingOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OUTBOUND_SOCKET_BINDING , org . jboss . as . test . shared . TestSuiteEnvironment . getServerAddressNode1 ( ) , 54321 ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddAuthenticationConfigurationOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . DEFAULT_AUTH_CONFIG , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . HTTP_REMOTING_PROTOCOL , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . PROPERTIES_REALM , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . DEFAULT_USERNAME , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . DEFAULT_PASSWORD , org . jboss . as . test . shared . TestSuiteEnvironment . getServerAddress ( ) , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . HTTP_REMOTING_PORT ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddAuthenticationContextOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . DEFAULT_AUTH_CONTEXT , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . DEFAULT_AUTH_CONFIG ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddConnectionOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . REMOTE_OUTBOUND_CONNECTION , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OUTBOUND_SOCKET_BINDING , "" ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getWriteElytronDefaultAuthenticationContextOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . DEFAULT_AUTH_CONTEXT ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . executeBlockingReloadClientServer ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC ) ; deployer . deploy ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . EJB_SERVER_DEPLOYMENT ) ; deployer . deploy ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . EJB_CLIENT_DEPLOYMENT ) ; "<AssertPlaceHolder>" ; } callIntermediateWhoAmI ( ) { org . wildfly . security . auth . client . AuthenticationConfiguration common = org . wildfly . security . auth . client . AuthenticationConfiguration . empty ( ) . useProviders ( ( ) -> new java . security . Provider [ ] { new org . wildfly . security . WildFlyElytronProvider ( ) } ) . setSaslMechanismSelector ( SaslMechanismSelector . ALL ) ; org . wildfly . security . auth . client . AuthenticationContext authCtxEmpty = org . wildfly . security . auth . client . AuthenticationContext . empty ( ) ; final org . wildfly . security . auth . client . AuthenticationContext authCtx = authCtxEmpty . with ( MatchRule . ALL , common ) ; final org . jboss . ejb . client . EJBClientContext . Builder ejbClientBuilder = new org . jboss . ejb . client | org . junit . Assert . assertEquals ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . DEFAULT_USERNAME , callIntermediateWhoAmI ( ) ) |
testFindOhip ( ) { java . util . List < org . oscarehr . common . model . Provider > providers = dao . getProvidersWithNonEmptyOhip ( ) ; "<AssertPlaceHolder>" ; } getProvidersWithNonEmptyOhip ( ) { return getHibernateTemplate ( ) . find ( "FROM<sp>Provider<sp>WHERE<sp>ohip_no<sp>!=<sp>''<sp>order<sp>by<sp>last_name,<sp>first_name" ) ; } | org . junit . Assert . assertNotNull ( providers ) |
testPartitionPruningWithMetadataCache_1 ( ) { test ( "refresh<sp>table<sp>metadata<sp>dfs.`%s`" , org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_1 ) ; checkForMetadataFile ( org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_1 ) ; java . lang . String query = java . lang . String . format ( ( "select<sp>dir0,<sp>dir1,<sp>o_custkey,<sp>o_orderdate<sp>from<sp>dfs.`%s`<sp>" + "<sp>where<sp>dir0=1994<sp>and<sp>dir1<sp>in<sp>('Q1',<sp>'Q2')" ) , org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_1 ) ; int expectedRowCount = 20 ; int expectedNumFiles = 2 ; int actualRowCount = testSql ( query ) ; "<AssertPlaceHolder>" ; java . lang . String numFilesPattern = "numFiles=" + expectedNumFiles ; java . lang . String usedMetaPattern = "usedMetadataFile=true" ; java . lang . String cacheFileRootPattern = java . lang . String . format ( "cacheFileRoot=%s/%s/1994" , dirTestWatcher . getRootDir ( ) . getCanonicalPath ( ) , org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_1 ) ; org . apache . drill . PlanTestBase . testPlanMatchingPatterns ( query , new java . lang . String [ ] { numFilesPattern , usedMetaPattern , cacheFileRootPattern } , new java . lang . String [ ] { } ) ; } testSql ( java . lang . String ) { return org . apache . drill . test . BaseTestQuery . testRunAndPrint ( QueryType . SQL , query ) ; } | org . junit . Assert . assertEquals ( expectedRowCount , actualRowCount ) |
testApplySuggestedFixes_noFixes ( ) { java . util . Map < java . lang . String , java . lang . String > codeMap = com . google . common . collect . ImmutableMap . of ( "file1" , "abcdef" , "file2" , "abcdef" ) ; java . util . Map < java . lang . String , java . lang . String > expectedNewCodeMap = com . google . common . collect . ImmutableMap . of ( ) ; java . util . List < com . google . javascript . refactoring . SuggestedFix > fixes = com . google . common . collect . ImmutableList . of ( ) ; java . util . Map < java . lang . String , java . lang . String > newCodeMap = com . google . javascript . refactoring . ApplySuggestedFixes . applySuggestedFixesToCode ( fixes , codeMap ) ; "<AssertPlaceHolder>" ; } applySuggestedFixesToCode ( java . lang . Iterable , java . util . Map ) { com . google . javascript . refactoring . ApplySuggestedFixes . ReplacementMap map = new com . google . javascript . refactoring . ApplySuggestedFixes . ReplacementMap ( ) ; for ( com . google . javascript . refactoring . SuggestedFix fix : fixes ) { map . putIfNoOverlap ( fix ) ; } ImmutableMap . Builder < java . lang . String , java . lang . String > newCodeMap = com . google . common . collect . ImmutableMap . builder ( ) ; for ( Map . Entry < java . lang . String , java . util . Set < com . google . javascript . refactoring . CodeReplacement > > entry : map . entrySet ( ) ) { java . lang . String filename = entry . getKey ( ) ; if ( ! ( filenameToCodeMap . containsKey ( filename ) ) ) { throw new java . lang . IllegalArgumentException ( ( "filenameToCodeMap<sp>missing<sp>code<sp>for<sp>file:<sp>" + filename ) ) ; } java . util . Set < com . google . javascript . refactoring . CodeReplacement > replacements = entry . getValue ( ) ; java . lang . String newCode = com . google . javascript . refactoring . ApplySuggestedFixes . applyCodeReplacements ( replacements , filenameToCodeMap . get ( filename ) ) ; newCodeMap . put ( filename , newCode ) ; } return newCodeMap . build ( ) ; } | org . junit . Assert . assertEquals ( expectedNewCodeMap , newCodeMap ) |
testToEbXMLEmpty ( ) { transformer . toEbXML ( new org . openehealth . ipf . commons . ihe . xds . core . requests . query . FindFoldersForMultiplePatientsQuery ( ) , ebXML ) ; "<AssertPlaceHolder>" ; } getSlots ( ) { return getSlotList ( ) . getSlots ( ) ; } | org . junit . Assert . assertEquals ( 0 , ebXML . getSlots ( ) . size ( ) ) |
testWriteText ( ) { java . lang . String input = org . eclipse . rap . rwt . internal . resources . ResourceUtil_Test . createTestString ( 10000 ) ; byte [ ] content = input . getBytes ( "UTF-8" ) ; java . io . File tempFile = java . io . File . createTempFile ( "rap-" , ".test" ) ; tempFile . deleteOnExit ( ) ; org . eclipse . rap . rwt . internal . resources . ResourceUtil . write ( tempFile , content ) ; java . io . FileInputStream inputStream = new java . io . FileInputStream ( tempFile ) ; byte [ ] result = org . eclipse . rap . rwt . internal . resources . ResourceUtil . readBinary ( inputStream ) ; inputStream . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { shell . close ( ) ; } | org . junit . Assert . assertEquals ( input , new java . lang . String ( result , "UTF-8" ) ) |
testServerCallback ( ) { final nl . bzk . brp . bijhouding . ws . util . ServerPasswordCallback serverPasswordCallback = new nl . bzk . brp . bijhouding . ws . util . ServerPasswordCallback ( ) ; final java . lang . String wachtwoord = "pwd" ; serverPasswordCallback . setPassword ( wachtwoord ) ; final org . apache . wss4j . common . ext . WSPasswordCallback callback = new org . apache . wss4j . common . ext . WSPasswordCallback ( "dummy" , 1 ) ; serverPasswordCallback . handle ( new javax . security . auth . callback . Callback [ ] { callback } ) ; "<AssertPlaceHolder>" ; } getPassword ( ) { return msg . logonPassword ; } | org . junit . Assert . assertEquals ( wachtwoord , callback . getPassword ( ) ) |
testSshDriver ( ) { com . m11n . jdbc . ssh . Connection connection = com . m11n . jdbc . ssh . DriverManager . getConnection ( sshUrl ) ; com . m11n . jdbc . ssh . JdbcSshDriverTest . logger . info ( "Info:<sp>{}" , connection . getClientInfo ( ) ) ; com . m11n . jdbc . ssh . DatabaseMetaData metadata = connection . getMetaData ( ) ; java . lang . String [ ] tableType = new java . lang . String [ ] { "TABLE" } ; java . sql . ResultSet tables = metadata . getTables ( null , null , "%" , tableType ) ; "<AssertPlaceHolder>" ; java . lang . String tableName ; while ( tables . next ( ) ) { tableName = tables . getString ( 3 ) ; com . m11n . jdbc . ssh . JdbcSshDriverTest . logger . info ( "Table:<sp>{}" , tableName ) ; } } | org . junit . Assert . assertNotNull ( tables ) |
CalculatePercentDateWhenExpireDateNotEnd ( ) { ru . szhernovoy . Food food = new ru . szhernovoy . Bananas ( "Banana" , new java . util . GregorianCalendar ( 2016 , java . util . GregorianCalendar . AUGUST , 1 ) , new java . util . GregorianCalendar ( 2016 , java . util . GregorianCalendar . AUGUST , 16 ) , 45 , 5 ) ; java . util . GregorianCalendar today = new java . util . GregorianCalendar ( 2016 , java . util . GregorianCalendar . AUGUST , 15 ) ; boolean result = ( food . calculatePercent ( today ) ) < 99 ; boolean control = true ; "<AssertPlaceHolder>" ; } calculatePercent ( java . util . GregorianCalendar ) { int percent = 0 ; java . util . Calendar todayDate = day ; double differentFull = ( ( this . expireDate . getTimeInMillis ( ) ) - ( this . createDate . getTimeInMillis ( ) ) ) / 1000 ; double differentCurrent = ( ( todayDate . getTimeInMillis ( ) ) - ( this . createDate . getTimeInMillis ( ) ) ) / 1000 ; percent = ( ( int ) ( java . lang . Math . abs ( ( ( differentCurrent / differentFull ) * 100 ) ) ) ) ; return percent ; } | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( control ) ) |
testGetChapterFromBookSubObject ( ) { org . apache . cxf . jaxrs . client . WebClient wc = org . apache . cxf . jaxrs . client . WebClient . create ( ( ( "http://localhost:" + ( org . apache . cxf . systest . jaxrs . JAXRSClientServerSubBookTest . PORT ) ) + "/bookstore/booksubresourceobject/chaptersobject/sub/1" ) ) ; org . apache . cxf . jaxrs . client . WebClient . getConfig ( wc ) . getHttpConduit ( ) . getClient ( ) . setReceiveTimeout ( 100000000L ) ; org . apache . cxf . systest . jaxrs . Chapter c = wc . accept ( "application/xml" ) . get ( org . apache . cxf . systest . jaxrs . Chapter . class ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return ( paramMap ) == null ? null : paramMap . get ( key ) ; } | org . junit . Assert . assertNotNull ( c ) |
parserVersion ( ) { java . lang . StringBuilder xmlLibMessage = new java . lang . StringBuilder ( ) ; boolean validParser = org . exist . validation . XmlLibraryChecker . hasValidParser ( xmlLibMessage ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( java . lang . String . valueOf ( _version ) ) + '.' ) + ( _revision ) ) + '.' ) + ( _subrevision ) ) + ( _suffix ) ; } | org . junit . Assert . assertTrue ( xmlLibMessage . toString ( ) , validParser ) |
testGetEventParams ( ) { fr . inria . soctrace . lib . model . Event e1 = IModelFactory . INSTANCE . createEvent ( ) ; fr . inria . soctrace . lib . model . Event e2 = IModelFactory . INSTANCE . createEvent ( ) ; "<AssertPlaceHolder>" ; } getEventParams ( ) { return params ; } | org . junit . Assert . assertEquals ( e1 . getEventParams ( ) , e2 . getEventParams ( ) ) |
testSupplierIdToAdd ( ) { bean . setSupplierIdToAdd ( org . oscm . ui . beans . MarketplaceBeanTest . GLOBAL_MP ) ; "<AssertPlaceHolder>" ; } getSupplierIdToAdd ( ) { return supplierIdToAdd ; } | org . junit . Assert . assertEquals ( org . oscm . ui . beans . MarketplaceBeanTest . GLOBAL_MP , bean . getSupplierIdToAdd ( ) ) |
testReplicaRead ( ) { org . apache . hadoop . hbase . client . AbstractTestAsyncTableRegionReplicasRead . FAIL_PRIMARY_GET = true ; org . apache . hadoop . hbase . client . AbstractTestAsyncTableRegionReplicasRead . REPLICA_ID_TO_COUNT . clear ( ) ; org . apache . hadoop . hbase . client . AsyncTable < ? > table = getTable . get ( ) ; readAndCheck ( table , ( - 1 ) ) ; java . lang . Thread . sleep ( 5000 ) ; int count = org . apache . hadoop . hbase . client . AbstractTestAsyncTableRegionReplicasRead . getPrimaryGetCount ( ) ; java . lang . Thread . sleep ( 10000 ) ; "<AssertPlaceHolder>" ; } getPrimaryGetCount ( ) { java . util . concurrent . atomic . AtomicInteger primaryGetCount = org . apache . hadoop . hbase . client . AbstractTestAsyncTableRegionReplicasRead . REPLICA_ID_TO_COUNT . get ( RegionReplicaUtil . DEFAULT_REPLICA_ID ) ; return primaryGetCount != null ? primaryGetCount . get ( ) : 0 ; } | org . junit . Assert . assertEquals ( count , org . apache . hadoop . hbase . client . AbstractTestAsyncTableRegionReplicasRead . getPrimaryGetCount ( ) ) |
testAddTrustBundle_noEntityManager_assertException ( ) { final org . nhindirect . config . store . dao . impl . TrustBundleDaoImpl dao = new org . nhindirect . config . store . dao . impl . TrustBundleDaoImpl ( ) ; boolean exceptionOccured = false ; try { dao . addTrustBundle ( new org . nhindirect . config . store . TrustBundle ( ) ) ; } catch ( java . lang . IllegalStateException ex ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( exceptionOccured ) |
testStrToDate_17170605 ( ) { java . util . Calendar cal = new java . util . GregorianCalendar ( 1717 , 5 , 25 ) ; java . util . Date expected = cal . getTime ( ) ; java . lang . String fixture = "1717/06/25" ; try { java . util . Date actual = info . michaelkohler . helpertools . date . DateFormatHelper . strToDate ( fixture ) ; "<AssertPlaceHolder>" ; } catch ( java . text . ParseException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } strToDate ( java . lang . String ) { if ( info . michaelkohler . helpertools . date . DateFormatHelper . queryForTodayDate ( dateStr ) ) return info . michaelkohler . helpertools . date . DateHelper . todayDate ( ) ; else if ( info . michaelkohler . helpertools . date . DateFormatHelper . queryForYesterdayDate ( dateStr ) ) return info . michaelkohler . helpertools . date . DateHelper . yesterdayDate ( ) ; else if ( info . michaelkohler . helpertools . date . DateFormatHelper . queryForTomorrowDate ( dateStr ) ) return info . michaelkohler . helpertools . date . DateHelper . tomorrowDate ( ) ; return info . michaelkohler . helpertools . date . DateFormatHelper . dateFormatter . parse ( dateStr ) ; } | org . junit . Assert . assertTrue ( actual . equals ( expected ) ) |
ownerNotChanged_Null ( ) { org . oscm . domobjects . Subscription sub = givenSubscription ( ) ; ownerNotChanged_Null ( sub ) ; java . util . List < org . oscm . auditlog . model . AuditLogEntry > logEntries = org . oscm . auditlog . AuditLogData . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return org . oscm . auditlog . AuditLogData . auditLogData . get ( ) ; } | org . junit . Assert . assertNull ( logEntries ) |
testSerialization ( ) { org . jfree . chart . needle . PointerNeedle n1 = new org . jfree . chart . needle . PointerNeedle ( ) ; org . jfree . chart . needle . PointerNeedle n2 = ( ( org . jfree . chart . needle . PointerNeedle ) ( org . jfree . chart . TestUtilities . serialised ( n1 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( o instanceof com . mysql . fabric . Server ) ) { return false ; } com . mysql . fabric . Server s = ( ( com . mysql . fabric . Server ) ( o ) ) ; return s . getUuid ( ) . equals ( getUuid ( ) ) ; } | org . junit . Assert . assertTrue ( n1 . equals ( n2 ) ) |
testSchemaGetTableForUnknownTableReturnNull ( ) { final de . hpi . isg . mdms . model . location . DefaultLocation loc = new de . hpi . isg . mdms . model . location . DefaultLocation ( ) ; final de . hpi . isg . mdms . model . targets . Schema schema1 = de . hpi . isg . mdms . model . targets . DefaultSchema . buildAndRegister ( mock ( de . hpi . isg . mdms . model . MetadataStore . class ) , "foo" , null , loc ) ; "<AssertPlaceHolder>" ; } getTableByName ( java . lang . String ) { java . util . Collection < de . hpi . isg . mdms . model . targets . Table > tables = this . getTablesByName ( name ) ; if ( tables . isEmpty ( ) ) return null ; if ( ( tables . size ( ) ) == 1 ) return tables . iterator ( ) . next ( ) ; throw new de . hpi . isg . mdms . exceptions . NameAmbigousException ( java . lang . String . format ( "Multiple<sp>tables<sp>are<sp>named<sp>\"%s\"<sp>in<sp>\"%s\"." , name , this . getName ( ) ) ) ; } | org . junit . Assert . assertEquals ( schema1 . getTableByName ( "foo" ) , null ) |
testReplaceLastIndex ( ) { org . antlr . tool . Grammar g = new org . antlr . tool . Grammar ( ( "lexer<sp>grammar<sp>t;\n" + ( ( "A<sp>:<sp>\'a\';\n" + "B<sp>:<sp>\'b\';\n" ) + "C<sp>:<sp>\'c\';\n" ) ) ) ; org . antlr . runtime . CharStream input = new org . antlr . runtime . ANTLRStringStream ( "abc" ) ; org . antlr . tool . Interpreter lexEngine = new org . antlr . tool . Interpreter ( g , input ) ; org . antlr . runtime . TokenRewriteStream tokens = new org . antlr . runtime . TokenRewriteStream ( lexEngine ) ; tokens . fill ( ) ; tokens . replace ( 2 , "x" ) ; java . lang . String result = tokens . toString ( ) ; java . lang . String expecting = "abx" ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( "[" + ( grammar . name ) ) + "." ) + ( name ) ) + ",index=" ) + ( index ) ) + ",line=" ) + ( tree . getToken ( ) . getLine ( ) ) ) + "]" ; } | org . junit . Assert . assertEquals ( expecting , result ) |
testCreateFileType ( ) { when ( fileTypeMockDao . getFileTypeByCode ( org . finra . herd . service . impl . FORMAT_FILE_TYPE_CODE ) ) . thenReturn ( null ) ; when ( alternateKeyHelper . validateStringParameter ( anyString ( ) , anyString ( ) ) ) . thenReturn ( org . finra . herd . service . impl . FORMAT_FILE_TYPE_CODE ) ; when ( fileTypeMockDao . saveAndRefresh ( any ( org . finra . herd . model . jpa . FileTypeEntity . class ) ) ) . thenReturn ( org . finra . herd . service . impl . FileTypeServiceImplTest . FILE_TYPE_ENTITY ) ; org . finra . herd . model . api . xml . FileType fileType = fileTypeMockService . createFileType ( org . finra . herd . service . impl . FileTypeServiceImplTest . FILE_TYPE_CREATE_REQUEST ) ; "<AssertPlaceHolder>" ; verify ( alternateKeyHelper ) . validateStringParameter ( "file<sp>type<sp>code" , org . finra . herd . service . impl . FORMAT_FILE_TYPE_CODE ) ; verify ( fileTypeMockDao ) . getFileTypeByCode ( org . finra . herd . service . impl . FORMAT_FILE_TYPE_CODE ) ; verify ( fileTypeMockDao ) . saveAndRefresh ( any ( org . finra . herd . model . jpa . FileTypeEntity . class ) ) ; verifyNoMoreInteractionsHelper ( ) ; } getFileTypeCode ( ) { return fileTypeCode ; } | org . junit . Assert . assertEquals ( org . finra . herd . service . impl . FORMAT_FILE_TYPE_CODE , fileType . getFileTypeCode ( ) ) |
noCommands ( ) { org . easymock . EasyMock . replay ( backend ) ; for ( int dir : com . willwinder . universalgcodesender . uielements . components . CommandTextAreaTest . directions ) { com . willwinder . universalgcodesender . uielements . components . CommandTextAreaTest . sendArrowEvent ( dir , cta ) ; "<AssertPlaceHolder>" ; } org . easymock . EasyMock . verify ( backend ) ; } sendArrowEvent ( int , com . willwinder . universalgcodesender . uielements . components . CommandTextArea ) { switch ( e ) { case java . awt . event . KeyEvent . VK_UP : case java . awt . event . KeyEvent . VK_DOWN : case java . awt . event . KeyEvent . VK_LEFT : case java . awt . event . KeyEvent . VK_RIGHT : java . awt . event . KeyEvent key = new java . awt . event . KeyEvent ( source , java . awt . event . KeyEvent . KEY_PRESSED , java . lang . System . currentTimeMillis ( ) , 0 , e , 'Z' ) ; source . dispatchKeyEvent ( key ) ; } } | org . junit . Assert . assertEquals ( "" , cta . getText ( ) ) |
noVisibleColumns ( ) { com . vaadin . v7 . ui . Table t = com . vaadin . v7 . tests . server . component . table . TableGeneratorTest . createTableWithDefaultContainer ( 3 , 10 ) ; t . setVisibleColumns ( ) ; "<AssertPlaceHolder>" ; } getVisibleColumns ( ) { if ( ( visibleColumns ) == null ) { return null ; } return visibleColumns . toArray ( ) ; } | org . junit . Assert . assertArrayEquals ( new java . lang . Object [ ] { } , t . getVisibleColumns ( ) ) |
testSubscriptionClassTypeWhenUpdatingBaseModel ( ) { long classTypeId = addClassType ( ) ; long baseModelId = addBaseModelWithClassType ( com . liferay . portlet . subscriptions . test . PARENT_CONTAINER_MODEL_ID_DEFAULT , classTypeId ) ; addSubscriptionClassType ( classTypeId ) ; updateBaseModel ( creatorUser . getUserId ( ) , baseModelId ) ; "<AssertPlaceHolder>" ; } getInboxSize ( ) { return com . liferay . portal . test . mail . MailServiceTestUtil . _smtpServer . getEmailCount ( ) ; } | org . junit . Assert . assertEquals ( 1 , com . liferay . portal . test . mail . MailServiceTestUtil . getInboxSize ( ) ) |
removesNonExistentParameterFromOrderedList ( ) { com . eviware . soapui . config . RestRequestConfig requestConfig = buildRestRequestConfigWithParameters ( "first" , "second" , "third" ) ; com . eviware . soapui . impl . rest . RestMethod method = buildRestMethodWithParameters ( "third" , "first" ) ; com . eviware . soapui . impl . rest . RestRequest restRequest = new com . eviware . soapui . impl . rest . RestRequest ( method , requestConfig , false ) ; java . util . List < java . lang . String > parameterNameList = java . util . Arrays . asList ( restRequest . getPropertyNames ( ) ) ; "<AssertPlaceHolder>" ; } getPropertyNames ( ) { return properties . getKeys ( ) ; } | org . junit . Assert . assertThat ( parameterNameList , org . hamcrest . CoreMatchers . is ( java . util . Arrays . asList ( "first" , "third" ) ) ) |
testStop ( ) { org . easymock . EasyMock . expect ( processManager . getPidFromProcQuery ( ( "State.Name.sw=java,Args.*.eq=-Dcatalina.base=" + ( catalinaBase ) ) ) ) . andReturn ( 123L ) ; processManager . kill ( 123L ) ; org . easymock . EasyMock . expect ( processManager . waitForProcessDeath ( 60 , 123L ) ) . andReturn ( true ) ; replay ( ) ; boolean stopped = tomcatEngineController . stop ( ) ; verify ( ) ; "<AssertPlaceHolder>" ; } verify ( ) { org . easymock . EasyMock . verify ( processManager ) ; org . easymock . classextension . EasyMock . verify ( osInfo ) ; } | org . junit . Assert . assertTrue ( stopped ) |
getNumberOfCategoriesByProcessDefinition ( ) { categories = generateCategory ( 3 , "categoryName" , "test<sp>get<sp>number<sp>of<sp>categories<sp>by<sp>process<sp>definition" ) ; final org . bonitasoft . engine . bpm . process . ProcessDefinition processDefinition = generateProcessDefinition ( 1 , "processName" , "version" ) . get ( 0 ) ; processDefinitions . add ( processDefinition ) ; final long processDefinitionId = processDefinition . getId ( ) ; for ( final org . bonitasoft . engine . bpm . category . Category category : categories ) { getProcessAPI ( ) . addProcessDefinitionToCategory ( category . getId ( ) , processDefinitionId ) ; } final long categoryNumber = getProcessAPI ( ) . getNumberOfCategories ( processDefinitionId ) ; "<AssertPlaceHolder>" ; } getNumberOfCategories ( long ) { try { final org . bonitasoft . engine . service . TenantServiceAccessor tenantAccessor = getTenantAccessor ( ) ; final org . bonitasoft . engine . core . category . CategoryService categoryService = tenantAccessor . getCategoryService ( ) ; final org . bonitasoft . engine . api . impl . transaction . category . GetNumberOfCategoriesOfProcess getNumberOfCategoriesOfProcess = new org . bonitasoft . engine . api . impl . transaction . category . GetNumberOfCategoriesOfProcess ( categoryService , processDefinitionId ) ; getNumberOfCategoriesOfProcess . execute ( ) ; return getNumberOfCategoriesOfProcess . getResult ( ) ; } catch ( final org . bonitasoft . engine . commons . exceptions . SBonitaException sbe ) { throw new org . bonitasoft . engine . exception . RetrieveException ( sbe ) ; } } | org . junit . Assert . assertEquals ( 3 , categoryNumber ) |
testGetRequiredElements ( ) { org . qualipso . factory . jabuti . test . JabutiServiceTest . logger . info ( "testSelectClassesAndGetRequiredElements()" ) ; try { java . lang . String user = "SA" ; org . qualipso . factory . jabuti . client . ws . RequiredElementsDetailsArray details = port . getAllRequiredElements ( user , org . qualipso . factory . jabuti . test . JabutiServiceTest . projectId ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } } getAllRequiredElements ( java . lang . String , java . lang . String ) { init ( ) ; org . qualipso . factory . jabuti . ws . VerifingData verifingdata = new org . qualipso . factory . jabuti . ws . VerifingData ( ) ; if ( verifingdata . existProject ( projectId , props ) ) { if ( verifingdata . isProjectInstrumented ( projectId ) ) { org . qualipso . factory . jabuti . ws . WsProject control = new org . qualipso . factory . jabuti . ws . WsProject ( props ) ; return control . getAllRequiredElements ( projectId ) ; } else throw new org . qualipso . factory . jabuti . OperationSequenceFault ( "The<sp>project's<sp>classes<sp>are<sp>not<sp>instrumented." ) ; } else throw new org . qualipso . factory . jabuti . InvalidProjectIdFault ( "The<sp>project<sp>does<sp>not<sp>exist." ) ; } | org . junit . Assert . assertNotNull ( details ) |
testXPathParsing ( ) { document = before . getDOMOwnerDocument ( ) ; createByXParser ( xpath , value ) ; org . xmlbeam . XBProjector projector = new org . xmlbeam . XBProjector ( org . xmlbeam . XBProjector . Flags . TO_STRING_RENDERS_XML , org . xmlbeam . XBProjector . Flags . ABSENT_IS_EMPTY ) ; org . xmlbeam . util . intern . duplex . TestXPathParsing . Projection result = projector . projectDOMNode ( document , org . xmlbeam . util . intern . duplex . TestXPathParsing . Projection . class ) ; after . getDOMNode ( ) . normalize ( ) ; result . getDOMNode ( ) . normalize ( ) ; org . xmlbeam . util . intern . DOMHelper . trim ( after . getDOMNode ( ) ) ; org . xmlbeam . util . intern . DOMHelper . trim ( result . getDOMNode ( ) ) ; after . getDOMOwnerDocument ( ) . normalizeDocument ( ) ; result . getDOMOwnerDocument ( ) . normalizeDocument ( ) ; org . xmlbeam . util . intern . DOMHelper . nodesAreEqual ( after . getDOMNode ( ) , result . getDOMNode ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( "DuplexExpression<sp>[xpath=" + ( xpath ) ) + "]" ; } | org . junit . Assert . assertEquals ( after . toString ( ) , result . toString ( ) ) |
testGetBestPlacemarkDescriptor_Suitable ( ) { com . bc . ceres . core . DefaultServiceRegistry < org . esa . beam . framework . datamodel . PlacemarkDescriptor > serviceRegistry = new com . bc . ceres . core . DefaultServiceRegistry < org . esa . beam . framework . datamodel . PlacemarkDescriptor > ( org . esa . beam . framework . datamodel . PlacemarkDescriptor . class ) ; org . esa . beam . framework . datamodel . PlacemarkDescriptor first = new org . esa . beam . framework . datamodel . PlacemarkDescriptorRegistryTest . SuitablePlacemarkDescriptor_1 ( ) ; org . esa . beam . framework . datamodel . PlacemarkDescriptor second = new org . esa . beam . framework . datamodel . PlacemarkDescriptorRegistryTest . SuitablePlacemarkDescriptor_2 ( ) ; serviceRegistry . addService ( first ) ; serviceRegistry . addService ( second ) ; org . esa . beam . framework . datamodel . PlacemarkDescriptorRegistry registry = new org . esa . beam . framework . datamodel . PlacemarkDescriptorRegistry ( serviceRegistry ) ; org . esa . beam . framework . datamodel . PlacemarkDescriptor bestPlacemarkDescriptor = registry . getPlacemarkDescriptor ( ( ( org . opengis . feature . simple . SimpleFeatureType ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } getPlacemarkDescriptor ( org . opengis . feature . simple . SimpleFeatureType ) { return org . esa . beam . framework . datamodel . PointDescriptor . getInstance ( ) ; } | org . junit . Assert . assertTrue ( ( ( bestPlacemarkDescriptor == first ) || ( bestPlacemarkDescriptor == second ) ) ) |
testSetAlphaWithInvalidValue ( ) { gc . setAlpha ( 777 ) ; org . eclipse . swt . internal . graphics . GCOperation [ ] gcOperations = org . eclipse . swt . graphics . ControlGC_Test . getGCOperations ( gc ) ; "<AssertPlaceHolder>" ; } getGCOperations ( org . eclipse . swt . graphics . GC ) { return org . eclipse . swt . graphics . ControlGC_Test . getGCAdapter ( gc ) . getGCOperations ( ) ; } | org . junit . Assert . assertEquals ( 0 , gcOperations . length ) |
testTriggerHasUnexistentAttribute ( ) { com . freedomotic . rules . PayloadTest . LOG . info ( ( "Expected<sp>true<sp>if<sp>trigger<sp>has<sp>a<sp>statement<sp>with<sp>an<sp>attribute<sp>which<sp>" + "doesn't<sp>exists<sp>in<sp>the<sp>related<sp>event<sp>payload." ) ) ; com . freedomotic . rules . Payload event = new com . freedomotic . rules . Payload ( ) ; event . addStatement ( Statement . AND , "number" , Statement . EQUALS , "1" ) ; event . addStatement ( Statement . AND , "123" 1 , Statement . EQUALS , "abc" ) ; com . freedomotic . rules . Payload trigger = new com . freedomotic . rules . Payload ( ) ; trigger . addStatement ( Statement . AND , "123" 0 , Statement . REGEX , "*" ) ; trigger . addStatement ( Statement . AND , "unexistentPropertyTwo" , Statement . EQUALS , "1" ) ; trigger . addStatement ( Statement . AND , "event.number" , Statement . EQUALS , "123" ) ; trigger . addStatement ( "SET" , "123" 2 , Statement . EQUALS , "123" ) ; boolean result = trigger . equals ( event ) ; "<AssertPlaceHolder>" ; } equals ( com . darkprograms . speech . util . Complex ) { return ( ( re ) == ( other . re ) ) && ( ( im ) == ( other . im ) ) ; } | org . junit . Assert . assertEquals ( false , result ) |
testScalablePrimitiveButHeightNotZero ( ) { final org . kie . workbench . common . stunner . client . lienzo . shape . view . wires . WiresScalableContainer wsc = tested . addScalable ( whPrimitive ) ; final double newWidth = 6531.102 ; final double newHeight = 0.0 ; final double x = 12 ; final double y = 20.5 ; tested . scaleTo ( x , y , newWidth , newHeight ) ; "<AssertPlaceHolder>" ; verify ( whAttributes , times ( 1 ) ) . setX ( eq ( x ) ) ; verify ( whAttributes , times ( 1 ) ) . setY ( eq ( y ) ) ; verify ( whAttributes , times ( 1 ) ) . setWidth ( eq ( newWidth ) ) ; verify ( whAttributes , never ( ) ) . setHeight ( anyDouble ( ) ) ; } scaleTo ( double , double , double , double ) { if ( scaleRequired ) { if ( null != ( transformableContainer ) ) { transformableContainer . setX ( x ) . setY ( y ) ; if ( null == ( scaleRatio ) ) { final com . ait . lienzo . client . core . types . BoundingBox bb = transformableContainer . getBoundingBox ( ) ; final double sx = width / ( bb . getWidth ( ) ) ; final double sy = height / ( bb . getHeight ( ) ) ; scaleRatio = new com . ait . lienzo . client . core . types . Point2D ( sx , sy ) ; transformableContainer . setScale ( scaleRatio ) ; } } for ( int i = 0 ; i < ( scalableChildren . size ( ) ) ; i ++ ) { final com . ait . lienzo . client . core . shape . IPrimitive < ? > child = scalableChildren . get ( i ) ; scaleChildTo ( child , x , y , width , height ) ; } scaleRequired = false ; } } | org . junit . Assert . assertEquals ( tested , wsc ) |
shouldBeAbleToInjectViewsIntoPojos ( ) { final roboguice . view . ViewInjectionTest . B activity = org . robolectric . Robolectric . buildActivity ( roboguice . view . ViewInjectionTest . B . class ) . create ( ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return null ; } | org . junit . Assert . assertThat ( activity . a . v , org . hamcrest . CoreMatchers . equalTo ( activity . ref ) ) |
testBoundFieldVariableFromOR ( ) { final org . drools . workbench . models . datamodel . rule . RuleModel model = new org . drools . workbench . models . datamodel . rule . RuleModel ( ) ; model . lhs = new org . drools . workbench . models . datamodel . rule . IPattern [ 1 ] ; org . drools . workbench . models . datamodel . rule . CompositeFactPattern compositeFactPattern = new org . drools . workbench . models . datamodel . rule . CompositeFactPattern ( org . drools . workbench . models . datamodel . rule . CompositeFactPattern . COMPOSITE_TYPE_OR ) ; model . lhs [ 0 ] = compositeFactPattern ; org . drools . workbench . models . datamodel . rule . FactPattern pattern1 = new org . drools . workbench . models . datamodel . rule . FactPattern ( ) ; org . drools . workbench . models . datamodel . rule . SingleFieldConstraint constraint1 = new org . drools . workbench . models . datamodel . rule . SingleFieldConstraint ( ) ; pattern1 . addConstraint ( constraint1 ) ; constraint1 . setFieldBinding ( "test" ) ; compositeFactPattern . addFactPattern ( pattern1 ) ; org . drools . workbench . models . datamodel . rule . FactPattern pattern2 = new org . drools . workbench . models . datamodel . rule . FactPattern ( ) ; org . drools . workbench . models . datamodel . rule . SingleFieldConstraint constraint2 = new org . drools . workbench . models . datamodel . rule . SingleFieldConstraint ( ) ; pattern2 . addConstraint ( constraint2 ) ; compositeFactPattern . addFactPattern ( pattern2 ) ; org . drools . workbench . models . datamodel . rule . SingleFieldConstraint lhsBoundField = model . getLHSBoundField ( "test" ) ; "<AssertPlaceHolder>" ; } getLHSBoundField ( java . lang . String ) { if ( ( this . lhs ) == null ) { return null ; } for ( int i = 0 ; i < ( this . lhs . length ) ; i ++ ) { org . drools . workbench . models . datamodel . rule . IPattern pat = this . lhs [ i ] ; org . drools . workbench . models . datamodel . rule . SingleFieldConstraint fieldConstraint = getLHSBoundField ( pat , var ) ; if ( fieldConstraint != null ) { return fieldConstraint ; } } return null ; } | org . junit . Assert . assertEquals ( constraint1 , lhsBoundField ) |
testmatchUrlForController_threeslashes ( ) { java . lang . String httpOperation = "POST" ; java . lang . String httpUri = "/uri/param1/param2" ; com . webpagebytes . cms . engine . AdminServletOperationsReader readerMock = org . easymock . EasyMock . createMock ( com . webpagebytes . cms . engine . AdminServletOperationsReader . class ) ; org . easymock . EasyMock . expect ( readerMock . operationToMethod ( httpUri , httpOperation ) ) . andReturn ( null ) ; org . easymock . EasyMock . expect ( readerMock . operationToMethod ( "/uri/param1/{key}" , httpOperation ) ) . andReturn ( null ) ; org . easymock . EasyMock . replay ( readerMock ) ; ajaxProcessor . setOperationsReader ( readerMock ) ; com . webpagebytes . cms . utility . Pair < java . lang . String , java . lang . String > result = ajaxProcessor . matchUrlForController ( httpUri , httpOperation ) ; "<AssertPlaceHolder>" ; } matchUrlForController ( java . lang . String , java . lang . String ) { httpOperation = httpOperation . toUpperCase ( ) ; if ( ( operationsReader . operationToMethod ( reqUri , httpOperation ) ) != null ) { return new com . webpagebytes . cms . utility . Pair ( reqUri , null ) ; } int countSlash = 0 ; for ( int i = 0 ; i < ( reqUri . length ( ) ) ; i ++ ) { if ( ( reqUri . charAt ( i ) ) == '/' ) { countSlash += 1 ; } } if ( countSlash >= 2 ) { int pos1 = reqUri . lastIndexOf ( '/' ) ; java . lang . String urlToMatch = ( reqUri . substring ( 0 , pos1 ) ) + ( this . keyUrlPart ) ; if ( ( operationsReader . operationToMethod ( urlToMatch , httpOperation ) ) != null ) { java . lang . String param = reqUri . substring ( ( pos1 + 1 ) ) ; return new com . webpagebytes . cms . utility . Pair ( urlToMatch , param ) ; } } if ( countSlash == 1 ) { java . lang . String wildUrl = operationsReader . wildOperationToMethod ( reqUri , httpOperation ) ; if ( ( wildUrl != null ) && ( ( wildUrl . length ( ) ) > 0 ) ) { return new com . webpagebytes . cms . utility . Pair ( wildUrl , "" ) ; } } return null ; } | org . junit . Assert . assertTrue ( ( result == null ) ) |
shouldPrintSingleVersion ( ) { com . inventage . tools . versiontiger . internal . manifest . VersionRange versionRange = new com . inventage . tools . versiontiger . internal . manifest . VersionRange ( ) ; com . inventage . tools . versiontiger . OsgiVersion startVersion = mock ( com . inventage . tools . versiontiger . OsgiVersion . class ) ; when ( startVersion . toString ( ) ) . thenReturn ( "1.0.1.qualifier" ) ; versionRange . setStartVersion ( startVersion ) ; java . lang . StringBuilder result = new java . lang . StringBuilder ( ) ; versionRange . print ( result ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "Increment<sp>minor<sp>and<sp>set<sp>to<sp>snapshot" ; } | org . junit . Assert . assertEquals ( "1.0.1.qualifier" , result . toString ( ) ) |
serde ( ) { java . util . Map < java . lang . String , java . lang . String > pairs = new java . util . LinkedHashMap ( ) ; pairs . put ( "a" , "A" ) ; pairs . put ( "b" , "B" ) ; pairs . put ( "c" , "C" ) ; com . asakusafw . workflow . model . CommandTaskInfo . ConfigurationResolver resolver = new com . asakusafw . workflow . model . basic . BasicConfigurationResolver ( "${key}:${value}" ) ; com . asakusafw . workflow . model . CommandTaskInfo . ConfigurationResolver restored = com . asakusafw . workflow . model . InfoSerDe . restore ( com . asakusafw . workflow . model . CommandTaskInfo . ConfigurationResolver . class , resolver ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . String ) { if ( executionId == null ) { throw new java . lang . IllegalArgumentException ( "executionId<sp>must<sp>not<sp>be<sp>null" ) ; } com . asakusafw . runtime . directio . hadoop . DirectIoTransactionEditor . LOG . info ( java . text . MessageFormat . format ( "Start<sp>applying<sp>Direct<sp>I/O<sp>transaction<sp>(executionId={0})" , executionId ) ) ; com . asakusafw . runtime . directio . hadoop . DirectIoTransactionEditor . TxStatus status = doApply ( executionId ) ; switch ( status ) { case APPLIED : com . asakusafw . runtime . directio . hadoop . DirectIoTransactionEditor . LOG . info ( java . text . MessageFormat . format ( "Finish<sp>applying<sp>Direct<sp>I/O<sp>transaction<sp>(executionId={0})" , executionId ) ) ; return true ; case NOT_COMMITTED : com . asakusafw . runtime . directio . hadoop . DirectIoTransactionEditor . LOG . info ( java . text . MessageFormat . format ( "Direct<sp>I/O<sp>transaction<sp>is<sp>not<sp>committed<sp>(executionId={0})" , executionId ) ) ; return false ; case NOT_FOUND : com . asakusafw . runtime . directio . hadoop . DirectIoTransactionEditor . LOG . info ( java . text . MessageFormat . format ( "Direct<sp>I/O<sp>transaction<sp>is<sp>already<sp>completed<sp>or<sp>not<sp>found<sp>(executionId={0})" , executionId ) ) ; return false ; default : throw new java . lang . AssertionError ( status ) ; } } | org . junit . Assert . assertThat ( restored . apply ( pairs ) , is ( resolver . apply ( pairs ) ) ) |
testOneFile ( ) { try ( net . runelite . cache . fs . Store store = new net . runelite . cache . fs . Store ( folder . getRoot ( ) ) ) { net . runelite . cache . fs . Index index = store . addIndex ( 0 ) ; net . runelite . cache . fs . Archive archive = index . addArchive ( 0 ) ; archive . setFileData ( new net . runelite . cache . index . FileData [ 1 ] ) ; net . runelite . cache . index . FileData fileData = archive . getFileData ( ) [ 0 ] = new net . runelite . cache . index . FileData ( ) ; fileData . setId ( 42 ) ; fileData . setNameHash ( 7 ) ; store . save ( ) ; try ( net . runelite . cache . fs . Store store2 = new net . runelite . cache . fs . Store ( folder . getRoot ( ) ) ) { store2 . load ( ) ; "<AssertPlaceHolder>" ; } } } load ( ) { if ( ( updateCheckMode ) == ( net . runelite . client . rs . ClientUpdateCheckMode . NONE ) ) { return null ; } try { net . runelite . client . rs . RSConfig config = clientConfigLoader . fetch ( ) ; java . util . Map < java . lang . String , byte [ ] > zipFile = new java . util . HashMap ( ) ; { java . security . cert . Certificate [ ] jagexCertificateChain = net . runelite . client . rs . ClientLoader . getJagexCertificateChain ( ) ; java . lang . String codebase = config . getCodeBase ( ) ; java . lang . String initialJar = config . getInitialJar ( ) ; java . net . URL url = new java . net . URL ( ( codebase + initialJar ) ) ; okhttp3 . Request request = new okhttp3 . Request . Builder ( ) . url ( url ) . build ( ) ; try ( okhttp3 . Response response = RuneLiteAPI . CLIENT . newCall ( request ) . execute ( ) ) { java . util . jar . JarInputStream jis = new java . util . jar . JarInputStream ( response . body ( ) . byteStream ( ) ) ; byte [ ] tmp = new byte [ 4096 ] ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ( 756 * 1024 ) ) ; for ( ; ; ) { java . util . jar . JarEntry metadata = jis . getNextJarEntry ( ) ; if ( metadata == null ) { break ; } buffer . reset ( ) ; for ( ; ; ) { int n = jis . read ( tmp ) ; if ( n <= ( - 1 ) ) { break ; } buffer . write ( tmp , 0 , n ) ; } if ( ! ( java . util . Arrays . equals ( metadata . getCertificates ( ) , jagexCertificateChain ) ) ) { if ( metadata . getName ( ) . startsWith ( "META-INF/" ) ) { continue ; } else { throw new net . runelite . client . rs . VerificationException ( ( ".class" 1 + ( metadata . getName ( ) ) ) ) ; } } zipFile . put ( metadata . getName ( ) , buffer . toByteArray ( ) ) ; } } } if ( ( updateCheckMode ) == ( net . runelite . client . rs . ClientUpdateCheckMode . AUTO ) ) { java . util . Map < java . lang . String , java . lang . String > hashes ; try ( java . io . InputStream is = net . runelite . client . rs . ClientLoader . class . getResourceAsStream ( "/patch/hashes.json" ) ) { hashes = new com . google . gson . Gson ( ) . fromJson ( new java . io . InputStreamReader ( is ) , new com . google . common . reflect . TypeToken < java . util . HashMap < java . lang . String , java . lang . String > > ( ) { } . getType ( ) ) ; } for ( Map . Entry < java . lang . String , java . lang . String > file : hashes . entrySet ( ) ) { byte [ ] bytes = zipFile . get ( file . getKey ( ) ) ; java . lang . String ourHash = null ; if ( bytes != null ) { ourHash = com . google . common . hash . Hashing . sha512 ( ) . hashBytes ( bytes ) . toString ( ) ; } if ( ! ( file . getValue ( ) . equals ( ourHash ) ) ) { log . debug ( "{}<sp>had<sp>a<sp>hash<sp>mismatch;<sp>falling<sp>back<sp>to<sp>vanilla.<sp>{}<sp>!=<sp>{}" , file . getKey ( ) , file . getValue ( ) , ourHash ) ; log . info ( ".class" 2 ) ; updateCheckMode = net . runelite . client . rs . ClientUpdateCheckMode . VANILLA ; break ; } } } if ( ( updateCheckMode ) == ( net . runelite . client . rs . ClientUpdateCheckMode . AUTO ) ) { java . io . ByteArrayOutputStream patchOs = new java . io . ByteArrayOutputStream ( ( 756 * 1024 ) ) ; int patchCount = 0 ; for ( Map . Entry < java . lang . String , byte [ ] > file : zipFile . entrySet ( ) ) { byte [ ] bytes ; try ( java . io . InputStream is = net . runelite . client . rs . ClientLoader . class . getResourceAsStream ( ( ( "/patch/" + ( file . getKey | org . junit . Assert . assertEquals ( store , store2 ) |
deveObterSituacaoCadastralComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroDados retornoConsultaCadastroDados = new com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroDados ( ) ; final java . util . ArrayList < com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral > listaSituacaoCadastral = new java . util . ArrayList ( ) ; retornoConsultaCadastroDados . setSituacaoCadastral ( listaSituacaoCadastral ) ; "<AssertPlaceHolder>" ; } getSituacaoCadastral ( ) { return this . situacaoCadastral ; } | org . junit . Assert . assertEquals ( listaSituacaoCadastral , retornoConsultaCadastroDados . getSituacaoCadastral ( ) ) |
whenLongPolling_ShouldObserveItemsFromValueColorConditions ( ) { new java . lang . Thread ( ( ) -> { try { java . lang . Thread . sleep ( org . eclipse . smarthome . io . rest . sitemap . internal . SitemapResourceTest . STATE_UPDATE_WAIT_TIME ) ; valueColorItem . setState ( new org . eclipse . smarthome . core . library . types . DecimalType ( BigDecimal . ONE ) ) ; } catch ( e ) { } } ) . start ( ) ; when ( headers . getRequestHeader ( org . eclipse . smarthome . io . rest . sitemap . internal . SitemapResourceTest . HTTP_HEADER_X_ATMOSPHERE_TRANSPORT ) ) . thenReturn ( java . util . Collections . emptyList ( ) ) ; javax . ws . rs . core . Response response = sitemapResource . getPageData ( headers , null , org . eclipse . smarthome . io . rest . sitemap . internal . SitemapResourceTest . SITEMAP_MODEL_NAME , org . eclipse . smarthome . io . rest . sitemap . internal . SitemapResourceTest . SITEMAP_NAME , null ) ; org . eclipse . smarthome . io . rest . sitemap . internal . PageDTO pageDTO = ( ( org . eclipse . smarthome . io . rest . sitemap . internal . PageDTO ) ( response . getEntity ( ) ) ) ; "<AssertPlaceHolder>" ; } getPageData ( javax . ws . rs . core . HttpHeaders , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { final java . util . Locale locale = localeService . getLocale ( language ) ; logger . debug ( "Received<sp>HTTP<sp>GET<sp>request<sp>from<sp>IP<sp>{}<sp>at<sp>'{}'" , request . getRemoteAddr ( ) , uriInfo . getPath ( ) ) ; if ( subscriptionId != null ) { try { subscriptions . setPageId ( subscriptionId , sitemapname , pageId ) ; } catch ( java . lang . IllegalArgumentException e ) { return org . eclipse . smarthome . io . rest . JSONResponse . createErrorResponse ( Response . Status . BAD_REQUEST , e . getMessage ( ) ) ; } } boolean timeout = false ; if ( ( headers . getRequestHeader ( "X-Atmosphere-Transport" ) ) != null ) { timeout = blockUnlessChangeOccurs ( sitemapname , pageId ) ; } org . eclipse . smarthome . io . rest . sitemap . internal . PageDTO responseObject = getPageBean ( sitemapname , pageId , uriInfo . getBaseUriBuilder ( ) . build ( ) , locale , timeout ) ; return javax . ws . rs . core . Response . ok ( responseObject ) . build ( ) ; } | org . junit . Assert . assertThat ( pageDTO . timeout , org . hamcrest . CoreMatchers . is ( false ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . journal . model . JournalArticleLocalization . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "articleLocalizationId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "articleLocalizationId" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; } | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testGetSimpleClassName_withoutPackage ( ) { java . lang . String className = org . eclipse . rap . rwt . internal . lifecycle . LifeCycleAdapterUtil . getSimpleClassName ( "Button" ) ; "<AssertPlaceHolder>" ; } getSimpleClassName ( java . lang . String ) { int index = className . lastIndexOf ( '.' ) ; return index == ( - 1 ) ? className : className . substring ( ( index + 1 ) ) ; } | org . junit . Assert . assertEquals ( "Button" , className ) |
testCluster_3args ( ) { System . out . println ( "cluster" ) ; jsat . clustering . kmeans . ElkanKernelKMeans kmeans = new jsat . clustering . kmeans . ElkanKernelKMeans ( new jsat . distributions . kernels . RBFKernel ( 0.1 ) ) ; jsat . classifiers . ClassificationDataSet toCluster = jsat . FixedProblems . getCircles ( 1000 , jsat . utils . random . RandomUtil . getRandom ( ) , 0.001 , 1.0 ) ; int [ ] result = kmeans . cluster ( toCluster , 2 , ( ( int [ ] ) ( null ) ) ) ; java . util . Map < java . lang . Integer , java . util . Set < java . lang . Integer > > tmp = new java . util . HashMap ( ) ; for ( int c = 0 ; c < ( toCluster . getClassSize ( ) ) ; c ++ ) tmp . put ( c , new jsat . utils . IntSet ( ) ) ; for ( int i = 0 ; i < ( result . length ) ; i ++ ) tmp . get ( toCluster . getDataPointCategory ( i ) ) . add ( result [ i ] ) ; for ( java . util . Set < java . lang . Integer > set : tmp . values ( ) ) "<AssertPlaceHolder>" ; } size ( ) { return datapoints . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , set . size ( ) ) |
testTwoHeaders ( ) { final org . jboss . dmr . ModelNode headers = converter . fromString ( ctx , "{rollback-on-runtime-failure=false;allow-resource-service-restart=true}" ) ; final org . jboss . dmr . ModelNode expected = new org . jboss . dmr . ModelNode ( ) ; expected . get ( "rollback-on-runtime-failure" ) . set ( "false" ) ; expected . get ( "allow-resource-service-restart" ) . set ( "true" ) ; "<AssertPlaceHolder>" ; } set ( org . wildfly . core . launcher . Arguments$Argument ) { if ( argument != null ) { map . put ( argument . getKey ( ) , java . util . Collections . singleton ( argument ) ) ; } } | org . junit . Assert . assertEquals ( expected , headers ) |
testSerialization ( ) { org . jfree . chart . entity . LegendItemEntity e1 = new org . jfree . chart . entity . LegendItemEntity ( new java . awt . geom . Rectangle2D . Double ( 1.0 , 2.0 , 3.0 , 4.0 ) ) ; org . jfree . chart . entity . LegendItemEntity e2 = ( ( org . jfree . chart . entity . LegendItemEntity ) ( org . jfree . chart . TestUtilities . serialised ( e1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; } | org . junit . Assert . assertEquals ( e1 , e2 ) |
projectPropertiesHavePrecedenceOverSettingsPropertiesFile ( ) { writePropertyFile ( settingsDir , org . gradle . util . GUtil . map ( "prop" , "settings<sp>value" ) ) ; java . util . Map < java . lang . String , java . lang . String > projectProperties = org . gradle . util . GUtil . map ( "prop" , "project<sp>value" ) ; gradlePropertiesLoader . loadProperties ( settingsDir , startParameter , systemProperties , envProperties ) ; java . util . Map < java . lang . String , java . lang . String > properties = gradlePropertiesLoader . mergeProperties ( projectProperties ) ; "<AssertPlaceHolder>" ; } get ( org . gradle . api . specs . Spec ) { return get ( elementType , spec ) ; } | org . junit . Assert . assertEquals ( "project<sp>value" , properties . get ( "prop" ) ) |
testProcessActionNoProcessors02 ( ) { compositeRequestDataValueProcessor = new org . terasoluna . gfw . web . mvc . support . CompositeRequestDataValueProcessor ( ) ; java . lang . String result = compositeRequestDataValueProcessor . processAction ( request , "action" , "method" ) ; "<AssertPlaceHolder>" ; } processAction ( javax . servlet . http . HttpServletRequest , java . lang . String , java . lang . String ) { return action ; } | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( "action" ) ) |
readDataNoFile ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( false ) ; com . att . aro . core . peripheral . pojo . AppInfo info = null ; info = reader . readData ( "/" ) ; "<AssertPlaceHolder>" ; } getAppInfos ( ) { return appInfos ; } | org . junit . Assert . assertTrue ( ( ( info . getAppInfos ( ) . size ( ) ) == 0 ) ) |
testNoPath ( ) { java . awt . geom . Path2D path = new com . twelvemonkeys . imageio . path . AdobePathBuilder ( new byte [ 26 ] ) . path ( ) ; "<AssertPlaceHolder>" ; } path ( ) { java . util . List < java . util . List < com . twelvemonkeys . imageio . path . AdobePathSegment > > subPaths = new java . util . ArrayList < java . util . List < com . twelvemonkeys . imageio . path . AdobePathSegment > > ( ) ; java . util . List < com . twelvemonkeys . imageio . path . AdobePathSegment > currentPath = null ; int currentPathLength = 0 ; com . twelvemonkeys . imageio . path . AdobePathSegment segment ; while ( ( segment = nextSegment ( ) ) != null ) { if ( com . twelvemonkeys . imageio . path . AdobePathBuilder . DEBUG ) { System . out . println ( segment ) ; } if ( ( ( segment . selector ) == ( AdobePathSegment . OPEN_SUBPATH_LENGTH_RECORD ) ) || ( ( segment . selector ) == ( AdobePathSegment . CLOSED_SUBPATH_LENGTH_RECORD ) ) ) { if ( currentPath != null ) { if ( currentPathLength != ( currentPath . size ( ) ) ) { throw new javax . imageio . IIOException ( java . lang . String . format ( "Bad<sp>path,<sp>expected<sp>%d<sp>segments,<sp>found<sp>only<sp>%d" , currentPathLength , currentPath . size ( ) ) ) ; } subPaths . add ( currentPath ) ; } currentPath = new java . util . ArrayList < com . twelvemonkeys . imageio . path . AdobePathSegment > ( segment . length ) ; currentPathLength = segment . length ; } else if ( ( ( ( ( segment . selector ) == ( AdobePathSegment . OPEN_SUBPATH_BEZIER_LINKED ) ) || ( ( segment . selector ) == ( AdobePathSegment . OPEN_SUBPATH_BEZIER_UNLINKED ) ) ) || ( ( segment . selector ) == ( AdobePathSegment . CLOSED_SUBPATH_BEZIER_LINKED ) ) ) || ( ( segment . selector ) == ( AdobePathSegment . CLOSED_SUBPATH_BEZIER_UNLINKED ) ) ) { if ( currentPath == null ) { throw new javax . imageio . IIOException ( "Bad<sp>path,<sp>missing<sp>subpath<sp>length<sp>record" ) ; } if ( ( currentPath . size ( ) ) >= currentPathLength ) { throw new javax . imageio . IIOException ( java . lang . String . format ( "Bad<sp>path,<sp>expected<sp>%d<sp>segments,<sp>found%d" , currentPathLength , currentPath . size ( ) ) ) ; } currentPath . add ( segment ) ; } } if ( currentPath != null ) { if ( currentPathLength != ( currentPath . size ( ) ) ) { throw new javax . imageio . IIOException ( java . lang . String . format ( "Bad<sp>path,<sp>expected<sp>%d<sp>segments,<sp>found<sp>only<sp>%d" , currentPathLength , currentPath . size ( ) ) ) ; } subPaths . add ( currentPath ) ; } return pathToShape ( subPaths ) ; } | org . junit . Assert . assertNotNull ( path ) |
testCleanText2 ( ) { java . lang . String badText = "Do<sp>you<sp>really<sp>think<sp>we<sp>have<sp>a<sp>different<sp>kind<sp>of<sp>muslim<sp>in<sp>American<sp>.\n" + ( ( ( ( ( ( ( "Do<sp>you<sp>think<sp>they<sp>follow<sp>the<sp>Quran<sp>and<sp>hadith<sp>?\n" + "Infidelity<sp>seems<sp>rampant<sp>in<sp>our<sp>culture<sp>and<sp>during<sp>these<sp>times.<sp>Just<sp>recently,<sp>" ) + "Arnold<sp>Schwarzenegger<sp>is<sp>alleged<sp>to<sp>have<sp>had<sp>a<sp>love<sp>child<sp>with<sp>his<sp>housekeeper.<sp>" ) + "So<sp>whats<sp>the<sp>solution<sp>to<sp>this<sp>problem?<sp>Shamci<sp>Rafani<sp>of<sp>Visalia,<sp>CA<sp>has<sp>a<sp>" ) + "proposal:<sp>stone<sp>the<sp>sluts<sp>responsible.<sp>In<sp>a<sp>letter<sp>to<sp>the<sp>editor<sp>that<sp>appeared<sp>" ) + "in<sp>yesterdays<sp>Visalia<sp>Times-Delta,<sp>Rafani<sp><sp>herself<sp>the<sp>victim<sp>of<sp>infidelity<sp><sp>" ) + "angrily<sp>calls<sp>for<sp>the<sp>death<sp>of<sp>woman<sp>who<sp>knowingly<sp>engage<sp>in<sp>an<sp>affair.<sp>And<sp>she<sp>" ) + "didnt<sp>hold<sp>back." ) ; java . lang . String cleanText = textCleaner . cleanText ( badText ) ; boolean isGood = cleanText . contains ( "didnt" ) ; "<AssertPlaceHolder>" ; } contains ( T extends java . io . Serializable ) { return this . counts . containsKey ( item ) ; } | org . junit . Assert . assertEquals ( true , isGood ) |
TestSessionData ( ) { org . bukkit . conversations . Conversable conversable = new org . bukkit . conversations . FakeConversable ( ) ; java . util . Map session = new java . util . HashMap ( ) ; session . put ( "key" , "value" ) ; org . bukkit . conversations . ConversationContext context = new org . bukkit . conversations . ConversationContext ( null , conversable , session ) ; "<AssertPlaceHolder>" ; } getSessionData ( java . lang . Object ) { return sessionData . get ( key ) ; } | org . junit . Assert . assertEquals ( "value" , context . getSessionData ( "key" ) ) |
testReplace ( ) { java . lang . String input = "<?xml<sp>version=\'1.0\'<sp>encoding=\'utf-8\'?>\n" + ( ( ( ( ( ( "<project>\n\r\n\r\n\r\n\r" + "<sp><parent>\r\n" ) + "<sp></parent>\r" 0 ) + "<sp><artifactId>mojo-&sandbox-parent</artifactId>\n" ) + "<sp><version>5-SNAPSHOT</version>\r" ) + "<sp></parent>\r" ) + "<build/></project>" ) ; java . lang . String expected = "<?xml<sp>version=\'1.0\'<sp>encoding=\'utf-8\'?>\n" + ( ( ( ( ( ( "<project>\n\r\n\r\n\r\n\r" + "<sp><parent>\r\n" ) + "<sp></parent>\r" 0 ) + "<sp><artifactId>my-artifact</artifactId>\n" ) + "<sp><version>5-SNAPSHOT</version>\r" ) + "<sp></parent>\r" ) + "<build/></project>" ) ; java . lang . StringBuilder output = new java . lang . StringBuilder ( input ) ; javax . xml . stream . XMLInputFactory inputFactory = org . codehaus . stax2 . XMLInputFactory2 . newInstance ( ) ; inputFactory . setProperty ( XMLInputFactory2 . P_PRESERVE_LOCATION , Boolean . TRUE ) ; org . codehaus . mojo . versions . rewriting . ModifiedPomXMLEventReader eventReader = new org . codehaus . mojo . versions . rewriting . ModifiedPomXMLEventReader ( output , inputFactory ) ; while ( eventReader . hasNext ( ) ) { javax . xml . stream . events . XMLEvent event = eventReader . nextEvent ( ) ; if ( ( event instanceof javax . xml . stream . events . StartElement ) && ( event . asStartElement ( ) . getName ( ) . getLocalPart ( ) . equals ( "artifactId" ) ) ) { eventReader . mark ( 0 ) ; } if ( ( event instanceof javax . xml . stream . events . EndElement ) && ( event . asEndElement ( ) . getName ( ) . getLocalPart ( ) . equals ( "artifactId" ) ) ) { eventReader . mark ( 1 ) ; if ( eventReader . hasMark ( 0 ) ) { eventReader . replaceBetween ( 0 , 1 , "my-artifact" ) ; } } } "<AssertPlaceHolder>" ; } toString ( ) { final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "ArtifactVersions" ) ; sb . append ( "{artifact=" ) . append ( artifact ) ; sb . append ( ",<sp>versions=" ) . append ( versions ) ; sb . append ( ",<sp>versionComparator=" ) . append ( versionComparator ) ; sb . append ( '}' ) ; return sb . toString ( ) ; } | org . junit . Assert . assertEquals ( expected , output . toString ( ) ) |
equalsContent_shouldIndicateUnequalWhenOnlyAddressOneDiffers ( ) { org . openmrs . PersonAddress rileyStreetAddress = new org . openmrs . PersonAddress ( ) ; org . openmrs . PersonAddress crownStreetAddress = new org . openmrs . PersonAddress ( ) ; crownStreetAddress . setAddress1 ( "crown<sp>street" ) ; rileyStreetAddress . setAddress1 ( "riley<sp>street" ) ; "<AssertPlaceHolder>" ; } equalsContent ( org . openmrs . PersonAttribute ) { boolean returnValue = true ; java . lang . String [ ] methods = new java . lang . String [ ] { "getAttributeType" , "getValue" , "getVoided" } ; java . lang . Class attributeClass = this . getClass ( ) ; for ( java . lang . String methodAttribute : methods ) { try { java . lang . reflect . Method method = attributeClass . getMethod ( methodAttribute ) ; java . lang . Object thisValue = method . invoke ( this ) ; java . lang . Object otherValue = method . invoke ( otherAttribute ) ; if ( otherValue != null ) { returnValue &= otherValue . equals ( thisValue ) ; } } catch ( java . lang . NoSuchMethodException e ) { org . openmrs . PersonAttribute . log . warn ( ( "No<sp>such<sp>method<sp>for<sp>comparison<sp>" + methodAttribute ) , e ) ; } catch ( java . lang . IllegalAccessException | java . lang . reflect . InvocationTargetException e ) { org . openmrs . PersonAttribute . log . error ( "Error<sp>while<sp>comparing<sp>attributes" , e ) ; } } return returnValue ; } | org . junit . Assert . assertThat ( crownStreetAddress . equalsContent ( rileyStreetAddress ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testQueryForObjectAllShardsNullablePartial ( ) { try { com . ctrip . platform . dal . dao . shard . DalHints hints = new com . ctrip . platform . dal . dao . shard . DalHints ( ) ; com . ctrip . platform . dal . dao . shard . StatementParameters parameters = new com . ctrip . platform . dal . dao . shard . StatementParameters ( ) ; com . ctrip . platform . dal . dao . shard . DalQueryDaoTest . ClientTestModel result = dao . queryForObjectNullable ( sqlNoResult , parameters ( ) , hints . inAllShards ( ) . partialQuery ( "quantity" , "address" ) , new com . ctrip . platform . dal . dao . shard . DalQueryDaoTest . ClientTestDalRowMapper ( ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( ) ; } } inAllShards ( ) { set ( DalHintEnum . allShards ) ; set ( DalHintEnum . implicitAllTableShards ) ; return this ; } | org . junit . Assert . assertNull ( result ) |
testLittleEndianHeaderization ( ) { java . lang . String pcapSampleFiles = "../metron-integration-test/src/main/sample/data/SampleInput/PCAPExampleOutput" ; java . util . List < byte [ ] > pcaps = org . apache . metron . pcap . PcapHelperTest . readSamplePackets ( pcapSampleFiles ) ; for ( byte [ ] pcap : pcaps ) { long ts = org . apache . metron . pcap . PcapHelper . getTimestamp ( pcap ) ; byte [ ] stripped = org . apache . metron . pcap . PcapHelperTest . stripHeaders ( pcap ) ; byte [ ] reconstitutedPacket = org . apache . metron . pcap . PcapHelper . addGlobalHeader ( org . apache . metron . pcap . PcapHelper . addPacketHeader ( ts , stripped , org . apache . metron . spout . pcap . Endianness . getNativeEndianness ( ) ) , org . apache . metron . spout . pcap . Endianness . getNativeEndianness ( ) ) ; if ( ! ( java . util . Arrays . equals ( reconstitutedPacket , pcap ) ) ) { int eSecs = org . apache . hadoop . hbase . util . Bytes . toInt ( pcap , 25 ) ; int rSec = org . apache . hadoop . hbase . util . Bytes . toInt ( reconstitutedPacket , 25 ) ; System . out . println ( ( ( eSecs + "<sp>vs<sp>" ) + rSec ) ) ; for ( int i = 0 ; i < ( reconstitutedPacket . length ) ; ++ i ) { System . out . println ( ( ( ( ( ( i + 1 ) + ".<sp>" ) + ( java . lang . String . format ( "%02X" , pcap [ i ] ) ) ) + "<sp>=<sp>" ) + ( java . lang . String . format ( "%02X" , reconstitutedPacket [ i ] ) ) ) ) ; } "<AssertPlaceHolder>" ; } } } println ( java . lang . String ) { System . out . println ( val ) ; } | org . junit . Assert . assertArrayEquals ( reconstitutedPacket , pcap ) |
testGetIntegerV8Object ( ) { v8 . executeVoidScript ( "foo<sp>=<sp>{bar:<sp>7}" ) ; com . eclipsesource . v8 . V8Object foo = v8 . getObject ( "foo" ) ; "<AssertPlaceHolder>" ; foo . close ( ) ; } getInteger ( java . lang . String ) { throw new java . lang . UnsupportedOperationException ( ) ; } | org . junit . Assert . assertEquals ( 7 , foo . getInteger ( "bar" ) ) |
testHashCodeNull ( ) { entityVersion = new com . redhat . lightblue . EntityVersion ( ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { int hash = 5 ; hash = ( 59 * hash ) + ( java . util . Objects . hashCode ( this . value ) ) ; return hash ; } | org . junit . Assert . assertEquals ( entityVersion . hashCode ( ) , 1 ) |
testModifyTicketRemoveUserEmptyUser ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyRemoveAccess ( ticketId , TicketModifyAddOrRemoveTypeEnum . TICKET_MODIFY_USER , "" ) ; "<AssertPlaceHolder>" ; } instanceForModifyRemoveAccess ( java . lang . String , org . irods . jargon . ticket . packinstr . TicketModifyAddOrRemoveTypeEnum , java . lang . String ) { if ( ( ticketId == null ) || ( ticketId . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>ticket<sp>id" ) ; } if ( addTypeEnum == null ) { throw new java . lang . IllegalArgumentException ( "null<sp>modify<sp>remove<sp>permission<sp>type<sp>not<sp>set" ) ; } if ( ( modObject == null ) || ( modObject . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>modify<sp>remove<sp>-<sp>user,<sp>group,<sp>or<sp>host" ) ; } return new org . irods . jargon . ticket . packinstr . TicketAdminInp ( TICKET_ADMIN_INP_API_NBR , "mod" , ticketId , "remove" , addTypeEnum . getTextValue ( ) , modObject , BLANK ) ; } | org . junit . Assert . assertNotNull ( pi ) |
test_minusDays_noChange ( ) { java . time . LocalDateTime t = TEST_2007_07_15_12_30_40_987654321 . minusDays ( 0 ) ; "<AssertPlaceHolder>" ; } minusDays ( long ) { return daysToSubtract == ( Long . MIN_VALUE ) ? plusDays ( Long . MAX_VALUE ) . plusDays ( 1 ) : plusDays ( ( - daysToSubtract ) ) ; } | org . junit . Assert . assertSame ( t , TEST_2007_07_15_12_30_40_987654321 ) |
returnTheSameKeyStoreAfterMultipleLoads ( ) { final org . apache . logging . log4j . core . net . ssl . KeyStoreConfiguration ksc = new org . apache . logging . log4j . core . net . ssl . KeyStoreConfiguration ( TestConstants . KEYSTORE_FILE , new org . apache . logging . log4j . core . net . ssl . MemoryPasswordProvider ( org . apache . logging . log4j . core . net . ssl . TestConstants . KEYSTORE_PWD ( ) ) , TestConstants . KEYSTORE_TYPE , null ) ; final java . security . KeyStore ks = ksc . getKeyStore ( ) ; final java . security . KeyStore ks2 = ksc . getKeyStore ( ) ; "<AssertPlaceHolder>" ; } getKeyStore ( ) { return this . keyStore ; } | org . junit . Assert . assertTrue ( ( ks == ks2 ) ) |
testCreateShaCertificateAsync ( ) { when ( androidAppService . createShaCertificateAsync ( com . google . firebase . projectmanagement . AndroidAppTest . APP_ID , com . google . firebase . projectmanagement . ShaCertificate . create ( com . google . firebase . projectmanagement . AndroidAppTest . SHA_HASH ) ) ) . thenReturn ( createApiFuture ( com . google . firebase . projectmanagement . AndroidAppTest . SHA_CERTIFICATE ) ) ; com . google . firebase . projectmanagement . ShaCertificate certificate = androidApp . createShaCertificateAsync ( com . google . firebase . projectmanagement . ShaCertificate . create ( com . google . firebase . projectmanagement . AndroidAppTest . SHA_HASH ) ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( semaphore . tryAcquire ( TestUtils . TEST_TIMEOUT_MILLIS , TimeUnit . MILLISECONDS ) ) { return result . get ( ) ; } org . junit . Assert . fail ( "Timed<sp>out<sp>while<sp>waiting<sp>for<sp>GetTokenCompletionListener" ) ; return null ; } | org . junit . Assert . assertEquals ( certificate , com . google . firebase . projectmanagement . AndroidAppTest . SHA_CERTIFICATE ) |
whenTimedOut ( ) { org . multiverse . commitbarriers . VetoCommitBarrier barrier = new org . multiverse . commitbarriers . VetoCommitBarrier ( ) ; barrier . setTimeout ( 500 , TimeUnit . MILLISECONDS ) ; org . multiverse . TestUtils . sleepMs ( 1000 ) ; "<AssertPlaceHolder>" ; } isAborted ( ) { return ( status ) == ( org . multiverse . commitbarriers . CommitBarrier . Status . Aborted ) ; } | org . junit . Assert . assertTrue ( barrier . isAborted ( ) ) |
hashIndexTable_add_overwritesPreviousValue ( ) { com . eclipsesource . json . JsonObject . HashIndexTable indexTable = new com . eclipsesource . json . JsonObject . HashIndexTable ( ) ; indexTable . add ( "name" , 23 ) ; indexTable . add ( "name" , 42 ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { int slot = hashSlotFor ( name ) ; return ( ( hashTable [ slot ] ) & 255 ) - 1 ; } | org . junit . Assert . assertEquals ( 42 , indexTable . get ( "name" ) ) |
testMultipleFlushAnStop_Issue109 ( ) { java . lang . String collection = ( com . marklogic . client . test . datamovement . WriteBatcherTest . whbTestCollection ) + "_testMultipleFlushAnStop_Issue109" ; java . lang . String query1 = ( "_testMultipleFlushAnStop_Issue109" 0 + collection ) + "_testMultipleFlushAnStop_Issue109" 3 ; "<AssertPlaceHolder>" ; com . marklogic . client . datamovement . WriteBatcher ihbMT = com . marklogic . client . test . datamovement . WriteBatcherTest . moveMgr . newWriteBatcher ( ) ; ihbMT . withBatchSize ( 11 ) ; ihbMT . onBatchSuccess ( ( batch ) -> { logger . debug ( "[testMultipleFlushAnStop_Issue109]<sp>batch:<sp>{},<sp>items:<sp>{}" , batch . getJobBatchNumber ( ) , batch . getItems ( ) . length ) ; for ( com . marklogic . client . datamovement . WriteEvent w : batch . getItems ( ) ) { } } ) . onBatchFailure ( ( batch , throwable ) -> { for ( com . marklogic . client . datamovement . WriteEvent w : batch . getItems ( ) ) { } } ) ; com . marklogic . client . datamovement . JobTicket writeTicket = com . marklogic . client . test . datamovement . WriteBatcherTest . moveMgr . startJob ( ihbMT ) ; java . util . concurrent . atomic . AtomicReference < java . lang . Throwable > unexpectedError = new java . util . concurrent . atomic . AtomicReference ( ) ; class MyRunnable implements java . lang . Runnable { @ com . marklogic . client . test . datamovement . Override public void run ( ) { try { for ( int j = 0 ; j < 100 ; j ++ ) { java . lang . String uri = ( ( "/local/multi-" + j ) + "-" ) + ( java . lang . Thread . currentThread ( ) . getId ( ) ) ; logger . debug ( ( "[testMultipleFlushAnStop_Issue109]<sp>add<sp>URI:" + uri ) ) ; com . marklogic . client . io . DocumentMetadataHandle meta = new com . marklogic . client . io . DocumentMetadataHandle ( ) . withCollections ( collection , com . marklogic . client . test . datamovement . WriteBatcherTest . whbTestCollection ) ; ihbMT . add ( uri , meta , new com . marklogic . client . io . StringHandle ( "test" ) ) ; if ( j == 80 ) { logger . debug ( "_testMultipleFlushAnStop_Issue109" 1 ) ; ihbMT . flushAndWait ( ) ; logger . debug ( "[testMultipleFlushAnStop_Issue109]<sp>stopJob" ) ; com . marklogic . client . test . datamovement . WriteBatcherTest . moveMgr . stopJob ( writeTicket ) ; } } } catch ( java . lang . IllegalStateException e ) { if ( "This<sp>instance<sp>has<sp>been<sp>stopped" . equals ( e . getMessage ( ) ) ) { logger . debug ( ( "_testMultipleFlushAnStop_Issue109" 4 + e ) ) ; } else { unexpectedError . set ( e ) ; } } catch ( java . lang . Throwable e ) { unexpectedError . set ( e ) ; } } } java . lang . Thread t1 ; java . lang . Thread t2 ; t1 = new java . lang . Thread ( new MyRunnable ( ) ) ; t2 = new java . lang . Thread ( new MyRunnable ( ) ) ; t1 . start ( ) ; t2 . start ( ) ; t1 . join ( ) ; t2 . join ( ) ; if ( ( unexpectedError . get ( ) ) != null ) { throw unexpectedError . get ( ) ; } System . out . println ( ( "Size<sp>is<sp>" + ( com . marklogic . client . test . datamovement . WriteBatcherTest . client . newServerEval ( ) . xquery ( query1 ) . eval ( ) . next ( ) . getNumber ( ) . intValue ( ) ) ) ) ; } newServerEval ( ) { return new com . marklogic . client . impl . ServerEvaluationCallImpl ( services , getHandleRegistry ( ) ) ; } | org . junit . Assert . assertTrue ( ( ( com . marklogic . client . test . datamovement . WriteBatcherTest . client . newServerEval ( ) . xquery ( query1 ) . eval ( ) . next ( ) . getNumber ( ) . intValue ( ) ) == 0 ) ) |
testAradRoads ( ) { java . util . Set < es . usc . citius . hipster . graph . GraphEdge < es . usc . citius . hipster . util . examples . RomanianProblem . City , java . lang . Double > > roads = com . google . common . collect . Sets . newHashSet ( graph . edgesOf ( RomanianProblem . City . Arad ) ) ; java . util . Set < es . usc . citius . hipster . graph . GraphEdge < es . usc . citius . hipster . util . examples . RomanianProblem . City , java . lang . Double > > expected = new java . util . HashSet ( ) ; expected . add ( new es . usc . citius . hipster . graph . UndirectedEdge < es . usc . citius . hipster . util . examples . RomanianProblem . City , java . lang . Double > ( RomanianProblem . City . Arad , RomanianProblem . City . Zerind , 75.0 ) ) ; expected . add ( new es . usc . citius . hipster . graph . UndirectedEdge < es . usc . citius . hipster . util . examples . RomanianProblem . City , java . lang . Double > ( RomanianProblem . City . Arad , RomanianProblem . City . Sibiu , 140.0 ) ) ; expected . add ( new es . usc . citius . hipster . graph . UndirectedEdge < es . usc . citius . hipster . util . examples . RomanianProblem . City , java . lang . Double > ( RomanianProblem . City . Arad , RomanianProblem . City . Timisoara , 118.0 ) ) ; "<AssertPlaceHolder>" ; } edgesOf ( V ) { return com . google . common . collect . Sets . union ( com . google . common . collect . Sets . newHashSet ( graphTable . row ( vertex ) . values ( ) ) , com . google . common . collect . Sets . newHashSet ( graphTable . column ( vertex ) . values ( ) ) ) ; } | org . junit . Assert . assertEquals ( expected , roads ) |
testCollectAuthRelatedEntitiesJsonShouldMatch ( ) { org . apache . hadoop . hive . ql . QueryState qs = mock ( org . apache . hadoop . hive . ql . QueryState . class ) ; when ( qs . getHiveOperation ( ) ) . thenReturn ( HiveOperation . EXPLAIN ) ; uut . queryState = qs ; org . apache . hadoop . hive . ql . session . SessionState . start ( new org . apache . hadoop . hive . conf . HiveConf ( org . apache . hadoop . hive . ql . exec . ExplainTask . class ) ) ; org . apache . hadoop . hive . ql . security . HiveAuthenticationProvider authenticationProviderMock = mock ( org . apache . hadoop . hive . ql . security . HiveAuthenticationProvider . class ) ; when ( authenticationProviderMock . getUserName ( ) ) . thenReturn ( "test-user" ) ; org . apache . hadoop . hive . ql . session . SessionState . get ( ) . setAuthenticator ( authenticationProviderMock ) ; org . apache . hadoop . hive . ql . session . SessionState . get ( ) . setAuthorizer ( mock ( org . apache . hadoop . hive . ql . security . authorization . HiveAuthorizationProvider . class ) ) ; org . apache . hadoop . hive . ql . exec . ExplainWork work = mockExplainWork ( ) ; com . fasterxml . jackson . databind . JsonNode result = objectMapper . readTree ( uut . collectAuthRelatedEntities ( null , work ) . toString ( ) ) ; com . fasterxml . jackson . databind . JsonNode expected = objectMapper . readTree ( ( "{\"CURRENT_USER\":\"test-user\"," + "\"OPERATION\":\"EXPLAIN\",\"INPUTS\":[],\"OUTPUTS\":[]}" ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "HiveDruidSplit{" + ( druidQuery ) ) + ",<sp>" ) + ( ( hosts ) == null ? "empty<sp>hosts" : java . util . Arrays . toString ( hosts ) ) ) + "}" ; } | org . junit . Assert . assertEquals ( expected , result ) |
testSomeNull ( ) { System . out . println ( "test<sp>some<sp>null<sp>============================================================================" ) ; java . util . Map < org . apache . kylin . metadata . model . TblColRef , java . util . Set < java . lang . String > > values = com . google . common . collect . Maps . newHashMap ( ) ; values . put ( org . apache . kylin . storage . hbase . common . FuzzyValueCombinationTest . col1 , set ( "a" , "b" , "c" ) ) ; values . put ( org . apache . kylin . storage . hbase . common . FuzzyValueCombinationTest . col2 , set ( ) ) ; values . put ( org . apache . kylin . storage . hbase . common . FuzzyValueCombinationTest . col3 , set ( "x" , "y" , "z" ) ) ; java . util . List < java . util . Map < org . apache . kylin . metadata . model . TblColRef , java . lang . String > > result = org . apache . kylin . storage . translate . FuzzyValueCombination . calculate ( values , 10 ) ; for ( java . util . Map < org . apache . kylin . metadata . model . TblColRef , java . lang . String > item : result ) { System . out . println ( item ) ; } "<AssertPlaceHolder>" ; } size ( ) { return columns . size ( ) ; } | org . junit . Assert . assertEquals ( 9 , result . size ( ) ) |
testNewAssign_2 ( ) { lombok . val arrayX = org . nd4j . linalg . factory . Nd4j . create ( DataType . INT , 5 ) ; lombok . val arrayY = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 3 , 4 , 5 } ) ; lombok . val exp = org . nd4j . linalg . factory . Nd4j . create ( new int [ ] { 1 , 2 , 3 , 4 , 5 } , new long [ ] { 5 } , DataType . INT ) ; arrayX . assign ( arrayY ) ; "<AssertPlaceHolder>" ; } assign ( java . lang . Number ) { return sameDiff . scalarSet ( this , value ) ; } | org . junit . Assert . assertEquals ( exp , arrayX ) |
testGetNull ( ) { "<AssertPlaceHolder>" ; } get ( java . lang . String ) { if ( idpName == null ) { return com . google . common . collect . ImmutableSet . of ( ) ; } java . util . Set < java . security . Principal > principals ; if ( ! ( principalMap . containsKey ( idpName ) ) ) { java . lang . String [ ] vs = autoMembershipMapping . get ( idpName ) ; if ( vs == null ) { principals = com . google . common . collect . ImmutableSet . of ( ) ; } else { com . google . common . collect . ImmutableSet . Builder < java . security . Principal > builder = com . google . common . collect . ImmutableSet . builder ( ) ; for ( java . lang . String groupId : autoMembershipMapping . get ( idpName ) ) { try { org . apache . jackrabbit . api . security . user . Authorizable gr = userManager . getAuthorizable ( groupId ) ; if ( ( gr != null ) && ( gr . isGroup ( ) ) ) { java . security . Principal grPrincipal = gr . getPrincipal ( ) ; if ( org . apache . jackrabbit . oak . spi . security . principal . GroupPrincipals . isGroup ( grPrincipal ) ) { builder . add ( grPrincipal ) ; } else { org . apache . jackrabbit . oak . spi . security . authentication . external . impl . principal . ExternalGroupPrincipalProvider . log . warn ( "Principal<sp>of<sp>group<sp>{}<sp>is<sp>not<sp>of<sp>group<sp>type<sp>-><sp>Ignoring" , groupId ) ; } } else { org . apache . jackrabbit . oak . spi . security . authentication . external . impl . principal . ExternalGroupPrincipalProvider . log . warn ( "Configured<sp>auto-membership<sp>group<sp>{}<sp>does<sp>not<sp>exist<sp>-><sp>Ignoring" , groupId ) ; } } catch ( javax . jcr . RepositoryException e ) { org . apache . jackrabbit . oak . spi . security . authentication . external . impl . principal . ExternalGroupPrincipalProvider . log . debug ( "Failed<sp>to<sp>retrieved<sp>'auto-membership'<sp>group<sp>with<sp>id<sp>{}" , groupId , e ) ; } } principals = builder . build ( ) ; } principalMap . put ( idpName , principals ) ; } else { principals = principalMap . get ( idpName ) ; } return principals ; } | org . junit . Assert . assertNull ( properties . get ( null ) ) |
findByStackIdsTest ( ) { java . util . Set < java . lang . String > stackingIds = new java . util . HashSet ( ) ; for ( java . lang . Integer i = 0 ; i < 4 ; i ++ ) { java . lang . String stackingId = "test_stack_id" + ( i . toString ( ) ) ; if ( i > 0 ) { stackingIds . add ( stackingId ) ; } org . candlepin . model . Product product = org . candlepin . test . TestUtil . createProduct ( ) ; product . setAttribute ( Product . Attributes . STACKING_ID , stackingId ) ; productCurator . create ( product ) ; org . candlepin . model . Pool pool = createPool ( owner , product , 1L , dateSource . currentDate ( ) , createDate ( 2020 , 1 , 1 ) ) ; poolCurator . create ( pool ) ; org . candlepin . model . Entitlement created = bind ( consumer , pool ) ; } java . util . List < org . candlepin . model . Entitlement > results = entitlementCurator . findByStackIds ( consumer , stackingIds ) . list ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return virtUuidToConsumerMap . keySet ( ) . size ( ) ; } | org . junit . Assert . assertEquals ( 3 , results . size ( ) ) |
testIllinoisTokenizerEmptyString ( ) { edu . illinois . cs . cogcomp . nlp . tokenizer . Tokenizer tkr = new edu . illinois . cs . cogcomp . nlp . tokenizer . IllinoisTokenizer ( ) ; java . lang . String text = "" ; edu . illinois . cs . cogcomp . nlp . tokenizer . Tokenizer . Tokenization tknzn = tkr . tokenizeTextSpan ( text ) ; "<AssertPlaceHolder>" ; } getTokens ( ) { return tokens ; } | org . junit . Assert . assertEquals ( tknzn . getTokens ( ) . length , 0 ) |
testBuildTableNameNonRootServicePathDataModelByEntityOldEncoding ( ) { System . out . println ( ( ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildTableName]" ) ) + "--------<sp>When<sp>a<sp>non<sp>root<sp>service-path<sp>is<sp>notified/defaulted<sp>and<sp>data_model<sp>is<sp>" ) + "'dm-by-service-path'<sp>the<sp>MySQL<sp>table<sp>name<sp>is<sp>the<sp>encoding<sp>of<sp>the<sp>concatenation<sp>of<sp><service-path>,<sp>" ) + "[NGSIPostgreSQLSink.buildTableName]" 2 ) ) ; java . lang . String attrPersistence = null ; java . lang . String batchSize = null ; java . lang . String batchTime = null ; java . lang . String batchTTL = null ; java . lang . String dataModel = "dm-by-entity" ; java . lang . String enableEncoding = "[NGSIPostgreSQLSink.buildTableName]" 4 ; java . lang . String enableGrouping = null ; java . lang . String enableLowercase = null ; java . lang . String host = null ; java . lang . String password = null ; java . lang . String port = null ; java . lang . String username = null ; java . lang . String cache = null ; com . telefonica . iot . cygnus . sinks . NGSIPostgreSQLSink sink = new com . telefonica . iot . cygnus . sinks . NGSIPostgreSQLSink ( ) ; sink . configure ( createContext ( attrPersistence , batchSize , batchTime , batchTTL , dataModel , enableEncoding , enableGrouping , enableLowercase , host , password , port , username , cache ) ) ; java . lang . String servicePath = "/somePath" ; java . lang . String entity = "someId=someType" ; java . lang . String attribute = null ; try { java . lang . String builtTableName = sink . buildTableName ( servicePath , entity , attribute ) ; java . lang . String expecetedTableName = "[NGSIPostgreSQLSink.buildTableName]" 3 ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildTableName]" ) ) + "-<sp>OK<sp>-<sp>'" ) + builtTableName ) + "'<sp>is<sp>equals<sp>to<sp>the<sp>encoding<sp>of<sp><service-path>,<sp><entityId><sp>" ) + "and<sp><entityType>" ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildTableName]" ) ) + "-<sp>FAIL<sp>-<sp>'" ) + builtTableName ) + "[NGSIPostgreSQLSink.buildTableName]" 0 ) + "[NGSIPostgreSQLSink.buildTableName]" 2 ) ) ; throw e ; } } catch ( java . lang . Exception e ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildTableName]" ) ) + "[NGSIPostgreSQLSink.buildTableName]" 1 ) ) ; throw e ; } buildTableName ( java . lang . String , java . lang . String , java . lang . String ) { java . lang . String name ; switch ( dataModel ) { case DMBYSERVICEPATH : name = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; break ; case DMBYENTITY : java . lang . String truncatedServicePath = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; name = ( truncatedServicePath . isEmpty ( ) ? "" : truncatedServicePath + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( entity ) ) ; break ; case DMBYATTRIBUTE : truncatedServicePath = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; name = ( ( ( truncatedServicePath . isEmpty ( ) ? "" : truncatedServicePath + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( entity ) ) ) + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( attribute ) ) ; break ; default : throw new com . telefonica . iot . cygnus . errors . CygnusBadConfiguration ( ( ( "Unknown<sp>data<sp>model<sp>'" + ( dataModel . toString ( ) ) ) + "'.<sp>Please,<sp>use<sp>dm-by-service-path,<sp>dm-by-entity<sp>or<sp>dm-by-attribute" ) ) ; } if ( ( name . length ( ) ) > ( com . telefonica . iot . cygnus . utils . NGSIConstants . POSTGRESQL_MAX_NAME_LEN ) ) { throw new com . telefonica . iot . cygnus . errors . CygnusBadConfiguration ( ( ( ( "Building<sp>table<sp>name<sp>'" + name ) + "'<sp>and<sp>its<sp>length<sp>is<sp>greater<sp>than<sp>" ) + ( com . telefonica . iot . cygnus . utils . NGSIConstants . POSTGRESQL_MAX_NAME_LEN ) ) ) ; } return name ; } | org . junit . Assert . assertEquals ( expecetedTableName , builtTableName ) |
testNull ( ) { com . udojava . evalex . Expression e = null ; e = new com . udojava . evalex . Expression ( "null" ) ; "<AssertPlaceHolder>" ; } eval ( ) { return this . eval ( v1 . eval ( ) , v2 . eval ( ) ) ; } | org . junit . Assert . assertEquals ( null , e . eval ( ) ) |
testNitrogenRule ( ) { org . openscience . cdk . formula . rules . IRule rule = new org . openscience . cdk . formula . rules . NitrogenRule ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( rule ) |
testDatumDAGnaDEG ( ) { nl . bzk . brp . model . bericht . kern . ActieCorrectieAdresBericht actie = new nl . bzk . brp . model . bericht . kern . ActieCorrectieAdresBericht ( ) ; actie . setDatumAanvangGeldigheid ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut ( 20130101 ) ) ; actie . setDatumEindeGeldigheid ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut ( 20120101 ) ) ; "<AssertPlaceHolder>" ; } isValid ( java . lang . String , javax . validation . ConstraintValidatorContext ) { return org . apache . commons . lang . StringUtils . isNotBlank ( waarde ) ; } | org . junit . Assert . assertFalse ( validator . isValid ( actie , null ) ) |
testReturnTypeException ( ) { java . lang . Object expected = new java . lang . Object ( ) ; java . lang . Object result = org . slieb . throwables . BiFunctionWithThrowable . castBiFunctionWithThrowable ( ( v1 , v2 ) -> { throw new java . lang . Exception ( "expect<sp>exception" ) ; } ) . thatReturnsOnCatch ( expected ) . apply ( null , null ) ; "<AssertPlaceHolder>" ; } apply ( T , T ) { try { return applyWithThrowable ( v1 , v2 ) ; } catch ( java . lang . RuntimeException | java . lang . Error exception ) { throw exception ; } catch ( final java . lang . Throwable throwable ) { throw new org . slieb . throwables . SuppressedException ( throwable ) ; } } | org . junit . Assert . assertEquals ( expected , result ) |
sliceShouldBeEmptyWhenPageableOutOfRange ( ) { repo . saveAll ( org . springframework . data . solr . repository . ITestSolrRepositoryOperations . createProductBeans ( 10 , "slice" ) ) ; org . springframework . data . domain . Slice < org . springframework . data . solr . repository . ProductBean > slice = repo . findProductBeanByName ( "slice" , org . springframework . data . domain . PageRequest . of ( 1 , 20 ) ) ; "<AssertPlaceHolder>" ; } hasContent ( ) { return ! ( termsMap . isEmpty ( ) ) ; } | org . junit . Assert . assertThat ( slice . hasContent ( ) , org . hamcrest . core . Is . is ( false ) ) |
testToString ( ) { de . metanome . algorithm_integration . ColumnPermutation expectedDependant = new de . metanome . algorithm_integration . ColumnPermutation ( new de . metanome . algorithm_integration . ColumnIdentifier ( "table2" , "column2" ) , new de . metanome . algorithm_integration . ColumnIdentifier ( "table2" , "column27" ) ) ; de . metanome . algorithm_integration . ColumnPermutation expectedReferenced = new de . metanome . algorithm_integration . ColumnPermutation ( new de . metanome . algorithm_integration . ColumnIdentifier ( "table1" , "column1" ) , new de . metanome . algorithm_integration . ColumnIdentifier ( "table1" , "column4" ) ) ; de . metanome . algorithm_integration . results . InclusionDependency ind = new de . metanome . algorithm_integration . results . InclusionDependency ( expectedDependant , expectedReferenced ) ; java . lang . String expectedStringRepresentation = ( expectedDependant + ( InclusionDependency . IND_SEPARATOR ) ) + expectedReferenced ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder stringBuilder = new java . lang . StringBuilder ( ) ; stringBuilder . append ( "ColumnCombinationBitset<sp>" ) ; int lastSetBitIndex = bitset . previousSetBit ( bitset . length ( ) ) ; for ( int i = 0 ; i <= lastSetBitIndex ; i ++ ) { stringBuilder . append ( ( bitset . get ( i ) ? 1 : 0 ) ) ; } return stringBuilder . toString ( ) ; } | org . junit . Assert . assertEquals ( expectedStringRepresentation , ind . toString ( ) ) |
deveObterValorOutrasDespesasAcessoriasComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto produto = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto ( ) ; final java . math . BigDecimal valorOutrasDespesasAcessorias = new java . math . BigDecimal ( "999999999999.99" ) ; produto . setValorOutrasDespesasAcessorias ( valorOutrasDespesasAcessorias ) ; "<AssertPlaceHolder>" ; } getValorOutrasDespesasAcessorias ( ) { return this . valorOutrasDespesasAcessorias ; } | org . junit . Assert . assertEquals ( "999999999999.99" , produto . getValorOutrasDespesasAcessorias ( ) ) |
testCreateDBOFromDTO ( ) { try { org . sagebionetworks . repo . model . dbo . wikiV2 . V2WikiTranslationUtils . createDBOFromDTO ( null ) ; org . junit . Assert . fail ( "Null<sp>dbo<sp>should<sp>not<sp>be<sp>allowed" ) ; } catch ( java . lang . IllegalArgumentException e ) { } java . lang . Long markdownFileHandleId = new java . lang . Long ( 333 ) ; java . lang . Long fileHandleId = new java . lang . Long ( 444 ) ; java . lang . Long user = new java . lang . Long ( 111 ) ; org . sagebionetworks . repo . model . dbo . wikiV2 . V2DBOWikiPage wikiDbo = new org . sagebionetworks . repo . model . dbo . wikiV2 . V2DBOWikiPage ( ) ; wikiDbo . setCreatedBy ( user ) ; wikiDbo . setCreatedOn ( null ) ; wikiDbo . setEtag ( null ) ; wikiDbo . setId ( null ) ; wikiDbo . setMarkdownVersion ( null ) ; wikiDbo . setModifiedBy ( user ) ; wikiDbo . setModifiedOn ( null ) ; wikiDbo . setParentId ( null ) ; wikiDbo . setRootId ( null ) ; wikiDbo . setTitle ( "Title" ) ; org . sagebionetworks . repo . model . v2 . wiki . V2WikiPage page = new org . sagebionetworks . repo . model . v2 . wiki . V2WikiPage ( ) ; page . setAttachmentFileHandleIds ( new java . util . ArrayList < java . lang . String > ( ) ) ; page . getAttachmentFileHandleIds ( ) . add ( java . lang . String . valueOf ( fileHandleId ) ) ; page . setCreatedBy ( java . lang . String . valueOf ( user ) ) ; page . setCreatedOn ( null ) ; page . setId ( null ) ; page . setMarkdownFileHandleId ( java . lang . String . valueOf ( markdownFileHandleId ) ) ; page . setModifiedBy ( java . lang . String . valueOf ( user ) ) ; page . setModifiedOn ( null ) ; page . setParentWikiId ( null ) ; page . setTitle ( "Title" ) ; org . sagebionetworks . repo . model . dbo . wikiV2 . V2DBOWikiPage dbo = org . sagebionetworks . repo . model . dbo . wikiV2 . V2WikiTranslationUtils . createDBOFromDTO ( page ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; org . sagebionetworks . repo . model . dbo . dao . migration . BatchUtilityTest . SpaceFiller other = ( ( org . sagebionetworks . repo . model . dbo . dao . migration . BatchUtilityTest . SpaceFiller ) ( obj ) ) ; if ( ! ( java . util . Arrays . equals ( bytes , other . bytes ) ) ) return false ; return true ; } | org . junit . Assert . assertTrue ( dbo . equals ( wikiDbo ) ) |
shouldReturnSavingsInterestCalculatorWithMinimumBalanceStrategy ( ) { org . mifos . accounts . savings . interest . SavingsInterestDetail interestDetail = new org . mifos . accounts . savings . interest . SavingsInterestDetailBuilder ( ) . mimimumBalance ( ) . build ( ) ; org . mifos . accounts . savings . interest . InterestCalculator interestCalculator = savingsInterestCalculatorFactory . create ( interestDetail ) ; "<AssertPlaceHolder>" ; } create ( org . mifos . rest . approval . domain . ApprovalMethod ) { if ( ! ( skipCreate ) ) { org . mifos . rest . approval . domain . RESTApprovalEntity entity = new org . mifos . rest . approval . domain . RESTApprovalEntity ( ) ; entity . setApprovalMethod ( method ) ; entity . setState ( ApprovalState . WAITING ) ; entity . setCreatedBy ( getCurrentUserId ( ) ) ; entity . setCreatedOn ( new org . joda . time . DateTime ( ) ) ; approvalDao . create ( entity ) ; throw new org . mifos . rest . approval . service . RESTCallInterruptException ( entity . getId ( ) ) ; } } | org . junit . Assert . assertNotNull ( interestCalculator ) |
fib5Test ( ) { final int actual = edu . rice . pcdp . await . FibAwaitTest . kernel ( 5 ) ; final int expected = 5 ; "<AssertPlaceHolder>" ; } kernel ( int ) { final int [ ] result = new int [ 1 ] ; edu . rice . pcdp . PCDP . finish ( ( ) -> { final CompletableFuture < java . lang . Integer > f1 = new edu . rice . pcdp . await . CompletableFuture < > ( ) ; fib ( N , f1 ) ; asyncAwait ( ( ) -> { try { result [ 0 ] = f1 . get ( ) ; } catch ( final ex ) { throw new < edu . rice . pcdp . await . ex > java . lang . RuntimeException ( ) ; } } , f1 ) ; } ) ; return result [ 0 ] ; } | org . junit . Assert . assertEquals ( expected , actual ) |
getAssignedModeFlag ( ) { "<AssertPlaceHolder>" ; } getAssignedModeFlag ( ) { return fAssignedModeFlag ; } | org . junit . Assert . assertEquals ( false , msg . getAssignedModeFlag ( ) ) |
testDfsToTargetIn ( ) { final long source = org . neo4j . graphalgo . impl . BFSDFSTest . id ( "g" ) ; final long target = org . neo4j . graphalgo . impl . BFSDFSTest . id ( "a" ) ; final long [ ] nodes = new org . neo4j . graphalgo . impl . Traverse ( org . neo4j . graphalgo . impl . BFSDFSTest . graph ) . computeDfs ( source , Direction . INCOMING , ( s , t , w ) -> t == target ? Result . BREAK : Result . FOLLOW ) ; System . out . println ( java . util . Arrays . toString ( nodes ) ) ; "<AssertPlaceHolder>" ; } toString ( int ) { final java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; iterateBFS ( root , ( s , t , r ) -> { if ( ( builder . length ( ) ) > 0 ) { builder . append ( ",<sp>" ) ; } builder . append ( s ) . append ( "<sp>-><sp>" ) . append ( t ) ; return true ; } ) ; return builder . toString ( ) ; } | org . junit . Assert . assertEquals ( 5 , nodes . length ) |
testAsType05 ( ) { org . dresdenocl . modelinstancetype . types . IModelInstanceString modelInstanceString ; modelInstanceString = org . dresdenocl . modelinstancetype . types . base . BasisJavaModelInstanceFactory . createModelInstanceString ( "something" ) ; org . dresdenocl . modelinstancetype . types . IModelInstanceElement castedElement ; castedElement = modelInstanceString . asType ( org . dresdenocl . modelbus . test . modelinstance . types . base . JavaModelInstanceStringTest . typeString ) ; "<AssertPlaceHolder>" ; } getString ( ) { return stringEDataType ; } | org . junit . Assert . assertEquals ( modelInstanceString . getString ( ) , ( ( org . dresdenocl . modelinstancetype . types . IModelInstanceString ) ( castedElement ) ) . getString ( ) ) |
testMultiNormalizerStandardizeNotFitLabels ( ) { org . nd4j . linalg . dataset . MultiNormalizerStandardize original = new org . nd4j . linalg . dataset . MultiNormalizerStandardize ( ) ; original . setFeatureStats ( java . util . Arrays . asList ( new org . nd4j . linalg . dataset . api . preprocessor . stats . DistributionStats ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0.5 , 1.5 } ) . reshape ( 1 , ( - 1 ) ) , org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 2.5 , 3.5 } ) . reshape ( 1 , ( - 1 ) ) ) , new org . nd4j . linalg . dataset . api . preprocessor . stats . DistributionStats ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 4.5 , 5.5 , 6.5 } ) . reshape ( 1 , ( - 1 ) ) , org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 7.5 , 8.5 , 9.5 } ) . reshape ( 1 , ( - 1 ) ) ) ) ) ; SUT . write ( original , tmpFile ) ; org . nd4j . linalg . dataset . MultiNormalizerStandardize restored = SUT . restore ( tmpFile ) ; "<AssertPlaceHolder>" ; } restore ( org . nd4j . linalg . dataset . api . preprocessor . serializer . InputStream ) { org . nd4j . linalg . dataset . api . preprocessor . serializer . DataInputStream dis = new org . nd4j . linalg . dataset . api . preprocessor . serializer . DataInputStream ( stream ) ; boolean fitLabels = dis . readBoolean ( ) ; double targetMin = dis . readDouble ( ) ; double targetMax = dis . readDouble ( ) ; org . nd4j . linalg . dataset . api . preprocessor . NormalizerMinMaxScaler result = new org . nd4j . linalg . dataset . api . preprocessor . NormalizerMinMaxScaler ( targetMin , targetMax ) ; result . fitLabel ( fitLabels ) ; result . setFeatureStats ( org . nd4j . linalg . factory . Nd4j . read ( dis ) , org . nd4j . linalg . factory . Nd4j . read ( dis ) ) ; if ( fitLabels ) { result . setLabelStats ( org . nd4j . linalg . factory . Nd4j . read ( dis ) , org . nd4j . linalg . factory . Nd4j . read ( dis ) ) ; } return result ; } | org . junit . Assert . assertEquals ( original , restored ) |
testSetResourceAsString ( ) { com . github . anno4j . model . impl . ResourceObject resourceObject = anno4j . createObject ( com . github . anno4j . model . impl . ResourceObject . class ) ; resourceObject . setResourceAsString ( "http://www.somepage.org/resource1/" ) ; com . github . anno4j . model . impl . ResourceObject resourceObject1 = anno4j . findByID ( com . github . anno4j . model . impl . ResourceObject . class , resourceObject . getResourceAsString ( ) ) ; "<AssertPlaceHolder>" ; } getResourceAsString ( ) { return getResource ( ) . stringValue ( ) ; } | org . junit . Assert . assertEquals ( "http://www.somepage.org/resource1/" , resourceObject1 . getResourceAsString ( ) ) |
sameTreadTest ( ) { long value = com . taobao . tddl . qatest . sequence . GroupSequenceTest . seque . nextValue ( ) ; com . taobao . tddl . sequence . impl . GroupSequence seque1 = ( ( com . taobao . tddl . sequence . impl . GroupSequence ) ( com . taobao . tddl . qatest . sequence . GroupSequenceTest . context . getBean ( "sequence" ) ) ) ; long value1 = seque1 . nextValue ( ) ; "<AssertPlaceHolder>" ; } nextValue ( ) { boolean isTest = this . isTestSeq ( ) ; if ( ( getSequenceRange ( isTest ) ) == null ) { lock . lock ( ) ; try { if ( ( getSequenceRange ( isTest ) ) == null ) { setSequenceRange ( sequenceDao . nextRange ( name ) , isTest ) ; } } finally { lock . unlock ( ) ; } } long value = getSequenceRange ( isTest ) . getAndIncrement ( ) ; if ( value == ( - 1 ) ) { lock . lock ( ) ; try { for ( ; ; ) { if ( getSequenceRange ( isTest ) . isOver ( ) ) { setSequenceRange ( sequenceDao . nextRange ( name ) , isTest ) ; } value = getSequenceRange ( isTest ) . getAndIncrement ( ) ; if ( value == ( - 1 ) ) { continue ; } break ; } } finally { lock . unlock ( ) ; } } if ( value < 0 ) { throw new com . taobao . tddl . sequence . exception . SequenceException ( ( "Sequence<sp>value<sp>overflow,<sp>value<sp>=<sp>" + value ) ) ; } return value ; } | org . junit . Assert . assertEquals ( ( value + 1 ) , value1 ) |
listWithPrefixAndDelimiter2 ( ) { org . apache . hadoop . ozone . s3 . endpoint . BucketEndpoint getBucket = new org . apache . hadoop . ozone . s3 . endpoint . BucketEndpoint ( ) ; org . apache . hadoop . ozone . client . OzoneClient ozoneClient = createClientWithKeys ( "dir1/file2" , "dir1/dir2/file2" , "dir1bh/file" , "dir1bha/file2" , "file2" ) ; getBucket . setClient ( ozoneClient ) ; org . apache . hadoop . ozone . s3 . endpoint . ListObjectResponse getBucketResponse = ( ( org . apache . hadoop . ozone . s3 . endpoint . ListObjectResponse ) ( getBucket . list ( "b1" , "/" , null , null , 100 , "dir1bh" , null , null , "dir1/dir2/file2" , null ) . getEntity ( ) ) ) ; "<AssertPlaceHolder>" ; } getCommonPrefixes ( ) { return commonPrefixes ; } | org . junit . Assert . assertEquals ( 2 , getBucketResponse . getCommonPrefixes ( ) . size ( ) ) |
listResourceGroups ( ) { int groupCount = azure . resourceGroups ( ) . list ( ) . size ( ) ; System . out . println ( java . lang . String . format ( "Group<sp>count:<sp>%s" , groupCount ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return com . microsoft . azure . management . resources . fluentcore . utils . Utils . toPrimitiveInt ( this . inner ( ) . diskSizeGB ( ) ) ; } | org . junit . Assert . assertTrue ( ( 0 < groupCount ) ) |
testForUnSignedLongArray ( ) { java . lang . Long [ ] longArr = new java . lang . Long [ 2 ] ; longArr [ 0 ] = 1L ; longArr [ 1 ] = 2L ; com . salesforce . phoenix . schema . PhoenixArray arr = com . salesforce . phoenix . schema . PArrayDataType . instantiatePhoenixArray ( PDataType . UNSIGNED_LONG , longArr ) ; PDataType . UNSIGNED_LONG_ARRAY . toObject ( arr , PDataType . UNSIGNED_LONG_ARRAY ) ; byte [ ] bytes = PDataType . UNSIGNED_LONG_ARRAY . toBytes ( arr ) ; com . salesforce . phoenix . schema . PhoenixArray resultArr = ( ( com . salesforce . phoenix . schema . PhoenixArray ) ( PDataType . UNSIGNED_LONG_ARRAY . toObject ( bytes , 0 , bytes . length ) ) ) ; "<AssertPlaceHolder>" ; } toObject ( java . lang . Object , com . salesforce . phoenix . schema . PDataType , com . salesforce . phoenix . schema . ColumnModifier ) { return toObject ( object , actualType ) ; } | org . junit . Assert . assertEquals ( arr , resultArr ) |
test02 ( ) { invocations = 0 ; int first = java . util . stream . IntStream . range ( 1 , 1000 ) . parallel ( ) . filter ( ( x ) -> { ( invocations ) ++ ; return ( x % 42 ) == 0 ; } ) . findFirst ( ) . getAsInt ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 42 , first ) |
testGetTopLevelDataTypes ( ) { final java . lang . String secondUUID = "789" ; final java . lang . String thirdUUID = "012" ; final org . kie . workbench . common . dmn . client . editors . types . common . DataType secondDataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final org . kie . workbench . common . dmn . client . editors . types . common . DataType thirdDataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; when ( secondDataType . isTopLevel ( ) ) . thenReturn ( true ) ; store . index ( secondUUID , secondDataType ) ; store . index ( thirdUUID , thirdDataType ) ; final java . util . List < org . kie . workbench . common . dmn . client . editors . types . common . DataType > topLevelDataTypes = store . getTopLevelDataTypes ( ) ; "<AssertPlaceHolder>" ; } getTopLevelDataTypes ( ) { return all ( ) . stream ( ) . filter ( DataType :: isTopLevel ) . collect ( java . util . stream . Collectors . toList ( ) ) ; } | org . junit . Assert . assertEquals ( topLevelDataTypes , singletonList ( secondDataType ) ) |
testPinyinStr ( ) { java . util . List < java . lang . String > result = org . nlpcn . commons . lang . pinyin . Pinyin . pinyin ( str ) ; System . out . println ( result ) ; "<AssertPlaceHolder>" ; } size ( ) { return hm . size ( ) ; } | org . junit . Assert . assertEquals ( result . size ( ) , str . length ( ) ) |
testGenerateDatastreamFromFiles ( ) { java . util . List < java . net . URI > files = new java . util . ArrayList < java . net . URI > ( ) ; files . add ( java . io . File . createTempFile ( "datastream-orig" , ".ingest" , org . fcrepo . generator . foxml . FOXMLGeneratorTest . TEMP_DIR ) . toURI ( ) ) ; files . add ( java . io . File . createTempFile ( "datastream-orig" , ".ingest" , org . fcrepo . generator . foxml . FOXMLGeneratorTest . TEMP_DIR ) . toURI ( ) ) ; files . add ( java . io . File . createTempFile ( "datastream-orig" , ".ingest" , org . fcrepo . generator . foxml . FOXMLGeneratorTest . TEMP_DIR ) . toURI ( ) ) ; com . github . cwilper . fcrepo . dto . core . Datastream stream = org . fcrepo . dto . factories . Datastreams . generateDatastreamFromURIs ( files , ControlGroup . MANAGED ) ; "<AssertPlaceHolder>" ; } generateDatastreamFromURIs ( java . util . List , com . github . cwilper . fcrepo . dto . core . ControlGroup ) { final com . github . cwilper . fcrepo . dto . core . Datastream datastream = new com . github . cwilper . fcrepo . dto . core . Datastream ( ( "datastream-" + ( java . util . UUID . randomUUID ( ) ) ) ) ; for ( java . net . URI uri : uris ) { boolean success = false ; while ( ! success ) { success = datastream . versions ( ) . add ( org . fcrepo . dto . factories . Datastreams . generateDatastreamVersionFromURI ( uri , controlGroup ) ) ; } } return datastream ; } | org . junit . Assert . assertTrue ( ( ( stream . versions ( ) . size ( ) ) == 3 ) ) |
testGetInheritedUnmetEntityAccessRequirements ( ) { ar = org . sagebionetworks . repo . manager . AccessRequirementManagerImplAutoWiredTest . newEntityAccessRequirement ( entityId ) ; ar = accessRequirementManager . createAccessRequirement ( adminUserInfo , ar ) ; org . sagebionetworks . repo . model . UserInfo otherUserInfo = testUserInfo ; org . sagebionetworks . repo . model . RestrictableObjectDescriptor rod = new org . sagebionetworks . repo . model . RestrictableObjectDescriptor ( ) ; rod . setId ( childId ) ; rod . setType ( RestrictableObjectType . ENTITY ) ; java . util . List < org . sagebionetworks . repo . model . AccessRequirement > ars = accessRequirementManager . getAllUnmetAccessRequirements ( otherUserInfo , rod , ACCESS_TYPE . DOWNLOAD ) ; "<AssertPlaceHolder>" ; } size ( ) { return byteSize ; } | org . junit . Assert . assertEquals ( 1 , ars . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.