input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldIgnoreFromActionWhenNotSpecified ( ) { org . springframework . springfaces . mvc . navigation . annotation . NavigationMappingMethod o = new org . springframework . springfaces . mvc . navigation . annotation . NavigationMappingMethod ( this . beanName , org . springframework . springfaces . mvc . navigation . annotation . NavigationMappingMethodTest . Bean . class , org . springframework . springfaces . mvc . navigation . annotation . NavigationMappingMethodTest . Bean . onDefaults , true ) ; given ( this . context . getController ( ) ) . willReturn ( this . bean ) ; given ( this . context . getOutcome ( ) ) . willReturn ( "defaults" ) ; given ( this . context . getFromAction ( ) ) . willReturn ( "doesnotmatter" ) ; "<AssertPlaceHolder>" ; } canResolve ( java . lang . String ) { return ( org . springframework . util . StringUtils . hasLength ( value ) ) && ( value . startsWith ( this . prefix ) ) ; } | org . junit . Assert . assertThat ( o . canResolve ( this . context ) , org . hamcrest . Matchers . is ( true ) ) |
testMaxSleepTime ( ) { final long sleepTime = new org . apache . flink . client . program . rest . retry . ExponentialWaitStrategy ( 1 , 1 ) . sleepTime ( 100 ) ; "<AssertPlaceHolder>" ; } equalTo ( org . apache . flink . api . java . functions . KeySelector ) { org . apache . flink . api . common . typeinfo . TypeInformation < K > keyType = org . apache . flink . api . java . typeutils . TypeExtractor . getKeySelectorTypes ( keyExtractor , input2 . getType ( ) ) ; return createCoGroupOperator ( new org . apache . flink . api . common . operators . Keys . SelectorFunctionKeys ( input1 . clean ( keyExtractor ) , input2 . getType ( ) , keyType ) ) ; } | org . junit . Assert . assertThat ( sleepTime , org . hamcrest . Matchers . equalTo ( 1L ) ) |
testEenMeerderjarigKindEnOuderZonderOuderlijkGezag ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > overtreders = brby2016 . voerRegelUit ( maakHuidigePersoon ( 19750101 ) , maakNieuwePersoon ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . ouder . ouderlijkgezag . BRBY2016Test . OUDER_ZONDER_OUDERLIJK_GEZAG ) , bouwActie ( ) , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , overtreders . size ( ) ) |
testMap_valueCastToBoolean ( ) { java . util . Map < java . lang . String , java . lang . Object > testMap = new java . util . HashMap ( ) ; testMap . put ( "key" , "${TEST.boolean:<sp>true}" ) ; com . networknt . config . CentralizedManagement . mergeMap ( testMap ) ; "<AssertPlaceHolder>" ; } mergeMap ( java . util . Map ) { com . networknt . config . CentralizedManagement . merge ( config ) ; } | org . junit . Assert . assertTrue ( ( ( testMap . get ( "key" ) ) instanceof java . lang . Boolean ) ) |
testSortByPropertyNamesValueWithNullPropertyValueDesc ( ) { com . feilong . store . member . User u_null_id = new com . feilong . store . member . User ( ( ( java . lang . Long ) ( null ) ) ) ; com . feilong . store . member . User id12 = new com . feilong . store . member . User ( 12L ) ; com . feilong . store . member . User id2 = new com . feilong . store . member . User ( 2L ) ; com . feilong . store . member . User u_null = null ; com . feilong . store . member . User id1 = new com . feilong . store . member . User ( 1L ) ; java . util . List < com . feilong . store . member . User > list = toList ( u_null_id , id12 , id2 , u_null , id1 , u_null_id ) ; com . feilong . core . util . SortUtil . sortListByPropertyNamesValue ( list , "id<sp>desc" ) ; "<AssertPlaceHolder>" ; } sortListByPropertyNamesValue ( java . util . List , java . lang . String [ ] ) { if ( null == list ) { return java . util . Collections . emptyList ( ) ; } org . apache . commons . lang3 . Validate . notEmpty ( propertyNameAndOrders , "propertyNameAndOrders<sp>can't<sp>be<sp>null/empty!" ) ; org . apache . commons . lang3 . Validate . noNullElements ( propertyNameAndOrders , "propertyNameAndOrders:[%s]<sp>has<sp>empty<sp>value" , propertyNameAndOrders ) ; java . util . Comparator < O > comparator = com . feilong . core . util . comparator . BeanComparatorUtil . chainedComparator ( propertyNameAndOrders ) ; return com . feilong . core . util . SortUtil . sortList ( list , comparator ) ; } | org . junit . Assert . assertThat ( list , org . hamcrest . Matchers . contains ( u_null , id12 , id2 , id1 , u_null_id , u_null_id ) ) |
testToString ( ) { java . util . List < java . lang . String > equivalentStrings = new java . util . ArrayList < java . lang . String > ( ) ; equivalentStrings . add ( "offset=0&limit=50" ) ; equivalentStrings . add ( "offset=0&limit=50" ) ; equivalentStrings . add ( "offset=0&limit=50" ) ; equivalentStrings . add ( "offset=0&limit=50" ) ; java . net . URI requestUri = new java . net . URI ( org . slc . sli . api . service . query . ApiQueryTest . URI_STRING ) ; when ( uriInfo . getRequestUri ( ) ) . thenReturn ( requestUri ) ; org . slc . sli . api . service . query . ApiQuery apiQuery = new org . slc . sli . api . service . query . ApiQuery ( uriInfo ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { if ( ! ( enabled ) ) { return false ; } java . util . Map < java . lang . String , java . lang . Object > body = ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( getUserSession ( ) . getBody ( ) ) ) ; if ( ! ( body . containsKey ( org . slc . sli . api . security . context . traversal . cache . impl . SessionSecurityCache . CACHE ) ) ) { return false ; } java . util . Map < java . lang . String , java . lang . Object > cache = ( ( java . util . Map ) ( getUserSession ( ) . getBody ( ) . get ( "cache" ) ) ) ; return cache . containsKey ( cacheId ) ; } | org . junit . Assert . assertTrue ( equivalentStrings . contains ( apiQuery . toString ( ) ) ) |
testIsNominalLabelExistsById ( ) { qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestNominalLabelResourceFacadeImp . entityManager . getTransaction ( ) . begin ( ) ; java . lang . Boolean result = qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestNominalLabelResourceFacadeImp . nominalLabelResourceFacadeImp . isNominalLabelExists ( qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestNominalLabelResourceFacadeImp . nominalLabel . getNominalLabelId ( ) ) ; qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestNominalLabelResourceFacadeImp . entityManager . getTransaction ( ) . commit ( ) ; "<AssertPlaceHolder>" ; } getNominalLabelId ( ) { return this . nominalLabelId ; } | org . junit . Assert . assertEquals ( java . lang . Boolean . valueOf ( true ) , result ) |
doesFilesContainSameLinesTestSameFile ( ) { try ( java . io . InputStream inputStream1 = org . talend . dataprep . qa . util . FileComparatorTest . class . getResourceAsStream ( org . talend . dataprep . qa . util . FileComparatorTest . FILE_10L3C_BASE ) ; java . io . InputStream inputStream2 = org . talend . dataprep . qa . util . FileComparatorTest . class . getResourceAsStream ( org . talend . dataprep . qa . util . FileComparatorTest . FILE_10L3C_BASE ) ) { boolean result = org . talend . dataprep . qa . util . FileComparator . doesFilesContainSameLines ( inputStream2 , inputStream1 ) ; "<AssertPlaceHolder>" ; } } doesFilesContainSameLines ( java . io . InputStream , java . io . InputStream ) { org . apache . commons . io . LineIterator actualLI = org . apache . commons . io . IOUtils . lineIterator ( actual , StandardCharsets . UTF_8 ) ; org . apache . commons . io . LineIterator expectedLI = org . apache . commons . io . IOUtils . lineIterator ( expected , StandardCharsets . UTF_8 ) ; java . util . Map < java . lang . String , java . lang . Integer > unmatchedLinesFromActualFile = new java . util . HashMap ( ) ; java . util . Map < java . lang . String , java . lang . Integer > unmatchedLinesFromExpectedFile = new java . util . HashMap ( ) ; while ( ( actualLI . hasNext ( ) ) || ( expectedLI . hasNext ( ) ) ) { java . lang . String actualLine = ( actualLI . hasNext ( ) ) ? actualLI . nextLine ( ) : null ; java . lang . String expectedLine = ( expectedLI . hasNext ( ) ) ? expectedLI . nextLine ( ) : null ; if ( ( actualLine != null ) && ( expectedLine != null ) ) { if ( ! ( actualLine . equals ( expectedLine ) ) ) { if ( ! ( org . talend . dataprep . qa . util . FileComparator . removeOrDecrement ( unmatchedLinesFromExpectedFile , actualLine ) ) ) { org . talend . dataprep . qa . util . FileComparator . putOrIncrement ( unmatchedLinesFromActualFile , actualLine ) ; } if ( ! ( org . talend . dataprep . qa . util . FileComparator . removeOrDecrement ( unmatchedLinesFromActualFile , expectedLine ) ) ) { org . talend . dataprep . qa . util . FileComparator . putOrIncrement ( unmatchedLinesFromExpectedFile , expectedLine ) ; } } } else if ( actualLine != null ) { org . talend . dataprep . qa . util . FileComparator . putOrIncrement ( unmatchedLinesFromActualFile , actualLine ) ; } else { org . talend . dataprep . qa . util . FileComparator . putOrIncrement ( unmatchedLinesFromExpectedFile , expectedLine ) ; } } if ( ( unmatchedLinesFromActualFile . isEmpty ( ) ) && ( unmatchedLinesFromExpectedFile . isEmpty ( ) ) ) { return true ; } if ( ! ( unmatchedLinesFromActualFile . isEmpty ( ) ) ) { org . talend . dataprep . qa . util . FileComparator . LOGGER . warn ( ( "Lines<sp>present<sp>only<sp>in<sp>actual<sp>file<sp>:\n" + ( org . talend . dataprep . qa . util . FileComparator . getKeys ( unmatchedLinesFromActualFile ) ) ) ) ; } if ( ! ( unmatchedLinesFromExpectedFile . isEmpty ( ) ) ) { org . talend . dataprep . qa . util . FileComparator . LOGGER . warn ( ( "Lines<sp>present<sp>only<sp>in<sp>expected<sp>file<sp>:\n" + ( org . talend . dataprep . qa . util . FileComparator . getKeys ( unmatchedLinesFromExpectedFile ) ) ) ) ; } return false ; } | org . junit . Assert . assertTrue ( result ) |
testStoreControlHubConfigs ( ) { com . streamsets . datacollector . main . RuntimeInfo runtimeInfo = generateRuntimeInfo ( ) ; com . streamsets . datacollector . main . RuntimeInfo . storeControlHubConfigs ( runtimeInfo , java . util . Collections . singletonMap ( "sch" , "true" ) ) ; com . streamsets . datacollector . util . Configuration configuration = new com . streamsets . datacollector . util . Configuration ( ) ; com . streamsets . datacollector . main . RuntimeInfo . loadOrReloadConfigs ( runtimeInfo , configuration ) ; "<AssertPlaceHolder>" ; } get ( Key , java . util . concurrent . Callable ) { return valueOrDefault ( key , delegate . get ( key , valueLoader ) ) ; } | org . junit . Assert . assertEquals ( "true" , configuration . get ( "sch" , null ) ) |
testUserTypeImplemented ( ) { sfsb . setupConfig ( ) ; try { sfsb . createGene ( 1 , State . DORMANT ) ; final org . jboss . as . test . compat . jpa . hibernate . transformer . Gene gene = sfsb . getGene ( 1 ) ; "<AssertPlaceHolder>" ; } finally { sfsb . cleanup ( ) ; } } getState ( ) { return this . timerState ; } | org . junit . Assert . assertEquals ( State . DORMANT , gene . getState ( ) ) |
tuple_array_1 ( ) { org . apache . jena . atlas . lib . tuple . Tuple < java . lang . Integer > tuple1 = org . apache . jena . atlas . lib . tuple . TupleFactory . tuple ( 9 , 8 , 7 ) ; java . lang . Integer [ ] array = tuple1 . asArray ( java . lang . Integer . class ) ; org . apache . jena . atlas . lib . tuple . Tuple < java . lang . Integer > tuple2 = org . apache . jena . atlas . lib . tuple . TupleFactory . create ( array ) ; "<AssertPlaceHolder>" ; } create ( X [ ] ) { switch ( xs . length ) { case 0 : return org . apache . jena . atlas . lib . tuple . TupleFactory . create0 ( ) ; case 1 : return org . apache . jena . atlas . lib . tuple . TupleFactory . create1 ( xs [ 0 ] ) ; case 2 : return org . apache . jena . atlas . lib . tuple . TupleFactory . create2 ( xs [ 0 ] , xs [ 1 ] ) ; case 3 : return org . apache . jena . atlas . lib . tuple . TupleFactory . create3 ( xs [ 0 ] , xs [ 1 ] , xs [ 2 ] ) ; case 4 : return org . apache . jena . atlas . lib . tuple . TupleFactory . create4 ( xs [ 0 ] , xs [ 1 ] , xs [ 2 ] , xs [ 3 ] ) ; case 5 : return org . apache . jena . atlas . lib . tuple . TupleFactory . create5 ( xs [ 0 ] , xs [ 1 ] , xs [ 2 ] , xs [ 3 ] , xs [ 4 ] ) ; case 6 : return org . apache . jena . atlas . lib . tuple . TupleFactory . create6 ( xs [ 0 ] , xs [ 1 ] , xs [ 2 ] , xs [ 3 ] , xs [ 4 ] , xs [ 5 ] ) ; case 7 : return org . apache . jena . atlas . lib . tuple . TupleFactory . create7 ( xs [ 0 ] , xs [ 1 ] , xs [ 2 ] , xs [ 3 ] , xs [ 4 ] , xs [ 5 ] , xs [ 6 ] ) ; case 8 : return org . apache . jena . atlas . lib . tuple . TupleFactory . create8 ( xs [ 0 ] , xs [ 1 ] , xs [ 2 ] , xs [ 3 ] , xs [ 4 ] , xs [ 5 ] , xs [ 6 ] , xs [ 7 ] ) ; default : return org . apache . jena . atlas . lib . tuple . TupleN . create ( xs ) ; } } | org . junit . Assert . assertEquals ( tuple1 , tuple2 ) |
testAdminShowAllRole ( ) { org . apache . sqoop . client . SqoopClient client = sqoopServerRunner . getSqoopClient ( org . apache . sentry . tests . e2e . sqoop . ADMIN_USER ) ; client . createRole ( new org . apache . sqoop . model . MRole ( "show_all_role" ) ) ; "<AssertPlaceHolder>" ; } getRoles ( ) { return roles ; } | org . junit . Assert . assertTrue ( ( ( client . getRoles ( ) . size ( ) ) > 0 ) ) |
sameServiceRegisteredAgain ( ) { org . apache . jackrabbit . oak . spi . whiteboard . DefaultWhiteboardTest . Service1 s1 = new org . apache . jackrabbit . oak . spi . whiteboard . DefaultWhiteboardTest . Service1 ( "s1" ) ; whiteboard . register ( org . apache . jackrabbit . oak . spi . whiteboard . DefaultWhiteboardTest . Service1 . class , s1 , com . google . common . collect . ImmutableMap . of ( ) ) ; whiteboard . register ( org . apache . jackrabbit . oak . spi . whiteboard . DefaultWhiteboardTest . Service1 . class , s1 , com . google . common . collect . ImmutableMap . of ( ) ) ; whiteboard . register ( org . apache . jackrabbit . oak . spi . whiteboard . DefaultWhiteboardTest . Service1 . class , s1 , com . google . common . collect . ImmutableMap . of ( ) ) ; "<AssertPlaceHolder>" ; } track ( org . apache . jackrabbit . oak . composite . MountedNodeStore ) { mountedNodeStoresByName . put ( mountedNodeStore . getMount ( ) . getName ( ) , mountedNodeStore ) ; } | org . junit . Assert . assertEquals ( of ( "s1" ) , track ( org . apache . jackrabbit . oak . spi . whiteboard . DefaultWhiteboardTest . Service1 . class ) ) |
testVraagOpKandidaatVaderNietGevonden ( ) { final java . util . List < nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView > kandidaten = brby0002 . bepaalKandidatenVader ( new nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView ( new nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl ( new nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortPersoonAttribuut ( nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortPersoon . INGESCHREVENE ) ) ) , new nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut ( 20120101 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , kandidaten . size ( ) ) |
hasEntry_testFolderHasInDirectChild ( ) { org . talend . dataprep . folder . store . file . FileSystemUtilsTest . createEntry ( testFolder . resolve ( "foo/toto.dp" ) , "contentId" , "folderId" , FolderContentType . PREPARATION ) ; "<AssertPlaceHolder>" ; } hasEntry ( java . nio . file . Path ) { boolean hasChild ; try ( java . util . stream . Stream < java . nio . file . Path > pathsStream = java . nio . file . Files . walk ( path ) ) { hasChild = pathsStream . filter ( Files :: isRegularFile ) . map ( org . talend . dataprep . folder . store . file . FileSystemUtils :: toFolderEntry ) . findAny ( ) . isPresent ( ) ; } catch ( java . io . IOException e ) { throw new org . talend . dataprep . exception . TDPException ( UNABLE_TO_DELETE_FOLDER , e , build ( ) . put ( "path" , path ) ) ; } return hasChild ; } | org . junit . Assert . assertTrue ( org . talend . dataprep . folder . store . file . FileSystemUtils . hasEntry ( testFolder ) ) |
testEcho ( ) { org . apache . avro . TestProtocolReflect . TestRecord record = new org . apache . avro . TestProtocolReflect . TestRecord ( ) ; record . name = "foo" ; org . apache . avro . TestProtocolReflect . TestRecord echoed = org . apache . avro . TestProtocolReflect . proxy . echo ( record ) ; "<AssertPlaceHolder>" ; } echo ( org . apache . avro . test . TestRecord ) { return record ; } | org . junit . Assert . assertEquals ( record , echoed ) |
testCreate ( ) { org . oscarehr . billing . CA . BC . model . LogTeleplanTx entity = new org . oscarehr . billing . CA . BC . model . LogTeleplanTx ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; } | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
asSuperclass ( ) { final org . jboss . msc . value . Value < ? extends java . lang . String > value = new org . jboss . msc . value . ImmediateValue < java . lang . String > ( "string" ) ; final org . jboss . msc . value . Value < java . lang . String > recastValue = org . jboss . msc . value . Values . asSuperclass ( value ) ; "<AssertPlaceHolder>" ; } asSuperclass ( org . jboss . msc . value . Value ) { return ( ( org . jboss . msc . value . Value < T > ) ( value ) ) ; } | org . junit . Assert . assertSame ( value , recastValue ) |
testSearchAreaCode205 ( ) { stubFor ( get ( urlMatching ( "/v1.0/accounts/12345/availableNumbers.*" ) ) . willReturn ( aResponse ( ) . withStatus ( 200 ) . withHeader ( "Content-Type" , "text/json" ) . withBody ( BandwidthAvailablePhoneNumbersEndpointTestUtils . areaCode205SearchResult ) ) ) ; com . sun . jersey . api . client . Client jerseyClient = com . sun . jersey . api . client . Client . create ( ) ; jerseyClient . addFilter ( new com . sun . jersey . api . client . filter . HTTPBasicAuthFilter ( adminUsername , adminAuthToken ) ) ; java . lang . String provisioningURL = ( ( deploymentUrl ) + ( baseURL ) ) + "US/Local.json" ; com . sun . jersey . api . client . WebResource webResource = jerseyClient . resource ( provisioningURL ) ; com . sun . jersey . api . client . ClientResponse clientResponse = webResource . queryParam ( "AreaCode" , "201" ) . accept ( "application/json" ) . get ( com . sun . jersey . api . client . ClientResponse . class ) ; "<AssertPlaceHolder>" ; java . lang . String response = clientResponse . getEntity ( java . lang . String . class ) ; System . out . println ( response ) ; com . google . gson . JsonParser parser = new com . google . gson . JsonParser ( ) ; com . google . gson . JsonArray jsonResponse = parser . parse ( response ) . getAsJsonArray ( ) ; System . out . println ( jsonResponse ) ; } getStatus ( ) { return status ; } | org . junit . Assert . assertTrue ( ( ( clientResponse . getStatus ( ) ) == 200 ) ) |
parseTagWithSimpleHardwareAddress ( ) { cern . c2mon . shared . common . datatag . address . HardwareAddress address = new cern . c2mon . shared . common . datatag . address . impl . SimpleHardwareAddressImpl ( "simpleName" ) ; cern . c2mon . shared . common . datatag . address . HardwareAddress readAddress = serializeDeserializeAddress ( address ) ; "<AssertPlaceHolder>" ; } serializeDeserializeAddress ( cern . c2mon . shared . common . datatag . address . HardwareAddress ) { try { java . lang . String jsonMessage = cern . c2mon . server . configuration . parser . toJSON . ParseToJSON . mapper . writeValueAsString ( address ) ; return cern . c2mon . server . configuration . parser . toJSON . ParseToJSON . mapper . readValue ( jsonMessage , cern . c2mon . shared . common . datatag . address . HardwareAddress . class ) ; } catch ( java . io . IOException e ) { return null ; } } | org . junit . Assert . assertEquals ( address , readAddress ) |
testFlattenNonNullProperties ( ) { final java . util . List < java . lang . String > expectedResult = newArrayList ( "booleanProperty" , java . lang . Boolean . TRUE . toString ( ) , "intProperty" , "1" , "stringProperty" , "foo" ) ; final com . cloud . utils . ReflectUtilTest . Bean bean = new com . cloud . utils . ReflectUtilTest . Bean ( 1 , true , "foo" ) ; "<AssertPlaceHolder>" ; } flattenProperties ( java . lang . Object , java . lang . Class ) { return com . cloud . utils . ReflectUtil . flattenPropeties ( target , clazz , "class" ) ; } | org . junit . Assert . assertEquals ( expectedResult , com . cloud . utils . ReflectUtil . flattenProperties ( bean , com . cloud . utils . ReflectUtilTest . Bean . class ) ) |
getHistogram ( ) { net . centro . rtb . monitoringcenter . MetricCollector metricCollector = net . centro . rtb . monitoringcenter . MonitoringCenter . getMetricCollector ( net . centro . rtb . monitoringcenter . MonitoringCenterTest . class ) ; net . centro . rtb . monitoringcenter . Histogram testHistogram = new net . centro . rtb . monitoringcenter . Histogram ( new net . centro . rtb . monitoringcenter . ExponentiallyDecayingReservoir ( ) ) ; metricCollector . registerMetric ( testHistogram , "testHistogram" ) ; testHistogram . update ( 3000 ) ; "<AssertPlaceHolder>" ; metricCollector . removeAll ( ) ; } getCount ( ) { return mainDelegate . getCount ( ) ; } | org . junit . Assert . assertEquals ( 1 , metricCollector . getHistogram ( "testHistogram" ) . getCount ( ) ) |
multiDomainQueryOR ( ) { com . b2international . index . query . Expression actual = eval ( "*<sp>{{<sp>active=false<sp>}}<sp>OR<sp>*<sp>{{<sp>term=\"clin<sp>find\"<sp>}}" ) ; com . b2international . index . query . Expression expected = com . b2international . index . query . Expressions . builder ( ) . should ( SnomedDocument . Expressions . inactive ( ) ) . should ( SnomedDocument . Expressions . ids ( java . util . Collections . emptySet ( ) ) ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return build ( ( ( java . lang . Void ) ( null ) ) ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
initialConfiguration ( ) { java . io . File logDir = new java . io . File ( org . apache . aries . transaction . internal . LogConversionTest . BASE , "initialConfiguration" ) ; org . apache . commons . io . FileUtils . deleteDirectory ( logDir ) ; logDir . mkdirs ( ) ; java . util . Dictionary < java . lang . String , java . lang . Object > properties = new java . util . Hashtable < java . lang . String , java . lang . Object > ( ) ; createLog ( "initialConfiguration" , "transaction" , 2 , ( - 1 ) , 1 , properties ) ; "<AssertPlaceHolder>" ; } copyActiveTransactions ( java . util . Dictionary , java . util . Dictionary ) { if ( oldConfiguration == null ) { oldConfiguration = new java . util . Hashtable < java . lang . String , java . lang . Object > ( ) ; } if ( ( oldConfiguration . get ( org . apache . aries . transaction . internal . HOWL_LOG_FILE_DIR ) ) == null ) { oldConfiguration . put ( org . apache . aries . transaction . internal . HOWL_LOG_FILE_DIR , newConfiguration . get ( org . apache . aries . transaction . internal . HOWL_LOG_FILE_DIR ) ) ; } java . lang . String oldLogDirectory = ( ( java . lang . String ) ( oldConfiguration . get ( org . apache . aries . transaction . internal . HOWL_LOG_FILE_DIR ) ) ) ; java . lang . String newLogDirectory = ( ( java . lang . String ) ( newConfiguration . get ( org . apache . aries . transaction . internal . HOWL_LOG_FILE_DIR ) ) ) ; if ( ( newLogDirectory == null ) || ( oldLogDirectory == null ) ) { return false ; } java . io . File oldDir = new java . io . File ( oldLogDirectory ) ; oldLogDirectory = oldDir . getAbsolutePath ( ) ; java . io . File newDir = new java . io . File ( newLogDirectory ) ; newLogDirectory = newDir . getAbsolutePath ( ) ; java . io . File transaction_1 = null ; if ( ! ( oldDir . equals ( newDir ) ) ) { org . apache . aries . transaction . internal . TransactionLogUtils . deleteDirectory ( newDir ) ; transaction_1 = new java . io . File ( oldDir , org . apache . aries . transaction . internal . TransactionLogUtils . configuredTransactionLogName ( oldConfiguration , 1 ) ) ; } else { transaction_1 = new java . io . File ( oldDir , org . apache . aries . transaction . internal . TransactionLogUtils . configuredTransactionLogName ( oldConfiguration , 1 ) ) ; if ( ( ! ( transaction_1 . exists ( ) ) ) || ( ( transaction_1 . length ( ) ) == 0L ) ) { oldConfiguration . put ( org . apache . aries . transaction . internal . HOWL_LOG_FILE_NAME , getString ( newConfiguration , org . apache . aries . transaction . internal . HOWL_LOG_FILE_NAME , "transaction" ) ) ; oldConfiguration . put ( org . apache . aries . transaction . internal . HOWL_LOG_FILE_EXT , getString ( newConfiguration , org . apache . aries . transaction . internal . HOWL_LOG_FILE_EXT , "log" ) ) ; transaction_1 = new java . io . File ( oldDir , org . apache . aries . transaction . internal . TransactionLogUtils . configuredTransactionLogName ( newConfiguration , 1 ) ) ; } } if ( ( ! ( transaction_1 . exists ( ) ) ) || ( ( transaction_1 . length ( ) ) == 0L ) ) { return false ; } org . apache . aries . transaction . internal . TransactionLogUtils . BaseTxLogConfig oldTxConfig = org . apache . aries . transaction . internal . TransactionLogUtils . transactionLogFileConfig ( transaction_1 ) ; org . apache . aries . transaction . internal . TransactionLogUtils . BaseTxLogConfig newTxConfig = org . apache . aries . transaction . internal . TransactionLogUtils . transactionLogFileConfig ( newConfiguration ) ; if ( ( oldTxConfig == null ) || ( oldTxConfig . equals ( newTxConfig ) ) ) { if ( ! ( oldDir . equals ( newDir ) ) ) { if ( ! ( oldDir . renameTo ( newDir ) ) ) { org . apache . aries . transaction . internal . TransactionLogUtils . log . warn ( "Can't<sp>backup<sp>old<sp>transaction<sp>logs<sp>directory:<sp>{}" , oldDir . getAbsolutePath ( ) ) ; return false ; } } java . lang . String oldName = org . apache . aries . transaction . internal . TransactionLogUtils . configuredTransactionLogName ( oldConfiguration , 1 ) ; java . lang . String newName = org . apache . aries . transaction . internal . TransactionLogUtils . configuredTransactionLogName ( newConfiguration , 1 ) ; if ( ! ( oldName . equals ( newName ) ) ) { final java . util . Dictionary < java . lang . String , java . lang . Object > finalOldConfiguration = oldConfiguration ; final java . util . Dictionary < java . lang . String , ? > finalNewConfiguration = newConfiguration ; final java . util . Map < java . lang . String , java . lang . String > changes = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; newDir . listFiles ( new java . io . FilenameFilter ( ) { @ org . apache . aries . transaction . internal . Override public boolean accept ( java . io . File dir , java . lang . String name ) { java . util . regex . Matcher matcher = org . apache . aries . transaction . internal . TransactionLogUtils . TX_FILE_NAME . matcher ( name ) ; if ( matcher . matches ( ) ) { if ( | org . junit . Assert . assertFalse ( org . apache . aries . transaction . internal . TransactionLogUtils . copyActiveTransactions ( null , properties ) ) |
testValidSessionIsCreated ( ) { uk . co . hadoopathome . kafkastreams . drools . DroolsRulesApplier rulesApplier = new uk . co . hadoopathome . kafkastreams . drools . DroolsRulesApplier ( "IfContainsEPrepend0KS" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( rulesApplier ) |
gettingNextElementFromProgrammeReturnsNextElementIterable ( ) { org . atlasapi . remotesite . bbc . nitro . PaginatedProgrammeRequest paginatedProgrammeRequest = new org . atlasapi . remotesite . bbc . nitro . PaginatedProgrammeRequest ( client , com . google . common . collect . ImmutableList . of ( programmesQuery , programmesQuery ) ) ; when ( client . execute ( any ( com . metabroadcast . atlas . glycerin . queries . ProgrammesQuery . class ) ) ) . thenReturn ( glycerinResponse ) ; when ( glycerinResponse . getResults ( ) ) . thenReturn ( com . google . common . collect . ImmutableList . of ( programme ) ) ; when ( glycerinResponse . hasNext ( ) ) . thenReturn ( false ) ; when ( glycerinResponse . getNext ( ) ) . thenReturn ( glycerinResponse ) ; when ( glycerinResponse . hasNext ( ) ) . thenReturn ( true ) ; java . util . Iterator < java . util . List < com . metabroadcast . atlas . glycerin . model . Programme > > programmes = paginatedProgrammeRequest . iterator ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { if ( ( currentResponse ) == null ) { return executeRequest ( ) ; } else { return currentResponse . hasNext ( ) ; } } | org . junit . Assert . assertTrue ( programmes . hasNext ( ) ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . social . kernel . model . SocialRelation newSocialRelation = addSocialRelation ( ) ; com . liferay . social . kernel . model . SocialRelation existingSocialRelation = _persistence . findByPrimaryKey ( newSocialRelation . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; } | org . junit . Assert . assertEquals ( existingSocialRelation , newSocialRelation ) |
testEmptyByteArray ( ) { java . lang . String s = software . amazon . awssdk . utils . IoUtils . toUtf8String ( new java . io . ByteArrayInputStream ( new byte [ 0 ] ) ) ; "<AssertPlaceHolder>" ; } toUtf8String ( java . io . InputStream ) { return new java . lang . String ( software . amazon . awssdk . utils . IoUtils . toByteArray ( is ) , java . nio . charset . StandardCharsets . UTF_8 ) ; } | org . junit . Assert . assertEquals ( "" , s ) |
getValueStringByKey_good_case ( ) { java . util . HashMap < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; map . put ( "key1" , "value1" ) ; map . put ( "key2" , "value2" ) ; map . put ( "key3" , "value3" ) ; java . lang . String keyName = "key2" ; java . lang . String expResult = "value2" ; java . lang . String result = com . microsoft . azure . sdk . iot . service . Tools . getValueStringByKey ( map , keyName ) ; "<AssertPlaceHolder>" ; } getValueStringByKey ( java . util . Map , java . lang . String ) { java . lang . String retVal ; if ( ( map == null ) || ( keyName == null ) ) { retVal = "" ; } else { java . lang . Object val = map . get ( keyName ) ; if ( val != null ) retVal = val . toString ( ) . trim ( ) ; else retVal = "" ; } return retVal ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testSendNoRetry_unauthorized ( ) { setResponseExpectations ( 401 , "" ) ; try { sender . sendNoRetry ( message , regId ) ; org . junit . Assert . fail ( "Should<sp>have<sp>thrown<sp>InvalidRequestException" ) ; } catch ( com . google . android . gcm . server . InvalidRequestException e ) { "<AssertPlaceHolder>" ; } } getHttpStatusCode ( ) { return status ; } | org . junit . Assert . assertEquals ( 401 , e . getHttpStatusCode ( ) ) |
emptyToNumberTest ( ) { java . lang . Object a = "" ; java . lang . Number number = cn . hutool . core . convert . Convert . toNumber ( a ) ; "<AssertPlaceHolder>" ; } toNumber ( java . lang . Object ) { return cn . hutool . core . convert . Convert . toNumber ( value , null ) ; } | org . junit . Assert . assertNull ( number ) |
testRestWithLengthOneArrayAttributeOp ( ) { org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . ST ( "<rest(names)>" ) ; e . add ( "names" , new java . lang . String [ ] { "Ter" } ) ; java . lang . String expecting = "" ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; } | org . junit . Assert . assertEquals ( expecting , e . render ( ) ) |
testFindOne ( ) { prepareForQuery ( ) ; in . cubestack . apps . android . storm . entitites . TestEntity response = baseService . findOne ( in . cubestack . apps . android . storm . entitites . TestEntity . class , baseService . restrictionsFor ( in . cubestack . apps . android . storm . entitites . TestEntity . class ) . equals ( "id" , 2 ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . String , java . lang . Object ) { return new in . cubestack . android . lib . storm . criteria . BasicRestriction ( property , value , SQLOperator . EQUALS , tableInformation ) ; } | org . junit . Assert . assertNotNull ( response ) |
testGetOutputFiles ( ) { uk . ac . tgac . rampart . stage . Mecq . EcqArgs args = new uk . ac . tgac . rampart . stage . Mecq . EcqArgs ( ) ; args . setTool ( "SICKLE_V1.2" ) ; args . setOutputDir ( new java . io . File ( "test/" ) ) ; uk . ac . tgac . conan . core . data . Library lib = new uk . ac . tgac . conan . core . data . Library ( ) ; lib . setFiles ( new java . io . File ( "file1.fl" ) , new java . io . File ( "file2.fl" ) ) ; uk . ac . tgac . conan . process . re . GenericReadEnhancerArgs genericArgs = new uk . ac . tgac . conan . process . re . GenericReadEnhancerArgs ( ) ; genericArgs . setInput ( lib ) ; genericArgs . setOutputDir ( args . getOutputDir ( ) ) ; genericArgs . setThreads ( 1 ) ; genericArgs . setMemoryGb ( 0 ) ; uk . ac . tgac . conan . process . re . ReadEnhancer ec = uk . ac . tgac . conan . process . re . ReadEnhancerFactory . create ( args . getTool ( ) , genericArgs , null ) ; java . util . List < java . io . File > files = ec . getEnhancedFiles ( ) ; "<AssertPlaceHolder>" ; } getTool ( ) { return tool ; } | org . junit . Assert . assertTrue ( ( ( files . size ( ) ) == 3 ) ) |
testSingleStoreOfProductWithTodaysDate ( ) { org . greencheek . related . api . indexing . RelatedItem productToStore = createRelatedItemWithCurrentDay ( ) ; indexAndFlush ( org . greencheek . related . indexing . elasticsearch . Arrays . asList ( productToStore ) ) ; int count = server . getDocCount ( org . greencheek . related . indexing . elasticsearch . ElasticSearchRelatedItemHttpIndexingRepositoryTest . dayStorageLocationMapper . getLocationName ( productToStore ) ) ; "<AssertPlaceHolder>" ; } getLocationName ( org . greencheek . related . api . indexing . RelatedItem ) { java . lang . String dateStr = product . getDate ( ) ; java . lang . String date ; if ( dateStr == null ) { date = currentDayFormatter . getCurrentDay ( ) ; } else { date = currentDayFormatter . parseToDate ( dateStr ) ; } if ( dateCachingEnabled ) { java . lang . String cachedIndexName = dayCache . get ( date ) ; if ( cachedIndexName == null ) { java . lang . StringBuilder indexName = new java . lang . StringBuilder ( indexNameSize ) ; java . lang . String theIndexName = indexName . append ( this . indexPrefixName ) . append ( date ) . toString ( ) ; java . lang . String previous = dayCache . putIfAbsent ( date , theIndexName ) ; if ( previous != null ) { return previous ; } else { return theIndexName ; } } else { return cachedIndexName ; } } else { java . lang . StringBuilder indexName = new java . lang . StringBuilder ( indexNameSize ) ; return indexName . append ( this . indexPrefixName ) . append ( date ) . toString ( ) ; } } | org . junit . Assert . assertEquals ( 1 , count ) |
testGetXmlClobPropertyAndUnmarshallToObjectConfigurationValueIsBlank ( ) { org . finra . herd . model . jpa . ConfigurationEntity configurationEntity = mock ( org . finra . herd . model . jpa . ConfigurationEntity . class ) ; when ( configurationEntity . getValueClob ( ) ) . thenReturn ( org . finra . herd . service . helper . BLANK_TEXT ) ; when ( configurationDao . getConfigurationByKey ( org . finra . herd . service . helper . CONFIGURATION_KEY ) ) . thenReturn ( configurationEntity ) ; java . lang . String result = configurationDaoHelper . getXmlClobPropertyAndUnmarshallToObject ( java . lang . String . class , org . finra . herd . service . helper . CONFIGURATION_KEY ) ; verify ( configurationDao ) . getConfigurationByKey ( org . finra . herd . service . helper . CONFIGURATION_KEY ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; } | org . junit . Assert . assertNull ( result ) |
testThatRerankStrategyForBoostingIsNotAppliedIfRqAlreadyExists ( ) { com . s24 . search . solr . component . BmaxBoostTermComponent component = new com . s24 . search . solr . component . BmaxBoostTermComponent ( ) ; component . init ( initArgs ) ; org . apache . solr . common . params . ModifiableSolrParams params = new org . apache . solr . common . params . ModifiableSolrParams ( ) ; params . set ( "q" , "a<sp>b<sp>c" ) ; params . set ( "rq" , "dummy" ) ; params . set ( com . s24 . search . solr . component . SYNONYM_ENABLE , false ) ; params . set ( com . s24 . search . solr . component . PENALIZE_ENABLE , false ) ; params . set ( com . s24 . search . solr . component . BOOST_ENABLE , true ) ; params . set ( com . s24 . search . solr . component . BOOST_STRATEGY , com . s24 . search . solr . component . VALUE_STRATEGY_RERANK ) ; params . set ( DisMaxParams . QF , "field1<sp>field2^3" ) ; when ( request . getParams ( ) ) . thenReturn ( params ) ; component . prepareInternal ( responseBuilder ) ; org . mockito . ArgumentCaptor < org . apache . solr . common . params . SolrParams > argument = org . mockito . ArgumentCaptor . forClass ( org . apache . solr . common . params . SolrParams . class ) ; verify ( request ) . setParams ( argument . capture ( ) ) ; "<AssertPlaceHolder>" ; } prepareInternal ( org . apache . solr . handler . component . ResponseBuilder ) { checkNotNull ( rb , "Pre-condition<sp>violated:<sp>rb<sp>must<sp>not<sp>be<sp>null." ) ; final org . apache . solr . common . params . ModifiableSolrParams params = new org . apache . solr . common . params . ModifiableSolrParams ( rb . req . getParams ( ) ) ; final org . apache . solr . schema . IndexSchema schema = rb . req . getSearcher ( ) . getSchema ( ) ; final boolean boost = params . getBool ( com . s24 . search . solr . component . BOOST_ENABLE , true ) ; final boolean penalize = params . getBool ( com . s24 . search . solr . component . PENALIZE_ENABLE , true ) ; final java . lang . String q = getExpandedQuery ( params , schema , params . getBool ( com . s24 . search . solr . component . SYNONYM_ENABLE , true ) ) ; if ( boost ) { java . lang . String debugMessage = applyBoosts ( params , schema , q ) ; if ( rb . isDebugQuery ( ) ) { com . s24 . search . solr . util . BmaxDebugInfo . add ( rb , ( ( COMPONENT_NAME ) + ".boost.terms" ) , debugMessage ) ; } } if ( penalize ) { java . lang . String debugMessage = applyPenalizing ( params , schema , q ) ; if ( rb . isDebugQuery ( ) ) { com . s24 . search . solr . util . BmaxDebugInfo . add ( rb , ( ( COMPONENT_NAME ) + ".penalize.terms" ) , debugMessage ) ; } } rb . req . setParams ( params ) ; } | org . junit . Assert . assertThat ( argument . getValue ( ) . getParams ( "rq" ) , org . hamcrest . CoreMatchers . equalTo ( new java . lang . String [ ] { "dummy" } ) ) |
validateInvalidCR ( ) { net . maritimecloud . identityregistry . model . data . CertificateRevocation cr = new net . maritimecloud . identityregistry . model . data . CertificateRevocation ( ) ; cr . setRevokationReason ( "not-valid-reason" ) ; cr . setRevokedAt ( null ) ; java . util . Set < javax . validation . ConstraintViolation < net . maritimecloud . identityregistry . model . data . CertificateRevocation > > violations = validator . validate ( cr ) ; "<AssertPlaceHolder>" ; } setRevokationReason ( java . lang . String ) { if ( revokationReason != null ) { revokationReason = revokationReason . toLowerCase ( ) ; } this . revokationReason = revokationReason ; } | org . junit . Assert . assertEquals ( violations . size ( ) , 2 ) |
testGetExecution ( ) { java . util . List < org . camunda . bpm . engine . runtime . Execution > executions = runtimeService . createExecutionQuery ( ) . processDefinitionKey ( "oneTaskProcess" ) . list ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return deletedCache . isEmpty ( ) ; } | org . junit . Assert . assertFalse ( executions . isEmpty ( ) ) |
testGetInternalNode ( ) { org . geolatte . graph . InternalNode < java . lang . Object , java . lang . Object > node = ( ( org . geolatte . graph . InternalNode < java . lang . Object , java . lang . Object > ) ( org . mockito . Mockito . mock ( org . geolatte . graph . InternalNode . class ) ) ) ; org . geolatte . graph . algorithms . BasicPredGraph < java . lang . Object , java . lang . Object > basicPredGraph = new org . geolatte . graph . algorithms . BasicPredGraph < java . lang . Object , java . lang . Object > ( node , 42 ) ; "<AssertPlaceHolder>" ; } getInternalNode ( ) { return this . internalNode ; } | org . junit . Assert . assertEquals ( node , basicPredGraph . getInternalNode ( ) ) |
testParsing ( ) { java . io . File f = new java . io . File ( "src/test/resources/source1.8.txt" ) ; org . walkmod . javalang . ast . CompilationUnit cu = org . walkmod . javalang . ASTManager . parse ( f ) ; "<AssertPlaceHolder>" ; System . out . println ( cu . toString ( ) ) ; } parse ( java . io . File ) { return org . walkmod . javalang . ASTManager . parse ( file , "UTF-8" ) ; } | org . junit . Assert . assertNotNull ( cu ) |
datumIngangVoorDatumEinde ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Bijhoudingsautorisatie bijhoudingsautorisatie = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Bijhoudingsautorisatie ( false ) ; bijhoudingsautorisatie . setDatumIngang ( 20160605 ) ; bijhoudingsautorisatie . setDatumEinde ( 20160606 ) ; "<AssertPlaceHolder>" ; } errorCount ( nl . bzk . algemeenbrp . dal . domein . brp . entity . ToegangLeveringsAutorisatie ) { final java . util . Map < ? , ? > result = new java . util . HashMap ( ) ; final org . springframework . validation . Errors errors = new org . springframework . validation . MapBindingResult ( result , "toegang" ) ; subject . validate ( toegang , errors ) ; return errors . getErrorCount ( ) ; } | org . junit . Assert . assertEquals ( 0 , errorCount ( bijhoudingsautorisatie ) ) |
testidID ( ) { com . box . l10n . mojito . po . PoPluralRule rulesForBcp47Tag = com . box . l10n . mojito . po . PoPluralRule . fromBcp47Tag ( "id-ID" ) ; "<AssertPlaceHolder>" ; } fromBcp47Tag ( java . lang . String ) { com . box . l10n . mojito . po . PoPluralRule . logger . debug ( "Get<sp>po<sp>plural<sp>rules<sp>for<sp>bcp47tag:<sp>{}" , bcp47tag ) ; com . box . l10n . mojito . po . PoPluralRule poPluralRule = com . box . l10n . mojito . po . PoPluralRule . TWO_FORMS_SINGULAR_FOR_ONE ; java . util . Locale forLanguageTag = java . util . Locale . forLanguageTag ( bcp47tag ) ; if ( com . box . l10n . mojito . po . PoPluralRule . mappingForNonDefault . containsKey ( bcp47tag ) ) { poPluralRule = com . box . l10n . mojito . po . PoPluralRule . mappingForNonDefault . get ( bcp47tag ) ; } else if ( com . box . l10n . mojito . po . PoPluralRule . mappingForNonDefault . containsKey ( forLanguageTag . getLanguage ( ) ) ) { poPluralRule = com . box . l10n . mojito . po . PoPluralRule . mappingForNonDefault . get ( forLanguageTag . getLanguage ( ) ) ; } else if ( ( ! ( com . google . common . base . Strings . isNullOrEmpty ( bcp47tag ) ) ) && ( ! ( "und" . equals ( bcp47tag ) ) ) ) { com . ibm . icu . text . PluralRules cldrPluralRule = com . ibm . icu . text . PluralRules . forLocale ( java . util . Locale . forLanguageTag ( bcp47tag ) ) ; if ( ( cldrPluralRule . getKeywords ( ) . size ( ) ) == 1 ) { poPluralRule = com . box . l10n . mojito . po . PoPluralRule . ONE_FORM ; } } com . box . l10n . mojito . po . PoPluralRule . logger . debug ( "Po<sp>plural<sp>rules<sp>for<sp>bcp47tag<sp>is:<sp>{}" , poPluralRule . toString ( ) ) ; return poPluralRule ; } | org . junit . Assert . assertEquals ( PoPluralRule . ONE_FORM , rulesForBcp47Tag ) |
testGetAttestationFailueReport ( ) { System . out . println ( "getAttestationFailueReport" ) ; com . intel . mtwilson . as . business . Hostname hostName = null ; java . lang . Boolean failureOnly = false ; com . intel . mtwilson . as . business . ReportsBO instance = new com . intel . mtwilson . as . business . ReportsBO ( ) ; com . intel . mtwilson . datatypes . AttestationReport expResult = null ; com . intel . mtwilson . datatypes . AttestationReport result = instance . getAttestationReport ( hostName , failureOnly ) ; "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "The<sp>test<sp>case<sp>is<sp>a<sp>prototype." ) ; } getAttestationReport ( com . intel . mtwilson . model . Hostname , java . lang . Boolean ) { try { com . intel . mtwilson . as . business . ReportsBO . logger . debug ( "getAttestationReport<sp>-<sp>Received<sp>request<sp>to<sp>generate<sp>attestation<sp>report<sp>for<sp>{}<sp>with<sp>failuresOnly<sp>set<sp>to<sp>{}." , hostName . toString ( ) , failureOnly ) ; com . intel . mtwilson . as . business . AttestationReport attestationReport = new com . intel . mtwilson . as . business . AttestationReport ( ) ; return attestationReport ; } catch ( java . io . IOException | com . intel . dcsg . cpg . crypto . CryptographyException | com . intel . mountwilson . as . common . ASException | java . lang . NumberFormatException ex ) { com . intel . mtwilson . as . business . ReportsBO . logger . error ( "Error<sp>during<sp>retrieval<sp>of<sp>host<sp>attestation<sp>report." , ex ) ; throw new com . intel . mountwilson . as . common . ASException ( com . intel . mtwilson . i18n . ErrorCode . AS_HOST_ATTESTATION_REPORT_ERROR , ex . getClass ( ) . getSimpleName ( ) ) ; } } | org . junit . Assert . assertEquals ( expResult , result ) |
testFindByDemographicNo ( ) { int demographicNo1 = 111 ; int demographicNo2 = 222 ; org . oscarehr . common . model . DemographicMerged demoMerged1 = new org . oscarehr . common . model . DemographicMerged ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( demoMerged1 ) ; demoMerged1 . setDemographicNo ( demographicNo1 ) ; dao . persist ( demoMerged1 ) ; org . oscarehr . common . model . DemographicMerged demoMerged2 = new org . oscarehr . common . model . DemographicMerged ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( demoMerged2 ) ; demoMerged2 . setDemographicNo ( demographicNo2 ) ; dao . persist ( demoMerged2 ) ; org . oscarehr . common . model . DemographicMerged demoMerged3 = new org . oscarehr . common . model . DemographicMerged ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( demoMerged3 ) ; demoMerged3 . setDemographicNo ( demographicNo2 ) ; dao . persist ( demoMerged3 ) ; java . util . List < org . oscarehr . common . model . DemographicMerged > expectedResult = new java . util . ArrayList < org . oscarehr . common . model . DemographicMerged > ( java . util . Arrays . asList ( demoMerged1 ) ) ; java . util . List < org . oscarehr . common . model . DemographicMerged > result = dao . findByDemographicNo ( demographicNo1 ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } } | org . junit . Assert . assertTrue ( true ) |
getEncoding ( ) { final net . jadler . Request req = net . jadler . Request . builder ( ) . method ( net . jadler . RequestTest . METHOD ) . requestURI ( java . net . URI . create ( "http://localhost/" ) ) . encoding ( net . jadler . RequestTest . UTF_8_CHARSET ) . build ( ) ; "<AssertPlaceHolder>" ; } getEncoding ( ) { return this . encoding ; } | org . junit . Assert . assertThat ( req . getEncoding ( ) , is ( net . jadler . RequestTest . UTF_8_CHARSET ) ) |
testReOrganizeSpace ( ) { int iTuplePerFrame = 3 ; java . util . Map < java . lang . Integer , java . lang . Integer > mapPrepare = prepareFixedSizeTuples ( iTuplePerFrame , EXTRA_BYTES_FOR_DELETABLE_FRAME , 0 ) ; java . util . Map < java . lang . Integer , java . lang . Integer > copyMap = new java . util . HashMap ( mapPrepare ) ; java . util . Map < org . apache . hyracks . dataflow . std . structures . TuplePointer , java . lang . Integer > mapInserted = insertInFTAToBufferShouldAllSuccess ( ) ; java . nio . ByteBuffer buffer = deleteRandomSelectedTuples ( mapPrepare , mapInserted , ( ( mapPrepare . size ( ) ) / 2 ) ) ; inFTA . reset ( buffer ) ; java . util . Map < org . apache . hyracks . dataflow . std . structures . TuplePointer , java . lang . Integer > mapInserted2 = insertInFTAToBufferMayNotAllSuccess ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return list . size ( ) ; } | org . junit . Assert . assertTrue ( ( ( mapInserted2 . size ( ) ) > 0 ) ) |
testGetStartUpstreamsSimple ( ) { hudson . model . FreeStyleProject projectA = jenkins . createFreeStyleProject ( "A" ) ; hudson . model . FreeStyleProject projectB = jenkins . createFreeStyleProject ( "B" ) ; hudson . model . FreeStyleProject projectC = jenkins . createFreeStyleProject ( "C" ) ; projectA . getPublishersList ( ) . add ( new hudson . tasks . BuildTrigger ( projectC . getName ( ) , true ) ) ; projectB . getPublishersList ( ) . add ( new hudson . tasks . BuildTrigger ( projectC . getName ( ) , true ) ) ; jenkins . getInstance ( ) . rebuildDependencyGraph ( ) ; java . util . List < hudson . model . AbstractProject > upstrems = se . diabol . jenkins . pipeline . util . ProjectUtil . getStartUpstreams ( projectC ) ; "<AssertPlaceHolder>" ; } getStartUpstreams ( hudson . model . AbstractProject ) { java . util . List < hudson . model . AbstractProject > upstreams = project . getUpstreamProjects ( ) ; if ( upstreams . isEmpty ( ) ) { return new java . util . ArrayList ( java . util . Collections . singleton ( project ) ) ; } else { return se . diabol . jenkins . pipeline . util . ProjectUtil . getStartUpstreams ( project , new java . util . ArrayList ( ) ) ; } } | org . junit . Assert . assertEquals ( 2 , upstrems . size ( ) ) |
testCase2 ( ) { java . lang . String s = "SELECT<sp>case<sp>when<sp>a<sp>><sp>0<sp>then<sp>'more'<sp>when<sp>a<sp><0<sp>then<sp>'less'<sp>else<sp>'0'<sp>end<sp>from<sp>dbo.test" ; int result = calculate ( s ) ; "<AssertPlaceHolder>" ; } calculate ( java . lang . String ) { org . sonar . plugins . tsql . antlr . AntlrContext result = org . sonar . plugins . tsql . helpers . AntlrUtils . getRequest ( s ) ; org . sonar . plugins . tsql . antlr . visitors . CComplexityVisitor vv = new org . sonar . plugins . tsql . antlr . visitors . CComplexityVisitor ( ) ; org . sonar . plugins . tsql . antlr . visitors . CustomTreeVisitor visitor = new org . sonar . plugins . tsql . antlr . visitors . CustomTreeVisitor ( vv ) ; visitor . apply ( result . getRoot ( ) ) ; return vv . getMeasure ( ) ; } | org . junit . Assert . assertEquals ( 3 , result ) |
testEvalVariable ( ) { org . nd4j . autodiff . samediff . SameDiff sameDiff = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . linalg . api . ndarray . INDArray ones = org . nd4j . linalg . factory . Nd4j . ones ( 4 ) ; org . nd4j . linalg . api . ndarray . INDArray twos = ones . add ( ones ) ; org . nd4j . autodiff . samediff . SDVariable inputOne = sameDiff . var ( "inputone" , ones ) ; org . nd4j . autodiff . samediff . SDVariable inputResult = inputOne . add ( "extravarname" , inputOne ) ; "<AssertPlaceHolder>" ; } eval ( ) { org . nd4j . autodiff . samediff . SameDiff exec = sameDiff . dup ( ) ; exec . defineFunction ( "output" , new org . nd4j . autodiff . samediff . SameDiff . SameDiffFunctionDefinition ( ) { @ org . nd4j . autodiff . samediff . Override public org . nd4j . autodiff . samediff . SDVariable [ ] define ( org . nd4j . autodiff . samediff . SameDiff sameDiff , java . util . Map < java . lang . String , org . nd4j . linalg . api . ndarray . INDArray > inputs , org . nd4j . autodiff . samediff . SDVariable [ ] variableInputs ) { return new org . nd4j . autodiff . samediff . SDVariable [ ] { org . nd4j . autodiff . samediff . SDVariable . this } ; } } ) ; org . nd4j . autodiff . samediff . SDVariable output = exec . invokeFunctionOn ( "output" , exec ) ; return output . getSameDiff ( ) . execAndEndResult ( ) ; } | org . junit . Assert . assertEquals ( twos , inputResult . eval ( ) ) |
testRemoveParameters ( ) { System . out . println ( "removeParameters" ) ; org . netbeans . modules . gradle . api . execute . GradleCommandLine . Parameter param = GradleCommandLine . Parameter . INIT_SCRIPT ; org . netbeans . modules . gradle . api . execute . GradleCommandLine instance = new org . netbeans . modules . gradle . api . execute . GradleCommandLine ( "--init-script" , "init.gradle" ) ; instance . removeParameters ( param ) ; "<AssertPlaceHolder>" ; } hasParameter ( java . lang . String ) { for ( org . netbeans . modules . websvc . jaxwsmodelapi . java . JavaParameter parameter : getParametersList ( ) ) { if ( paramName . equals ( parameter . getName ( ) ) ) { return true ; } } return false ; } | org . junit . Assert . assertFalse ( instance . hasParameter ( param ) ) |
testGetPartition_availablePartitionsChanged_butSelectedPartitionAvailable ( ) { com . taobao . metamorphosis . Message message = this . createDefaultMessage ( ) ; com . taobao . metamorphosis . cluster . Partition partition = this . selector . getPartition ( message . getTopic ( ) , java . util . Arrays . asList ( new com . taobao . metamorphosis . cluster . Partition ( "0-0" ) , new com . taobao . metamorphosis . cluster . Partition ( "1-0" ) , new com . taobao . metamorphosis . cluster . Partition ( "2-0" ) ) , message ) ; "<AssertPlaceHolder>" ; } getTopic ( ) { return topic ; } | org . junit . Assert . assertEquals ( new com . taobao . metamorphosis . cluster . Partition ( "0-0" ) , partition ) |
testPublishConfigChangesNotNull ( ) { com . google . gson . JsonObject requestJson = new com . google . gson . JsonObject ( ) ; com . sun . jersey . api . client . ClientResponse response = com . cognizant . devops . platformservice . rest . util . PlatformServiceUtil . publishConfigChanges ( "localhost" , 7474 , requestJson ) ; "<AssertPlaceHolder>" ; } publishConfigChanges ( java . lang . String , int , com . google . gson . JsonObject ) { com . sun . jersey . api . client . WebResource resource = com . sun . jersey . api . client . Client . create ( ) . resource ( ( ( ( ( "http://" + host ) + ":" ) + port ) + "/PlatformEngine/refreshAggregators" ) ) ; com . sun . jersey . api . client . ClientResponse response = resource . accept ( MediaType . APPLICATION_JSON ) . type ( MediaType . APPLICATION_JSON ) . entity ( requestJson . toString ( ) ) . post ( com . sun . jersey . api . client . ClientResponse . class ) ; return response ; } | org . junit . Assert . assertNotNull ( response ) |
getMeasurand_returnEnergyActiveImportRegister ( ) { java . lang . String expected = "Energy.Active.Import.Register" ; java . lang . String measurand = sampledValue . getMeasurand ( ) ; "<AssertPlaceHolder>" ; } getMeasurand ( ) { return measurand ; } | org . junit . Assert . assertThat ( measurand , org . hamcrest . CoreMatchers . equalTo ( expected ) ) |
testGetClosestPositionByTimeExact ( ) { initialize ( ) ; "<AssertPlaceHolder>" ; } getClosestPosition ( slash . common . type . CompactCalendar , long ) { return delegate . getClosestPosition ( time , threshold ) ; } | org . junit . Assert . assertEquals ( 1 , route . getClosestPosition ( b . getTime ( ) , 0 ) ) |
testAcceptValidParameter2 ( ) { final org . openspotlight . graph . query . console . ConsoleState state = new org . openspotlight . graph . query . console . ConsoleState ( null ) ; state . setInput ( "exit<sp>" ) ; "<AssertPlaceHolder>" ; } accept ( org . openspotlight . graph . query . console . ConsoleState ) { org . openspotlight . common . util . Assertions . checkNotNull ( "state" , state ) ; if ( ( ( state . getActiveCommand ( ) ) == null ) && ( state . getInput ( ) . trim ( ) . equals ( "display<sp>properties" ) ) ) { return true ; } return false ; } | org . junit . Assert . assertThat ( command . accept ( state ) , org . hamcrest . core . Is . is ( true ) ) |
fakir_can_build_you_a_customer_in_one_line ( ) { com . oneeyedmen . fakir . ExampleTest . Customer customer = com . oneeyedmen . fakir . Faker . fakeA ( com . oneeyedmen . fakir . ExampleTest . Customer . class ) ; "<AssertPlaceHolder>" ; } fakeA ( java . lang . Class ) { return com . oneeyedmen . fakir . Faker . fakeA ( type , com . oneeyedmen . fakir . Faker . DEFAULT_FACTORY ) ; } | org . junit . Assert . assertTrue ( ( customer instanceof com . oneeyedmen . fakir . ExampleTest . Customer ) ) |
shouldMajor ( ) { com . inventage . tools . versiontiger . internal . impl . MavenVersionImpl version = new com . inventage . tools . versiontiger . internal . impl . MavenVersionImpl ( "1.2.3-SNAPSHOT" , versionFactory ) ; int result = version . major ( ) ; "<AssertPlaceHolder>" ; } major ( ) { return gv . major ( ) ; } | org . junit . Assert . assertEquals ( 1 , result ) |
testProcess_invalidQuery ( ) { final java . lang . String query = "Check<sp>https://localhost:8985<sp>that<sp>lag" ; net . roboconf . agent . monitoring . internal . rest . RestHandler handler = new net . roboconf . agent . monitoring . internal . rest . RestHandler ( ) ; handler . setAgentId ( net . roboconf . agent . monitoring . internal . rest . RestHandlerTest . APP_NAME , net . roboconf . agent . monitoring . internal . rest . RestHandlerTest . SCOPED_INSTANCE_PATH ) ; handler . reset ( null , net . roboconf . agent . monitoring . internal . rest . RestHandlerTest . EVENT_NAME , query ) ; "<AssertPlaceHolder>" ; } process ( ) { net . roboconf . messaging . api . messages . from_agent_to_dm . MsgNotifAutonomic result = null ; java . lang . String response = null ; if ( ( this . url ) != null ) response = ( this . url . startsWith ( "https:" ) ) ? httpsQuery ( ) : httpQuery ( ) ; if ( response != null ) response = response . replace ( '{' , '<sp>' ) . replace ( '}' , '<sp>' ) . trim ( ) ; else response = "" ; java . util . HashMap < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; for ( java . lang . String s : response . split ( "\\n" ) ) { java . lang . String [ ] kv = s . split ( ":" ) ; if ( ( kv . length ) == 2 ) map . put ( kv [ 0 ] . replace ( "\"" , "<sp>" ) . trim ( ) , kv [ 1 ] ) ; else break ; } if ( map . isEmpty ( ) ) { this . logger . warning ( "The<sp>REST<sp>response<sp>could<sp>not<sp>be<sp>parsed." ) ; this . logger . finer ( ( "Received<sp>response:<sp>" + response ) ) ; } else if ( evalCondition ( map ) ) { result = new net . roboconf . messaging . api . messages . from_agent_to_dm . MsgNotifAutonomic ( this . applicationName , this . scopedInstancePath , this . eventId , response . toString ( ) ) ; } return result ; } | org . junit . Assert . assertNull ( handler . process ( ) ) |
testCount ( ) { org . apache . uima . collection . CollectionReader cr = org . apache . uima . fit . factory . CollectionReaderFactory . createReader ( ch . epfl . bbp . uima . cr . BioNLPGeniaEventsCollectionReader . class , BlueUima . PARAM_INPUT_DIRECTORY , ch . epfl . bbp . uima . cr . BioNLPGeniaEventsReaderTest . TEST_DIR ) ; int i = 0 ; while ( cr . hasNext ( ) ) { org . apache . uima . cas . CAS cas = org . apache . uima . util . CasCreationUtils . createCas ( cr . getProcessingResourceMetaData ( ) ) ; cr . getNext ( cas ) ; ch . epfl . bbp . uima . cr . BioNLPGeniaEventsReaderTest . LOG . debug ( ch . epfl . bbp . uima . typesystem . To . string ( ( "cas<sp>nr<sp>" + i ) , cas . getJCas ( ) ) ) ; i ++ ; } cr . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { for ( org . apache . uima . collection . CollectionReader reader : readers ) { reader . close ( ) ; } } | org . junit . Assert . assertEquals ( 3 , i ) |
assertThatRemovedThingIsNotReturnedByGetThings ( ) { org . eclipse . smarthome . core . thing . Thing thing = org . eclipse . smarthome . core . thing . binding . builder . ThingBuilder . create ( org . eclipse . smarthome . core . thing . factory . ManagedThingProviderOSGiTest . THING_TYPE_UID , org . eclipse . smarthome . core . thing . factory . ManagedThingProviderOSGiTest . THING1_ID ) . build ( ) ; managedThingProvider . add ( thing ) ; managedThingProvider . remove ( thing . getUID ( ) ) ; java . util . Collection < org . eclipse . smarthome . core . thing . Thing > things = managedThingProvider . getAll ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return itemRegistry . getAll ( ) . size ( ) ; } | org . junit . Assert . assertThat ( things . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testRefereesInstance ( ) { System . out . println ( "referees-instance" ) ; java . lang . String query = "select<sp>referees(heap.findObject(1684166976))" ; long [ ] refereesTest = new long [ ] { 1684166992 } ; final java . util . List < java . lang . Long > referees = new java . util . ArrayList < java . lang . Long > ( ) ; instance . executeQuery ( query , new org . netbeans . modules . profiler . oql . engine . api . OQLEngine . ObjectVisitor ( ) { public boolean visit ( java . lang . Object o ) { referees . add ( ( ( org . netbeans . lib . profiler . heap . Instance ) ( o ) ) . getInstanceId ( ) ) ; return false ; } } ) ; "<AssertPlaceHolder>" ; for ( long referee : refereesTest ) { if ( ! ( referees . contains ( referee ) ) ) org . junit . Assert . fail ( ) ; } } size ( ) { return listItems . size ( ) ; } | org . junit . Assert . assertEquals ( refereesTest . length , referees . size ( ) ) |
testBackslashEscaping2 ( ) { final java . lang . String code = "" + ( ( ( "<sp>,<sp>,<sp>\n" + "<sp>\t<sp>,<sp>,<sp>\n" ) + "<sp>//<sp>,<sp>/,<sp>,<sp>/,\n" ) + "" ) ; final java . lang . String [ ] [ ] res = new java . lang . String [ ] [ ] { new java . lang . String [ ] { "<sp>" , "<sp>" , "<sp>" } , new java . lang . String [ ] { "<sp>\t<sp>" , "<sp>" , "<sp>" } , new java . lang . String [ ] { "<sp>/<sp>" , "<sp>,<sp>" , "<sp>," } } ; final org . apache . commons . csv . CSVFormat format = org . apache . commons . csv . CSVFormat . newFormat ( ',' ) . withRecordSeparator ( org . apache . commons . csv . Constants . CRLF ) . withEscape ( '/' ) . withIgnoreEmptyLines ( ) ; try ( final org . apache . commons . csv . CSVParser parser = org . apache . commons . csv . CSVParser . parse ( code , format ) ) { final java . util . List < org . apache . commons . csv . CSVRecord > records = parser . getRecords ( ) ; "<AssertPlaceHolder>" ; org . apache . commons . csv . Utils . compare ( "" , res , records ) ; } } size ( ) { return values . length ; } | org . junit . Assert . assertTrue ( ( ( records . size ( ) ) > 0 ) ) |
testSerial ( ) { org . apache . commons . math4 . linear . ArrayFieldVector < org . apache . commons . math4 . fraction . Fraction > v = new org . apache . commons . math4 . linear . ArrayFieldVector ( vec1 ) ; "<AssertPlaceHolder>" ; } serializeAndRecover ( java . lang . Object ) { try { java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream so = new java . io . ObjectOutputStream ( bos ) ; so . writeObject ( o ) ; java . io . ByteArrayInputStream bis = new java . io . ByteArrayInputStream ( bos . toByteArray ( ) ) ; java . io . ObjectInputStream si = new java . io . ObjectInputStream ( bis ) ; return si . readObject ( ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } } | org . junit . Assert . assertEquals ( v , org . apache . commons . math4 . TestUtils . serializeAndRecover ( v ) ) |
testS2v ( ) { final byte [ ] macKey = new byte [ ] { ( ( byte ) ( 255 ) ) , ( ( byte ) ( 254 ) ) , ( ( byte ) ( 253 ) ) , ( ( byte ) ( 252 ) ) , ( ( byte ) ( 251 ) ) , ( ( byte ) ( 250 ) ) , ( ( byte ) ( 249 ) ) , ( ( byte ) ( 248 ) ) , ( ( byte ) ( 247 ) ) , ( ( byte ) ( 246 ) ) , ( ( byte ) ( 245 ) ) , ( ( byte ) ( 244 ) ) , ( ( byte ) ( 243 ) ) , ( ( byte ) ( 242 ) ) , ( ( byte ) ( 241 ) ) , ( ( byte ) ( 240 ) ) } ; final byte [ ] ad = new byte [ ] { ( ( byte ) ( 16 ) ) , ( ( byte ) ( 17 ) ) , ( ( byte ) ( 18 ) ) , ( ( byte ) ( 19 ) ) , ( ( byte ) ( 20 ) ) , ( ( byte ) ( 21 ) ) , ( ( byte ) ( 22 ) ) , ( ( byte ) ( 23 ) ) , ( ( byte ) ( 24 ) ) , ( ( byte ) ( 25 ) ) , ( ( byte ) ( 26 ) ) , ( ( byte ) ( 27 ) ) , ( ( byte ) ( 28 ) ) , ( ( byte ) ( 29 ) ) , ( ( byte ) ( 30 ) ) , ( ( byte ) ( 31 ) ) , ( ( byte ) ( 32 ) ) , ( ( byte ) ( 33 ) ) , ( ( byte ) ( 34 ) ) , ( ( byte ) ( 35 ) ) , ( ( byte ) ( 36 ) ) , ( ( byte ) ( 37 ) ) , ( ( byte ) ( 38 ) ) , ( ( byte ) ( 39 ) ) } ; final byte [ ] plaintext = new byte [ ] { ( ( byte ) ( 17 ) ) , ( ( byte ) ( 34 ) ) , ( ( byte ) ( 51 ) ) , ( ( byte ) ( 68 ) ) , ( ( byte ) ( 85 ) ) , ( ( byte ) ( 102 ) ) , ( ( byte ) ( 119 ) ) , ( ( byte ) ( 136 ) ) , ( ( byte ) ( 153 ) ) , ( ( byte ) ( 170 ) ) , ( ( byte ) ( 187 ) ) , ( ( byte ) ( 204 ) ) , ( ( byte ) ( 221 ) ) , ( ( byte ) ( 238 ) ) } ; final byte [ ] expected = new byte [ ] { ( ( byte ) ( 133 ) ) , ( ( byte ) ( 99 ) ) , ( ( byte ) ( 45 ) ) , ( ( byte ) ( 7 ) ) , ( ( byte ) ( 198 ) ) , ( ( byte ) ( 232 ) ) , ( ( byte ) ( 243 ) ) , ( ( byte ) ( 127 ) ) , ( ( byte ) ( 149 ) ) , ( ( byte ) ( 10 ) ) , ( ( byte ) ( 205 ) ) , ( ( byte ) ( 50 ) ) , ( ( byte ) ( 10 ) ) , ( ( byte ) ( 46 ) ) , ( ( byte ) ( 204 ) ) , ( ( byte ) ( 147 ) ) } ; final byte [ ] result = new org . cryptomator . siv . SivMode ( ) . s2v ( macKey , plaintext , ad ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertArrayEquals ( expected , result ) |
shouldReadACommandLogEntry ( ) { org . neo4j . kernel . impl . transaction . log . entry . LogEntryVersion version = LogEntryVersion . CURRENT ; org . neo4j . kernel . impl . transaction . command . Command . NodeCommand nodeCommand = new org . neo4j . kernel . impl . transaction . command . Command . NodeCommand ( new org . neo4j . kernel . impl . store . record . NodeRecord ( 11 ) , new org . neo4j . kernel . impl . store . record . NodeRecord ( 11 ) ) ; final org . neo4j . kernel . impl . transaction . log . entry . LogEntryCommand command = new org . neo4j . kernel . impl . transaction . log . entry . LogEntryCommand ( version , nodeCommand ) ; final org . neo4j . kernel . impl . transaction . log . InMemoryClosableChannel channel = new org . neo4j . kernel . impl . transaction . log . InMemoryClosableChannel ( ) ; channel . put ( version . byteCode ( ) ) ; channel . put ( LogEntryByteCodes . COMMAND ) ; nodeCommand . serialize ( channel ) ; final org . neo4j . kernel . impl . transaction . log . entry . LogEntry logEntry = logEntryReader . readLogEntry ( channel ) ; "<AssertPlaceHolder>" ; } readLogEntry ( SOURCE extends org . neo4j . kernel . impl . transaction . log . ReadableClosablePositionAwareChannel ) { try { org . neo4j . kernel . impl . transaction . log . LogPositionMarker positionMarker = new org . neo4j . kernel . impl . transaction . log . LogPositionMarker ( ) ; long skipped = 0 ; while ( true ) { channel . getCurrentPosition ( positionMarker ) ; byte versionCode = channel . get ( ) ; byte typeCode = channel . get ( ) ; org . neo4j . kernel . impl . transaction . log . entry . LogEntryVersion version = null ; org . neo4j . kernel . impl . transaction . log . entry . LogEntryParser < org . neo4j . kernel . impl . transaction . log . entry . LogEntry > entryReader ; org . neo4j . kernel . impl . transaction . log . entry . LogEntry entry ; try { version = org . neo4j . kernel . impl . transaction . log . entry . VersionAwareLogEntryReader . byVersion ( versionCode ) ; entryReader = version . entryParser ( typeCode ) ; entry = entryReader . parse ( version , channel , positionMarker , commandReaderFactory ) ; if ( ( entry != null ) && ( skipped > 0 ) ) { if ( ! ( org . neo4j . kernel . impl . transaction . log . entry . LogEntrySanity . logEntryMakesSense ( entry ) ) ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( ( ( "Log<sp>entry<sp>" + entry ) + "<sp>which<sp>was<sp>read<sp>after<sp>" ) + "a<sp>bad<sp>section<sp>of<sp>" ) + skipped ) + "<sp>bytes<sp>was<sp>read<sp>successfully,<sp>but<sp>" ) + "its<sp>contents<sp>is<sp>unrealistic,<sp>so<sp>treating<sp>as<sp>part<sp>of<sp>bad<sp>section" ) ) ; } invalidLogEntryHandler . bytesSkipped ( skipped ) ; skipped = 0 ; } } catch ( org . neo4j . storageengine . api . ReadPastEndException e ) { throw e ; } catch ( java . lang . Exception e ) { org . neo4j . kernel . impl . transaction . log . LogPosition position = positionMarker . newPosition ( ) ; e = withMessage ( e , ( ( ( ( ( e . getMessage ( ) ) + ".<sp>At<sp>position<sp>" ) + position ) + "<sp>and<sp>entry<sp>version<sp>" ) + version ) ) ; if ( ( channelSupportsPositioning ( channel ) ) && ( invalidLogEntryHandler . handleInvalidEntry ( e , position ) ) ) { ( ( org . neo4j . kernel . impl . transaction . log . PositionableChannel ) ( channel ) ) . setCurrentPosition ( ( ( positionMarker . getByteOffset ( ) ) + 1 ) ) ; skipped ++ ; continue ; } throwIfInstanceOf ( e , org . neo4j . kernel . impl . transaction . log . entry . UnsupportedLogVersionException . class ) ; throw new java . io . IOException ( e ) ; } if ( ! ( entryReader . skip ( ) ) ) { return entry ; } } } catch ( org . neo4j . storageengine . api . ReadPastEndException e ) { return null ; } } | org . junit . Assert . assertEquals ( command , logEntry ) |
testFull ( ) { when ( mockFactory . createItem ( anyString ( ) , anyString ( ) ) ) . thenReturn ( mockItem ) ; org . eclipse . smarthome . core . items . Item res = itemBuilderFactory . newItemBuilder ( "String" , "test" ) . withCategory ( "category" ) . withGroups ( java . util . Arrays . asList ( "a" , "b" ) ) . withLabel ( "label" ) . build ( ) ; "<AssertPlaceHolder>" ; verify ( mockFactory ) . createItem ( eq ( "String" ) , eq ( "test" ) ) ; verify ( mockItem ) . setCategory ( eq ( "category" ) ) ; verify ( mockItem ) . addGroupNames ( eq ( java . util . Arrays . asList ( "a" , "b" ) ) ) ; verify ( mockItem ) . setLabel ( eq ( "label" ) ) ; } build ( ) { return config ; } | org . junit . Assert . assertSame ( mockItem , res ) |
getCommitHistoryWhenSkipIsNotZeroAndLimitIsIntegerMax_shouldReturnTailCommits ( ) { java . lang . String branch = "orphan_branch" ; writeSomethingToCache ( ) ; org . eclipse . jgit . revwalk . RevCommit commit1 = commitToBranch ( branch ) ; writeSomethingToCache ( ) ; org . eclipse . jgit . revwalk . RevCommit commit2 = commitToBranch ( branch ) ; writeSomethingToCache ( ) ; org . eclipse . jgit . revwalk . RevCommit commit3 = commitToBranch ( branch ) ; writeSomethingToCache ( ) ; org . eclipse . jgit . revwalk . RevCommit commit4 = commitToBranch ( branch ) ; java . util . List < org . eclipse . jgit . revwalk . RevCommit > expected = java . util . Arrays . asList ( commit3 , commit2 , commit1 ) ; java . util . List < org . eclipse . jgit . revwalk . RevCommit > actual = com . beijunyi . parallelgit . utils . CommitUtils . getHistory ( commit4 , 1 , Integer . MAX_VALUE , repo . newObjectReader ( ) ) ; "<AssertPlaceHolder>" ; } getHistory ( com . beijunyi . parallelgit . utils . AnyObjectId , int , int , com . beijunyi . parallelgit . utils . ObjectReader ) { return com . beijunyi . parallelgit . utils . CommitUtils . getHistory ( start , skip , limit , null , reader ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testGetLocalName ( ) { final org . slc . sli . modeling . xsd . XsdAttributeName attr = XsdAttributeName . BASE ; "<AssertPlaceHolder>" ; } getLocalName ( ) { return localName ; } | org . junit . Assert . assertEquals ( XsdAttributeName . BASE . getLocalName ( ) , attr . getLocalName ( ) ) |
equalsReflexiveTest ( ) { System . out . print ( "-><sp>Reflexive<sp>equals<sp>-<sp>" ) ; final java . lang . String name = "Name" ; final java . lang . String email = "Email" ; final java . lang . String phone = "Phone" ; final ua . com . alexcoffee . model . user . User user = ua . com . alexcoffee . model . user . User . getBuilder ( ) . build ( ) ; user . setName ( name ) ; user . setEmail ( email ) ; user . setPhone ( phone ) ; user . setRole ( UserRole . ADMIN ) ; "<AssertPlaceHolder>" ; System . out . println ( "OK!" ) ; } equals ( java . lang . Object ) { boolean result = super . equals ( object ) ; if ( result ) { final ua . com . alexcoffee . model . user . User user = ( ( ua . com . alexcoffee . model . user . User ) ( object ) ) ; result = ( ( ( ( this . name . equals ( user . name ) ) && ( this . username . equals ( user . username ) ) ) && ( this . email . equals ( user . email ) ) ) && ( this . phone . equals ( user . phone ) ) ) && ( this . role . equals ( user . role ) ) ; } return result ; } | org . junit . Assert . assertTrue ( user . equals ( user ) ) |
inject_A$Class ( ) { com . github . seratch . taskun . inject . S2TaskunInjector target = new com . github . seratch . taskun . inject . S2TaskunInjector ( ) ; java . lang . Class < ? > clazz = com . github . seratch . taskun . scheduler . config . TaskunConfig . class ; java . lang . Object actual = target . inject ( clazz ) ; "<AssertPlaceHolder>" ; } inject ( java . lang . Class ) { return ( ( T ) ( s2Container . getComponent ( clazz ) ) ) ; } | org . junit . Assert . assertNotNull ( actual ) |
testGetIssuesForEmptyLabel ( ) { java . util . List < org . libreplan . importers . jira . IssueDTO > issues = org . libreplan . importers . JiraRESTClient . getIssues ( properties . getProperty ( "url" ) , properties . getProperty ( "username" ) , properties . getProperty ( "password" ) , JiraRESTClient . PATH_SEARCH , "" ) ; "<AssertPlaceHolder>" ; } getIssues ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { org . apache . cxf . jaxrs . client . WebClient client = org . libreplan . importers . JiraRESTClient . createClient ( url ) ; org . libreplan . importers . JiraRESTClient . checkAutherization ( client , username , password ) ; client . back ( true ) ; client . path ( path ) ; if ( ! ( query . isEmpty ( ) ) ) { client . query ( "jql" , query ) ; } client . query ( "maxResults" , org . libreplan . importers . JiraRESTClient . MAX_RESULTS ) ; client . query ( "fields" , org . apache . commons . lang3 . StringUtils . deleteWhitespace ( org . libreplan . importers . JiraRESTClient . FIELDS_TO_INCLUDE_IN_RESPONSE ) ) ; org . libreplan . importers . jira . SearchResultDTO searchResult = client . get ( org . libreplan . importers . jira . SearchResultDTO . class ) ; return searchResult . getIssues ( ) ; } | org . junit . Assert . assertTrue ( ( ( issues . size ( ) ) > 0 ) ) |
GetPublishStatus ( ) { com . smartsheet . api . Smartsheet ss = com . smartsheet . api . sdk_test . HelperFunctions . SetupClient ( "Get<sp>Sight<sp>Publish<sp>Status" ) ; try { com . smartsheet . api . sdk_test . SightPublish publish = ss . sightResources ( ) . getPublishStatus ( 812L ) ; "<AssertPlaceHolder>" ; } catch ( com . smartsheet . api . SmartsheetException ex ) { com . smartsheet . api . sdk_test . HelperFunctions . ExceptionMessage ( ex . getMessage ( ) , ex . getCause ( ) ) ; } } getReadOnlyFullEnabled ( ) { return readOnlyFullEnabled ; } | org . junit . Assert . assertEquals ( publish . getReadOnlyFullEnabled ( ) , true ) |
testNoSuppressionSomethingElseS ( ) { net . sourceforge . pmd . Report rpt = new net . sourceforge . pmd . Report ( ) ; runTestFromString ( net . sourceforge . pmd . lang . apex . SuppressWarningsTest . TEST11 , new net . sourceforge . pmd . lang . apex . FooRule ( ) , rpt , net . sourceforge . pmd . lang . LanguageRegistry . getLanguage ( ApexLanguageModule . NAME ) . getDefaultVersion ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return rules . size ( ) ; } | org . junit . Assert . assertEquals ( 2 , rpt . size ( ) ) |
toRequestFailureTest ( ) { final org . opendaylight . controller . cluster . access . concepts . RequestException exception = new org . opendaylight . controller . cluster . access . commands . DeadTransactionException ( com . google . common . collect . ImmutableRangeSet . of ( ) ) ; final org . opendaylight . controller . cluster . access . commands . ConnectClientFailure failure = org . opendaylight . controller . cluster . access . commands . ConnectClientRequestTest . OBJECT . toRequestFailure ( exception ) ; "<AssertPlaceHolder>" ; } toRequestFailure ( org . opendaylight . controller . cluster . access . concepts . RequestException ) { return new org . opendaylight . controller . cluster . access . commands . TransactionFailure ( org . opendaylight . controller . cluster . access . commands . TransactionRequest . getTarget ( ) , org . opendaylight . controller . cluster . access . commands . TransactionRequest . getSequence ( ) , cause ) ; } | org . junit . Assert . assertNotNull ( failure ) |
deleteInvoiceLine ( ) { de . metas . adempiere . test . POTest . recordGenericExpectations ( ilPO , 10 ) ; new mockit . Expectations ( ) { { de . metas . util . Services . get ( org . adempiere . invoice . service . IInvoiceDAO . class ) ; result = invoicePA ; invoicePA . retrieveReferringLines ( POTest . CTX , 10 , POTest . TRX_NAME ) ; result = java . util . Collections . singletonList ( referringIlPO ) ; } } ; java . lang . String result = new de . metas . adempiere . modelvalidator . InvoiceLine ( ) . modelChange ( ilPO , ModelValidator . TYPE_BEFORE_DELETE ) ; "<AssertPlaceHolder>" ; new mockit . Verifications ( ) { { referringIlPO . setRef_InvoiceLine_ID ( 0 ) ; referringIlPO . saveEx ( ) ; } } ; } modelChange ( org . compiere . model . PO , int ) { return null ; } | org . junit . Assert . assertNull ( result ) |
whenTrueFiresWhenFalseChangesToTrue ( ) { final org . tessell . tests . model . dsl . BooleanProperty b = booleanProperty ( "b" , false ) ; final org . tessell . widgets . StubWidget w = new org . tessell . widgets . StubWidget ( ) ; binder . when ( b ) . is ( true ) . set ( "c" ) . on ( w ) ; b . set ( true ) ; "<AssertPlaceHolder>" ; } hasStyle ( java . lang . String ) { return new org . tessell . testing . FeatureMatcher < org . tessell . gwt . user . client . ui . HasCss , java . util . List < java . lang . String > > ( org . hamcrest . CoreMatchers . hasItem ( className ) , "style<sp>is" , "style" ) { protected java . util . List < java . lang . String > featureValueOf ( org . tessell . gwt . user . client . ui . HasCss actual ) { return java . util . Arrays . asList ( actual . getStyleName ( ) . split ( "<sp>" ) ) ; } } ; } | org . junit . Assert . assertThat ( w , hasStyle ( "c" ) ) |
testUpdate_PhoneList ( ) { com . jmethods . catatumbo . entities . PhoneList entity = com . jmethods . catatumbo . entities . PhoneList . getSample1 ( ) ; entity = com . jmethods . catatumbo . EmbeddedCollectionTest . em . insert ( entity ) ; entity = com . jmethods . catatumbo . EmbeddedCollectionTest . em . load ( com . jmethods . catatumbo . entities . PhoneList . class , entity . getId ( ) ) ; entity . getLandLineNumbers ( ) . add ( com . jmethods . catatumbo . entities . PhoneNumber . getSample1 ( ) ) ; entity = com . jmethods . catatumbo . EmbeddedCollectionTest . em . update ( entity ) ; com . jmethods . catatumbo . entities . PhoneList loadedEntity = com . jmethods . catatumbo . EmbeddedCollectionTest . em . load ( com . jmethods . catatumbo . entities . PhoneList . class , entity . getId ( ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == null ) { return false ; } if ( ! ( obj instanceof com . jmethods . catatumbo . GeoLocation ) ) { return false ; } com . jmethods . catatumbo . GeoLocation that = ( ( com . jmethods . catatumbo . GeoLocation ) ( obj ) ) ; return ( ( this . latitude ) == ( that . latitude ) ) && ( ( this . longitude ) == ( that . longitude ) ) ; } | org . junit . Assert . assertTrue ( entity . equals ( loadedEntity ) ) |
testGetNativeDataTypeClass ( ) { org . pentaho . di . core . plugins . PluginRegistry . addPluginType ( org . pentaho . di . core . row . value . ValueMetaPluginType . getInstance ( ) ) ; org . pentaho . di . core . plugins . PluginRegistry . init ( ) ; java . lang . String [ ] valueMetaNames = org . pentaho . di . core . row . value . ValueMetaFactory . getValueMetaNames ( ) ; for ( int i = 0 ; i < ( valueMetaNames . length ) ; i ++ ) { int vmId = org . pentaho . di . core . row . value . ValueMetaFactory . getIdForValueMeta ( valueMetaNames [ i ] ) ; org . pentaho . di . core . row . ValueMeta vm = new org . pentaho . di . core . row . ValueMeta ( "" , vmId ) ; org . pentaho . di . core . row . ValueMetaInterface vmi = org . pentaho . di . core . row . value . ValueMetaFactory . createValueMeta ( vmId ) ; "<AssertPlaceHolder>" ; } } getNativeDataTypeClass ( ) { if ( ( nativeType ) == null ) { try { nativeType = org . pentaho . di . core . row . value . ValueMetaFactory . createValueMeta ( getType ( ) ) ; } catch ( org . pentaho . di . core . exception . KettlePluginException e ) { throw new org . pentaho . di . core . exception . KettleValueException ( e ) ; } } return nativeType . getNativeDataTypeClass ( ) ; } | org . junit . Assert . assertTrue ( vm . getNativeDataTypeClass ( ) . equals ( vmi . getNativeDataTypeClass ( ) ) ) |
copyStringValidOutputStreamPosBufSz ( ) { java . lang . String probe = "A<sp>string<sp>⍅ï" ; java . io . ByteArrayOutputStream OutputStream = new org . apache . maven . shared . utils . io . IOUtilTest . DontCloseByteArrayOutputStream ( ) ; org . apache . maven . shared . utils . io . IOUtil . copy ( probe , OutputStream , 1 ) ; "<AssertPlaceHolder>" ; } copy ( java . io . InputStream , java . io . OutputStream , int ) { final byte [ ] buffer = new byte [ bufferSize ] ; int n ; while ( ( - 1 ) != ( n = input . read ( buffer ) ) ) { output . write ( buffer , 0 , n ) ; } } | org . junit . Assert . assertThat ( OutputStream . toByteArray ( ) , org . hamcrest . CoreMatchers . is ( probe . getBytes ( ) ) ) |
testIDLImportReferenceProxy ( ) { java . io . File file = new java . io . File ( com . baidu . bjf . remoting . protobuf . idlgenerate . EnumIDLGeneratorTest . class . getResource ( "addressbook.proto" ) . getFile ( ) ) ; java . util . Map < java . lang . String , com . baidu . bjf . remoting . protobuf . IDLProxyObject > map = com . baidu . bjf . remoting . protobuf . ProtobufIDLProxy . create ( file , false ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 2 , map . size ( ) ) |
collectMixedException ( ) { io . trane . future . Promise < java . lang . Integer > p1 = io . trane . future . Promise . apply ( ) ; io . trane . future . Promise < java . lang . Integer > p2 = io . trane . future . Promise . apply ( ) ; io . trane . future . Future < java . util . List < java . lang . Integer > > future = io . trane . future . Future . collect ( java . util . Arrays . asList ( p1 , p2 , io . trane . future . Future . value ( 3 ) ) ) ; p1 . setValue ( 1 ) ; p2 . setException ( ex ) ; java . lang . Integer [ ] expected = new java . lang . Integer [ ] { 1 , 2 , 3 } ; "<AssertPlaceHolder>" ; } get ( io . trane . future . Future ) { return future . get ( Duration . ZERO ) ; } | org . junit . Assert . assertArrayEquals ( expected , get ( future ) . toArray ( ) ) |
test2502355_zoomInDomain ( ) { org . jfree . data . xy . DefaultXYDataset dataset = new org . jfree . data . xy . DefaultXYDataset ( ) ; org . jfree . chart . JFreeChart chart = org . jfree . chart . ChartFactory . createXYLineChart ( "TestChart" , "X" , "Y" , dataset , PlotOrientation . VERTICAL , false , false , false ) ; org . jfree . chart . plot . XYPlot plot = ( ( org . jfree . chart . plot . XYPlot ) ( chart . getPlot ( ) ) ) ; plot . setDomainAxis ( 1 , new org . jfree . chart . axis . NumberAxis ( "X2" ) ) ; org . jfree . chart . ChartPanel panel = new org . jfree . chart . ChartPanel ( chart ) ; chart . addChangeListener ( this ) ; this . chartChangeEvents . clear ( ) ; panel . zoomInDomain ( 1.0 , 2.0 ) ; "<AssertPlaceHolder>" ; } size ( ) { return queue . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , this . chartChangeEvents . size ( ) ) |
reserveConnection_dataSourceSpecified_shouldReturnValidConnection ( ) { java . sql . Connection connection = org . easymock . EasyMock . createMock ( java . sql . Connection . class ) ; connection . setAutoCommit ( false ) ; org . easymock . EasyMock . expectLastCall ( ) ; javax . sql . DataSource ds = org . easymock . EasyMock . createMock ( javax . sql . DataSource . class ) ; ds . getConnection ( ) ; org . easymock . EasyMock . expectLastCall ( ) . andReturn ( connection ) ; org . easymock . EasyMock . replay ( connection , ds ) ; com . vaadin . v7 . data . util . sqlcontainer . connection . J2EEConnectionPool pool = new com . vaadin . v7 . data . util . sqlcontainer . connection . J2EEConnectionPool ( ds ) ; java . sql . Connection c = pool . reserveConnection ( ) ; "<AssertPlaceHolder>" ; org . easymock . EasyMock . verify ( connection , ds ) ; } reserveConnection ( ) { if ( ! ( initialized ) ) { initializeConnections ( ) ; } if ( availableConnections . isEmpty ( ) ) { if ( ( reservedConnections . size ( ) ) < ( maxConnections ) ) { availableConnections . add ( createConnection ( ) ) ; } else { throw new java . sql . SQLException ( "Connection<sp>limit<sp>has<sp>been<sp>reached." ) ; } } java . sql . Connection c = availableConnections . iterator ( ) . next ( ) ; availableConnections . remove ( c ) ; reservedConnections . add ( c ) ; return c ; } | org . junit . Assert . assertEquals ( connection , c ) |
getsWithQueryParametersFrom1_0OriginsViaExplicitProxiesCanNotBeCacheableEvenWithExpires ( ) { policy = new org . apache . hc . client5 . http . impl . cache . ResponseCachingPolicy ( 0 , true , true , true ) ; request = new org . apache . hc . core5 . http . message . BasicHttpRequest ( "GET" , "/foo?s=bar" ) ; response . setHeader ( "Date" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( now ) ) ; response . setHeader ( "Expires" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( tenSecondsFromNow ) ) ; response . setHeader ( "Via" , "HTTP/1.0<sp>someproxy" ) ; "<AssertPlaceHolder>" ; } isResponseCacheable ( org . apache . hc . core5 . http . HttpRequest , org . apache . hc . core5 . http . HttpResponse ) { final org . apache . hc . core5 . http . ProtocolVersion version = ( ( request . getVersion ( ) ) != null ) ? request . getVersion ( ) : org . apache . hc . core5 . http . HttpVersion . DEFAULT ; if ( ( version . compareToVersion ( HttpVersion . HTTP_1_1 ) ) > 0 ) { if ( log . isDebugEnabled ( ) ) { log . debug ( ( ( "Protocol<sp>version<sp>" + version ) + "<sp>is<sp>non-cacheable" ) ) ; } return false ; } final java . lang . String [ ] uncacheableRequestDirectives = new java . lang . String [ ] { org . apache . hc . client5 . http . cache . HeaderConstants . CACHE_CONTROL_NO_STORE } ; if ( hasCacheControlParameterFrom ( request , uncacheableRequestDirectives ) ) { log . debug ( "Response<sp>is<sp>explcitily<sp>non-cacheable<sp>per<sp>cache<sp>control<sp>directive" ) ; return false ; } if ( request . getRequestUri ( ) . contains ( "?" ) ) { if ( ( neverCache1_0ResponsesWithQueryString ) && ( from1_0Origin ( response ) ) ) { log . debug ( "Response<sp>is<sp>not<sp>cacheable<sp>as<sp>it<sp>had<sp>a<sp>query<sp>string" ) ; return false ; } else if ( ! ( isExplicitlyCacheable ( response ) ) ) { log . debug ( "Response<sp>is<sp>not<sp>cacheable<sp>as<sp>it<sp>is<sp>missing<sp>explicit<sp>caching<sp>headers" ) ; return false ; } } if ( expiresHeaderLessOrEqualToDateHeaderAndNoCacheControl ( response ) ) { log . debug ( "Expires<sp>header<sp>less<sp>or<sp>equal<sp>to<sp>Date<sp>header<sp>and<sp>no<sp>cache<sp>control<sp>directives" ) ; return false ; } if ( sharedCache ) { if ( ( ( request . countHeaders ( HeaderConstants . AUTHORIZATION ) ) > 0 ) && ( ! ( hasCacheControlParameterFrom ( response , org . apache . hc . client5 . http . impl . cache . ResponseCachingPolicy . AUTH_CACHEABLE_PARAMS ) ) ) ) { log . debug ( "Request<sp>contains<sp>private<sp>credentials" ) ; return false ; } } final java . lang . String method = request . getMethod ( ) ; return isResponseCacheable ( method , response ) ; } | org . junit . Assert . assertFalse ( policy . isResponseCacheable ( request , response ) ) |
testGetMissingRequiredPropertiesWithDefaultPropertiesAndDefault ( ) { com . google . cloud . tools . eclipse . dataflow . core . launcher . options . PipelineOptionsProperty property = new com . google . cloud . tools . eclipse . dataflow . core . launcher . options . PipelineOptionsProperty ( com . google . cloud . tools . eclipse . dataflow . core . preferences . DataflowPreferences . PROJECT_PROPERTY , false , true , java . util . Collections . < java . lang . String > emptySet ( ) , null ) ; com . google . cloud . tools . eclipse . dataflow . core . launcher . options . PipelineOptionsHierarchy opts = com . google . cloud . tools . eclipse . dataflow . core . launcher . PipelineLaunchConfigurationTest . options ( property ) ; com . google . cloud . tools . eclipse . dataflow . core . launcher . PipelineLaunchConfiguration pipelineLaunchConfig = new com . google . cloud . tools . eclipse . dataflow . core . launcher . PipelineLaunchConfiguration ( majorVersion ) ; pipelineLaunchConfig . setUseDefaultLaunchOptions ( true ) ; pipelineLaunchConfig . setUserOptionsName ( "myType" ) ; com . google . cloud . tools . eclipse . dataflow . core . preferences . DataflowPreferences prefs = com . google . cloud . tools . eclipse . dataflow . core . launcher . PipelineLaunchConfigurationTest . mapPrefs ( com . google . common . collect . ImmutableMap . of ( DataflowPreferences . PROJECT_PROPERTY , "bar" ) ) ; com . google . cloud . tools . eclipse . dataflow . core . launcher . PipelineLaunchConfiguration . MissingRequiredProperties missingProperties = pipelineLaunchConfig . getMissingRequiredProperties ( opts , prefs ) ; "<AssertPlaceHolder>" ; } getMissingProperties ( ) { return missingProperties ; } | org . junit . Assert . assertTrue ( missingProperties . getMissingProperties ( ) . isEmpty ( ) ) |
test_2 ( ) { org . finra . herd . swaggergen . ExampleXmlGenerator exampleXmlGenerator = new org . finra . herd . swaggergen . ExampleXmlGenerator ( LOG , org . finra . herd . swaggergen . test . exampleXmlGenerator . DatetimeCase . class ) ; java . lang . String exampleXml = exampleXmlGenerator . getExampleXml ( ) ; java . util . regex . Pattern pattern = java . util . regex . Pattern . compile ( "<xmlGregorianCalendar>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}(.+?)</xmlGregorianCalendar>" ) ; java . util . regex . Matcher matcher = pattern . matcher ( exampleXml ) ; "<AssertPlaceHolder>" ; } getExampleXml ( ) { return exampleXml ; } | org . junit . Assert . assertTrue ( matcher . find ( ) ) |
toOrgJSONObject ( ) { org . json . JSONObject orig = new org . json . JSONObject ( "{\"a\":{\"b\":1}}" ) ; org . json . JSONObject actual = org . everit . json . schema . loader . SchemaLoader . toOrgJSONObject ( ( ( org . everit . json . schema . loader . JsonObject ) ( org . everit . json . schema . loader . JsonValue . of ( orig ) ) ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "false" ; } | org . junit . Assert . assertEquals ( orig . toString ( ) , actual . toString ( ) ) |
testInformLeaderLost ( ) { broadcaster . informLeaderLost ( io . vlingo . wire . node . Id . of ( 3 ) , false ) ; "<AssertPlaceHolder>" ; } informLeaderLost ( io . vlingo . wire . node . Id , boolean ) { } | org . junit . Assert . assertEquals ( 1 , application . informLeaderLost . get ( ) ) |
testGetWidth ( ) { System . out . println ( "getWidth" ) ; java . awt . FontMetrics fm = g . getFontMetrics ( ) ; final java . lang . String title = "MyTitle" ; mudmap2 . backend . legend . LegendEntryTitle instance = new mudmap2 . backend . legend . LegendEntryTitle ( title ) ; int expResult = fm . stringWidth ( title ) ; int result = instance . getWidth ( g ) ; "<AssertPlaceHolder>" ; } getWidth ( java . awt . Graphics ) { return mudmap2 . backend . legend . LegendEntrySeparator . WIDTH_REQUEST ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testSelectEmptyIn ( ) { createArtistsDataSet ( ) ; org . apache . cayenne . query . SelectQuery < org . apache . cayenne . testdo . testmap . Artist > query = new org . apache . cayenne . query . SelectQuery ( org . apache . cayenne . testdo . testmap . Artist . class ) ; org . apache . cayenne . exp . Expression qual = org . apache . cayenne . exp . ExpressionFactory . inExp ( "artistName" ) ; query . setQualifier ( qual ) ; java . util . List < ? > objects = context . performQuery ( query ) ; "<AssertPlaceHolder>" ; } size ( ) { return neighbors . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , objects . size ( ) ) |
testVoerRegelUitLandMigratieIsNederland ( ) { nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl persoon = maakPersoon ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . migratie . BRBY0540Test . HEEFT_GEEN_BVP ) ; nl . bzk . brp . model . bericht . kern . PersoonBericht persoonBericht = new nl . bzk . brp . model . bericht . kern . PersoonBericht ( ) ; persoonBericht . setMigratie ( new nl . bzk . brp . model . bericht . kern . PersoonMigratieGroepBericht ( ) ) ; persoonBericht . getMigratie ( ) . setLandGebiedMigratie ( new nl . bzk . brp . model . algemeen . stamgegeven . kern . LandGebiedAttribuut ( nederland ) ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteits = new nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . migratie . BRBY0540 ( ) . voerRegelUit ( new nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView ( persoon ) , persoonBericht , null , null ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Integer ) { final nl . bzk . brp . model . hisvolledig . kern . PersoonHisVolledig item = blobifierService . leesBlob ( id ) ; if ( item == null ) { throw new nl . bzk . brp . beheer . webapp . controllers . ErrorHandler . NotFoundException ( ) ; } return item ; } | org . junit . Assert . assertEquals ( persoonBericht , berichtEntiteits . get ( 0 ) ) |
remove ( ) { org . pdfsam . test . HitTestListener < org . pdfsam . ui . commons . RemoveSelectedEvent > listener = new org . pdfsam . test . HitTestListener ( ) ; eventStudio ( ) . add ( org . pdfsam . ui . commons . RemoveSelectedEvent . class , listener , org . pdfsam . ui . selection . multiple . SelectionTableToolbarTest . MODULE ) ; javafx . scene . Node victim = lookup ( ( b ) -> b instanceof org . pdfsam . ui . selection . multiple . SelectionTableToolbar . RemoveButton ) . query ( ) ; enableByFiringSelectionChange ( victim ) ; clickOn ( victim ) ; "<AssertPlaceHolder>" ; } isHit ( ) { return hit ; } | org . junit . Assert . assertTrue ( listener . isHit ( ) ) |
testGetNbEvents ( ) { long result = fixture . getNbEvents ( ) ; "<AssertPlaceHolder>" ; } getNbEvents ( ) { return fNbEvents ; } | org . junit . Assert . assertEquals ( 1L , result ) |
getTableOnPartitionedTable ( ) { com . hotels . bdp . circustrain . core . replica . FullReplicationReplicaLocationManager manager = new com . hotels . bdp . circustrain . core . replica . FullReplicationReplicaLocationManager ( sourceLocationManager , com . hotels . bdp . circustrain . core . replica . FullReplicationReplicaLocationManagerTest . TABLE_PATH , com . hotels . bdp . circustrain . core . replica . FullReplicationReplicaLocationManagerTest . EVENT_ID , com . hotels . bdp . circustrain . core . replica . TableType . PARTITIONED , cleanupLocationManager , replicaCatalogListener ) ; org . apache . hadoop . fs . Path path = manager . getTableLocation ( ) ; "<AssertPlaceHolder>" ; } getTableLocation ( ) { return tableLocation ; } | org . junit . Assert . assertThat ( path , org . hamcrest . CoreMatchers . is ( new org . apache . hadoop . fs . Path ( com . hotels . bdp . circustrain . core . replica . FullReplicationReplicaLocationManagerTest . TABLE_PATH ) ) ) |
testPercentile2 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 9 , 9 , DataType . DOUBLE ) ; org . apache . commons . math3 . stat . descriptive . rank . Percentile percentile = new org . apache . commons . math3 . stat . descriptive . rank . Percentile ( 50 ) ; double exp = percentile . evaluate ( array . data ( ) . asDouble ( ) ) ; "<AssertPlaceHolder>" ; } percentileNumber ( java . lang . Number ) { if ( ( ( quantile . intValue ( ) ) < 0 ) || ( ( quantile . intValue ( ) ) > 100 ) ) throw new org . nd4j . linalg . exception . ND4JIllegalStateException ( "Percentile<sp>value<sp>should<sp>be<sp>in<sp>0...100<sp>range" ) ; if ( isScalar ( ) ) return this . getDouble ( 0 ) ; org . nd4j . linalg . api . ndarray . INDArray sorted = org . nd4j . linalg . factory . Nd4j . sort ( this . dup ( this . ordering ( ) ) , true ) ; return getPercentile ( quantile , sorted ) ; } | org . junit . Assert . assertEquals ( exp , array . percentileNumber ( 50 ) ) |
yield_A$Function1_emptyGenerator ( ) { com . m3 . scalaflavor4j . CollectionLike < java . lang . String > xs1 = com . m3 . scalaflavor4j . Seq . apply ( "a" , "b" ) ; com . m3 . scalaflavor4j . CollectionLike < java . lang . Integer > xs2 = com . m3 . scalaflavor4j . Seq . apply ( 1 , 2 , 3 , 4 , 5 ) ; com . m3 . scalaflavor4j . CollectionLike < java . lang . Long > xs3 = com . m3 . scalaflavor4j . Seq . apply ( 10L , 20L ) ; com . m3 . scalaflavor4j . CollectionLike < java . lang . Boolean > xs4 = com . m3 . scalaflavor4j . Option . none ( ) ; com . m3 . scalaflavor4j . CollectionLike < java . lang . Double > xs5 = com . m3 . scalaflavor4j . Seq . apply ( 0.1 , 0.2 , 0.3 ) ; com . m3 . scalaflavor4j . Seq < java . lang . String > rs = com . m3 . scalaflavor4j . For . apply ( xs1 , xs2 , xs3 , xs4 , xs5 ) . yield ( new com . m3 . scalaflavor4j . F1 < com . m3 . scalaflavor4j . Tuple5 < java . lang . String , java . lang . Integer , java . lang . Long , java . lang . Boolean , java . lang . Double > , java . lang . String > ( ) { public java . lang . String apply ( com . m3 . scalaflavor4j . Tuple5 < java . lang . String , java . lang . Integer , java . lang . Long , java . lang . Boolean , java . lang . Double > t ) { return ( ( ( ( t . _1 ( ) ) + ( t . _2 ( ) ) ) + ( t . _3 ( ) ) ) + ( t . _4 ( ) ) ) + ( t . _5 ( ) ) ; } } ) ; "<AssertPlaceHolder>" ; } size ( ) { return 0 ; } | org . junit . Assert . assertThat ( rs . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 0 ) ) ) |
testDeleteEntity ( ) { handler . addRequest ( false , "DELETE" , "/qcbin/rest/domains/domain/projects/project/defects/86" , 200 ) ; handler . async ( ) ; addEntityListener ( new com . hp . alm . ali . idea . services . EntityNotFound ( handler , "defect" , 86 , true ) ) ; com . hp . alm . ali . idea . model . Entity defect = new com . hp . alm . ali . idea . model . Entity ( "defect" , 86 ) ; boolean deleted = entityService . deleteEntity ( defect ) ; "<AssertPlaceHolder>" ; } deleteEntity ( com . hp . alm . ali . idea . model . Entity ) { if ( ( "defect-link" . equals ( entity . getType ( ) ) ) && ( restService . getServerStrategy ( ) . hasSecondLevelDefectLink ( ) ) ) { return deleteOldDefectLink ( entity ) ; } com . hp . alm . ali . idea . rest . MyResultInfo result = new com . hp . alm . ali . idea . rest . MyResultInfo ( ) ; if ( ( restService . delete ( result , "{0}s/{1}" , entity . getType ( ) , entity . getId ( ) ) ) != ( org . apache . commons . httpclient . HttpStatus . SC_OK ) ) { errorService . showException ( new com . hp . alm . ali . idea . rest . RestException ( result ) ) ; return false ; } else { fireEntityNotFound ( new com . hp . alm . ali . idea . entity . EntityRef ( entity ) , true ) ; return true ; } } | org . junit . Assert . assertTrue ( deleted ) |
testPathTraversalWithDot ( ) { javax . servlet . http . HttpServletRequest request = createNiceMock ( javax . servlet . http . HttpServletRequest . class ) ; javax . servlet . http . HttpServletResponse response = createNiceMock ( javax . servlet . http . HttpServletResponse . class ) ; javax . servlet . FilterChain chain = createNiceMock ( javax . servlet . FilterChain . class ) ; resolver . getFilterChainManager ( ) . addToChain ( "/index.html" , "authcBasic" ) ; expect ( request . getAttribute ( WebUtils . INCLUDE_CONTEXT_PATH_ATTRIBUTE ) ) . andReturn ( null ) . anyTimes ( ) ; expect ( request . getContextPath ( ) ) . andReturn ( "" ) ; expect ( request . getRequestURI ( ) ) . andReturn ( "/./index.html" ) ; replay ( request ) ; javax . servlet . FilterChain resolved = resolver . getChain ( request , response , chain ) ; "<AssertPlaceHolder>" ; verify ( request ) ; } getChain ( javax . servlet . ServletRequest , javax . servlet . ServletResponse , javax . servlet . FilterChain ) { java . lang . String path = org . apache . shiro . web . util . WebUtils . getPathWithinApplication ( org . apache . shiro . web . util . WebUtils . toHttp ( request ) ) ; for ( final java . lang . String pathPattern : chains . keySet ( ) ) { if ( patternMatcher . matches ( pathPattern , path ) ) { final java . util . Iterator < com . google . inject . Key < ? extends javax . servlet . Filter > > chain = java . util . Arrays . asList ( chains . get ( pathPattern ) ) . iterator ( ) ; return new org . apache . shiro . guice . web . SimpleFilterChain ( originalChain , new java . util . Iterator < javax . servlet . Filter > ( ) { public boolean hasNext ( ) { return chain . hasNext ( ) ; } public javax . servlet . Filter next ( ) { return injector . getInstance ( chain . next ( ) ) ; } public void remove ( ) { throw new java . lang . UnsupportedOperationException ( ) ; } } ) ; } } return null ; } | org . junit . Assert . assertNotNull ( resolved ) |
setGlobalTimezone ( ) { biweekly . ICalendar ical = new biweekly . ICalendar ( ) ; ical . getProperties ( ) . clear ( ) ; biweekly . component . VEvent event = new biweekly . component . VEvent ( ) ; event . getProperties ( ) . clear ( ) ; event . setDateStart ( utc ( "1996-07-04<sp>12:00:00" ) ) ; ical . addEvent ( event ) ; java . util . TimeZone nyTimezone = java . util . TimeZone . getTimeZone ( "America/New_York" ) ; biweekly . component . VTimezone nyComponent = new biweekly . component . VTimezone ( nyTimezone . getID ( ) ) ; ical . getTimezoneInfo ( ) . setDefaultTimezone ( new biweekly . io . TimezoneAssignment ( nyTimezone , nyComponent ) ) ; java . util . TimeZone laTimezone = java . util . TimeZone . getTimeZone ( "America/Los_Angeles" ) ; biweekly . component . VTimezone laComponent = new biweekly . component . VTimezone ( laTimezone . getID ( ) ) ; java . io . StringWriter sw = new java . io . StringWriter ( ) ; biweekly . io . text . ICalWriter writer = new biweekly . io . text . ICalWriter ( sw , biweekly . ICalVersion . V2_0 ) ; writer . write ( ical ) ; writer . setGlobalTimezone ( new biweekly . io . TimezoneAssignment ( laTimezone , laComponent ) ) ; writer . write ( ical ) ; writer . close ( ) ; java . lang . String expected = "BEGIN:VCALENDAR\r\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "VERSION:2.0\r\n" + "BEGIN:VTIMEZONE\r\n" ) + "END:VCALENDAR\r\n" 2 ) + "END:VTIMEZONE\r\n" ) + "END:VCALENDAR\r\n" 1 ) + "END:VCALENDAR\r\n" 3 ) + "END:VEVENT\r\n" ) + "END:VCALENDAR\r\n" ) + "BEGIN:VCALENDAR\r\n" ) + "VERSION:2.0\r\n" ) + "BEGIN:VTIMEZONE\r\n" ) + "TZID:America/Los_Angeles\r\n" ) + "END:VTIMEZONE\r\n" ) + "END:VCALENDAR\r\n" 1 ) + "END:VCALENDAR\r\n" 0 ) + "END:VEVENT\r\n" ) + "END:VCALENDAR\r\n" ) ; java . lang . String actual = sw . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return getValue ( ICalVersion . V2_0 ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.