input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testInschrijvingGeboorte ( ) { initMocks ( nl . bzk . brp . model . bijhouding . RegistreerGeboorteBericht . class , SoortBericht . BHG_AFS_REGISTREER_GEBOORTE ) ; initBerichtVerwerker ( new java . util . ArrayList < nl . bzk . brp . model . validatie . Melding > ( ) , nl . bzk . brp . bijhouding . business . dto . bijhouding . BijhoudingResultaat . class , true ) ; final nl . bzk . brp . model . bijhouding . RegistreerGeboorteAntwoordBericht testBericht = new nl . bzk . brp . model . bijhouding . RegistreerGeboorteAntwoordBericht ( ) ; when ( getAntwoordBerichtFactory ( ) . bouwAntwoordBericht ( any ( nl . bzk . brp . model . logisch . ber . Bericht . class ) , any ( nl . bzk . brp . bijhouding . business . dto . bijhouding . BijhoudingResultaat . class ) ) ) . thenReturn ( testBericht ) ; final nl . bzk . brp . model . bericht . kern . AdministratieveHandelingBericht adminstratieveHandeling = new nl . bzk . brp . model . bericht . kern . HandelingGeboorteInNederlandBericht ( ) ; adminstratieveHandeling . setObjectSleutel ( nl . bzk . brp . web . service . BijhoudingServiceTest . OBJECT_SLEUTEL ) ; voegAdministratieveHandelingToeAanBericht ( adminstratieveHandeling ) ; nl . bzk . brp . model . bijhouding . RegistreerGeboorteAntwoordBericht resultaat = ( ( nl . bzk . brp . web . service . BijhoudingService ) ( getWebService ( ) ) ) . registreerGeboorte ( ( ( nl . bzk . brp . model . bijhouding . RegistreerGeboorteBericht ) ( getBericht ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getBericht ( ) { return bericht ; } | org . junit . Assert . assertEquals ( testBericht , resultaat ) |
scanNdkSpecificVersion ( ) { java . nio . file . Path expectedPath = createTmpNdkVersions ( com . facebook . buck . android . toolchain . ndk . impl . AndroidNdkResolver . NDK_PRE_R11_VERSION_FILENAME , "ndk-dir-r9a" , "r9a" , "ndk-dir-r9b" , "r9b" , "ndk-dir-r9c" , "r9c" ) [ 1 ] ; com . facebook . buck . android . toolchain . ndk . impl . AndroidNdkResolver resolver = new com . facebook . buck . android . toolchain . ndk . impl . AndroidNdkResolver ( tmpDir . getRoot ( ) . getFileSystem ( ) , com . google . common . collect . ImmutableMap . of ( "ANDROID_NDK_REPOSITORY" , tmpDir . getRoot ( ) . toString ( ) ) , com . facebook . buck . android . FakeAndroidBuckConfig . builder ( ) . setNdkVersion ( "r9b" ) . build ( ) ) ; "<AssertPlaceHolder>" ; } getNdkOrThrow ( ) { if ( ( ! ( ndk . isPresent ( ) ) ) && ( ndkErrorMessage . isPresent ( ) ) ) { throw new com . facebook . buck . core . exceptions . HumanReadableException ( ndkErrorMessage . get ( ) ) ; } return ndk . get ( ) ; } | org . junit . Assert . assertEquals ( expectedPath , resolver . getNdkOrThrow ( ) ) |
testList ( ) { org . dashbuilder . dataprovider . sql . SQLDataSourceLocator dataSourceLocator = sqlDataSetProviderCDI . getDataSourceLocator ( ) ; java . util . List < org . dashbuilder . dataset . def . SQLDataSourceDef > l = dataSourceLocator . list ( ) ; "<AssertPlaceHolder>" ; } list ( ) { return org . dashbuilder . dataprovider . sql . JDBCUtils . listDatasourceDefs ( ) ; } | org . junit . Assert . assertEquals ( l . size ( ) , 2 ) |
testSplitMerge63 ( ) { java . util . Random rnd = new java . util . Random ( ) ; for ( int i = 0 ; i < ( ch . ethz . globis . phtree . bits . TestBitsToolsSplitMergeVarLong . MUL ) ; i ++ ) { long [ ] l = new long [ ] { ( rnd . nextLong ( ) ) > > > 1 , ( rnd . nextLong ( ) ) > > > 1 } ; long [ ] x = ch . ethz . globis . phtree . util . BitTools . mergeLong ( 63 , l ) ; long [ ] l2 = ch . ethz . globis . phtree . util . BitTools . splitLong ( 2 , 63 , x ) ; "<AssertPlaceHolder>" ; } } splitLong ( int , int , long [ ] ) { long [ ] trg = new long [ dims ] ; long maskTrg = 1L << ( nBitsPerValue - 1 ) ; for ( int k = 0 ; k < nBitsPerValue ; k ++ ) { for ( int j = 0 ; j < ( trg . length ) ; j ++ ) { int posBit = ( k * ( trg . length ) ) + j ; boolean bit = ch . ethz . globis . phtree . util . BitTools . getBit ( toSplit , posBit ) ; if ( bit ) { trg [ j ] |= maskTrg ; } } maskTrg >>>= 1 ; } return trg ; } | org . junit . Assert . assertArrayEquals ( l , l2 ) |
shouldCorrectlyHandleOpeningAndEscapingAtTheEndOfString ( ) { java . lang . String result = null ; try { processor . process ( "Value<sp>{\\" , withoutContext ( ) , com . github . resource4j . resources . processors . BasicValuePostProcessorTest . RESOLVER ) ; } catch ( com . github . resource4j . resources . processors . ValuePostProcessingException e ) { result = e . getPartialResult ( ) ; } "<AssertPlaceHolder>" ; } getPartialResult ( ) { return partialResult ; } | org . junit . Assert . assertEquals ( "Value<sp>{\\" , result ) |
testHasNext_NullData ( ) { this . it = new com . taobao . metamorphosis . consumer . MessageIterator ( "test" , null ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return it . hasNext ( ) ; } | org . junit . Assert . assertFalse ( this . it . hasNext ( ) ) |
testDoGetCanCreate ( ) { java . lang . String canCreate = "canCreate" ; doReturn ( canCreate ) . when ( fileResource . fileService ) . doGetCanCreate ( ) ; java . lang . String result = fileResource . doGetCanCreate ( ) ; "<AssertPlaceHolder>" ; verify ( fileResource . fileService , times ( 1 ) ) . doGetCanCreate ( ) ; } doGetCanCreate ( ) { return getPolicy ( ) . isAllowed ( RepositoryCreateAction . NAME ) ? "true" : "false" ; } | org . junit . Assert . assertEquals ( canCreate , result ) |
getCleanProductId_Null ( ) { org . oscm . domobjects . ProductData product = new org . oscm . domobjects . ProductData ( ) ; product . setProductId ( null ) ; java . lang . String productId = product . getCleanProductId ( ) ; "<AssertPlaceHolder>" ; } getCleanProductId ( ) { if ( ( getProductId ( ) ) == null ) { return null ; } java . lang . String id = getProductId ( ) ; java . lang . String [ ] split = id . split ( "#" ) ; if ( ( split . length ) == 0 ) { return "" ; } return split [ 0 ] . trim ( ) ; } | org . junit . Assert . assertNull ( productId ) |
testLoadGenericModel_02 ( ) { iot . jcypher . domain . IGenericDomainAccess gda ; java . lang . String testId ; util . TestDataReader tdr = new util . TestDataReader ( "/test/genericmodel/Test_GENMODEL_01.txt" ) ; gda = iot . jcypher . domain . DomainAccessFactory . createGenericDomainAccess ( test . genericmodel . GenericModelTest . dbAccess , test . genericmodel . GenericModelTest . domainName ) ; java . util . List < iot . jcypher . domain . genericmodel . DomainObject > objects = gda . loadByType ( "iot.jcypher.samples.domain.people.model.Person" , ( - 1 ) , 0 , ( - 1 ) ) ; long carolineId = - 1 ; for ( iot . jcypher . domain . genericmodel . DomainObject obj : objects ) { if ( ( obj . getFieldValue ( "lastName" ) . toString ( ) . equals ( "Smith" ) ) && ( obj . getFieldValue ( "firstName" ) . toString ( ) . equals ( "Caroline" ) ) ) { carolineId = gda . getSyncInfo ( obj ) . getId ( ) ; break ; } } gda = iot . jcypher . domain . DomainAccessFactory . createGenericDomainAccess ( test . genericmodel . GenericModelTest . dbAccess , test . genericmodel . GenericModelTest . domainName ) ; iot . jcypher . domain . genericmodel . DomainObject object = gda . loadById ( "iot.jcypher.samples.domain.people.model.Person" , ( - 1 ) , carolineId ) ; test . genericmodel . DOToString doToString = new test . genericmodel . DOToString ( iot . jcypher . query . writer . Format . PRETTY_1 ) ; iot . jcypher . domain . genericmodel . internal . DOWalker walker = new iot . jcypher . domain . genericmodel . internal . DOWalker ( object , doToString ) ; walker . walkDOGraph ( ) ; java . lang . String str = doToString . getBuffer ( ) . toString ( ) ; testId = "GENMODEL_03" ; "<AssertPlaceHolder>" ; return ; } getTestData ( java . lang . String ) { return this . testData . get ( testId ) ; } | org . junit . Assert . assertEquals ( tdr . getTestData ( testId ) , str ) |
test_allValidStringCode ( ) { org . terasoluna . gfw . common . codelist . Person p = new org . terasoluna . gfw . common . codelist . Person ( ) ; p . gender = "F" ; p . lang = "JP" ; java . util . Set < javax . validation . ConstraintViolation < org . terasoluna . gfw . common . codelist . Person > > result = validator . validate ( p ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( result . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
makeCheckFeatures ( ) { org . campagnelab . dl . somatic . mappers . QualityFeatures calc = new org . campagnelab . dl . somatic . mappers . QualityFeatures ( ) ; org . campagnelab . dl . varanalysis . protobuf . BaseInformationRecords . BaseInformation record = prepareRecord ( ) ; calc . prepareToNormalize ( record , 0 ) ; org . campagnelab . dl . somatic . learning . features . Features features = new org . campagnelab . dl . somatic . learning . features . Features ( calc . numberOfFeatures ( ) ) ; for ( int i = 0 ; i < ( calc . numberOfFeatures ( ) ) ; i ++ ) { features . setFeatureValue ( calc . produceFeature ( record , i ) , i ) ; } features . setFeatureValue ( gr , 0 ) ; features . setFeatureValue ( gf , 1 ) ; features . setFeatureValue ( sr , 10 ) ; features . setFeatureValue ( sf , 11 ) ; org . nd4j . linalg . api . ndarray . INDArray inputs = org . nd4j . linalg . factory . Nd4j . zeros ( 1 , calc . numberOfFeatures ( ) ) ; calc . prepareToNormalize ( record , 0 ) ; calc . mapFeatures ( record , inputs , 0 ) ; org . campagnelab . dl . somatic . learning . features . Features featuresFromArray = new org . campagnelab . dl . somatic . learning . features . Features ( inputs , 1 ) ; "<AssertPlaceHolder>" ; System . out . println ( features ) ; } mapFeatures ( org . campagnelab . dl . varanalysis . protobuf . BaseInformationRecords$BaseInformationOrBuilder , org . nd4j . linalg . api . ndarray . INDArray , int ) { delegate . mapFeatures ( record , inputs , indexOfRecord ) ; } | org . junit . Assert . assertEquals ( features , featuresFromArray ) |
testNullResults ( ) { ddf . catalog . plugin . PolicyResponse response = filterPluginResponseHelper ( null , getValidMetacard ( ) , true , false ) ; "<AssertPlaceHolder>" ; } itemPolicy ( ) { return itemPolicy ; } | org . junit . Assert . assertThat ( response . itemPolicy ( ) . isEmpty ( ) , org . hamcrest . core . Is . is ( true ) ) |
testPathsTo_Atom_Norbornane ( ) { org . openscience . cdk . interfaces . IAtomContainer norbornane = org . openscience . cdk . graph . ShortestPathsTest . norbornane ( ) ; org . openscience . cdk . graph . ShortestPaths paths = new org . openscience . cdk . graph . ShortestPaths ( norbornane , norbornane . getAtom ( 0 ) ) ; int [ ] [ ] expected = new int [ ] [ ] { new int [ ] { 0 , 1 , 2 , 3 } , new int [ ] { 0 , 5 , 4 , 3 } , new int [ ] { 0 , 6 , 7 , 3 } } ; "<AssertPlaceHolder>" ; } pathsTo ( org . openscience . cdk . interfaces . IAtom ) { return pathsTo ( container . indexOf ( end ) ) ; } | org . junit . Assert . assertArrayEquals ( expected , paths . pathsTo ( norbornane . getAtom ( 3 ) ) ) |
testEdmWithBasicXML ( ) { try { java . io . InputStream stream = new java . io . ByteArrayInputStream ( org . apache . olingo . client . core . MetadataValidationTest . basicXml . getBytes ( "UTF-8" ) ) ; final org . apache . olingo . commons . api . edm . Edm edm = client . getReader ( ) . readMetadata ( stream ) ; "<AssertPlaceHolder>" ; org . apache . olingo . client . api . serialization . ODataMetadataValidation metadataValidator = client . metadataValidation ( ) ; metadataValidator . validateMetadata ( edm ) ; } catch ( java . io . UnsupportedEncodingException e ) { throw e ; } } readMetadata ( java . io . InputStream ) { return readMetadata ( client . getDeserializer ( ContentType . APPLICATION_XML ) . toMetadata ( input ) . getSchemaByNsOrAlias ( ) ) ; } | org . junit . Assert . assertNotNull ( edm ) |
test_success_new_entity ( ) { org . ikasan . filter . EntityAgeFilter < java . lang . String > filter = new org . ikasan . filter . EntityAgeFilter < java . lang . String > ( this . defaultEntityAgeFilterService , "client-d" ) ; org . ikasan . filter . configuration . EntityAgeFilterConfiguration configuration = new org . ikasan . filter . configuration . EntityAgeFilterConfiguration ( ) ; configuration . setEntityIdentifierXpath ( "/message/businessIdentifier/text()" ) ; configuration . setEntityLastUpdatedXpath ( "/message/lastUpdated/text()" ) ; configuration . setLastUpdatedDatePattern ( "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" ) ; filter . setConfiguration ( configuration ) ; filter . startManagedResource ( ) ; java . lang . String result = filter . filter ( xmlQuiteRecentNewEntity ) ; filter . stopManagedResource ( ) ; "<AssertPlaceHolder>" ; } stopManagedResource ( ) { this . entityAgeFilterService . destroy ( ) ; } | org . junit . Assert . assertNotNull ( result ) |
setValueTestCheck ( ) { wd . open ( org . finra . jtaf . ewd . widget . element . html . CheckBoxTest . url ) ; org . finra . jtaf . ewd . widget . ICheckBox c = new org . finra . jtaf . ewd . widget . element . html . CheckBox ( "//input[@id='testCheckBox']" ) ; org . finra . jtaf . ewd . widget . IElement content = new org . finra . jtaf . ewd . widget . element . Element ( "//div[@id='content']" ) ; c . waitForElementPresent ( ) ; c . setValue ( "check" ) ; java . lang . String exp = "CheckBox<sp>Checked" ; "<AssertPlaceHolder>" ; } getText ( ) { try { org . openqa . selenium . WebElement webElement = findElement ( ) ; highlight ( org . finra . jtaf . ewd . widget . element . Element . HIGHLIGHT_MODES . GET ) ; return webElement . getText ( ) ; } catch ( java . lang . Exception e ) { throw new org . finra . jtaf . ewd . widget . WidgetException ( "Error<sp>while<sp>fetching<sp>text" , locator , e ) ; } } | org . junit . Assert . assertEquals ( exp , content . getText ( ) ) |
getOperatorRevenueShare ( ) { org . oscm . domobjects . Product product = givenProduct ( 101L ) ; product . setType ( ServiceType . TEMPLATE ) ; org . oscm . domobjects . RevenueShareModel revenue = new org . oscm . domobjects . RevenueShareModel ( ) ; revenue . setRevenueShare ( BigDecimal . TEN ) ; product . getCatalogEntries ( ) . get ( 0 ) . setOperatorPriceModel ( revenue ) ; doReturn ( product ) . when ( partnerBean . dm ) . getReference ( eq ( org . oscm . domobjects . Product . class ) , eq ( 101L ) ) ; doNothing ( ) . when ( partnerBean ) . verifyOwningPermission ( eq ( product ) ) ; org . oscm . domobjects . RevenueShareModel result = partnerBean . getOperatorRevenueShare ( 101L ) ; "<AssertPlaceHolder>" ; } getRevenueShare ( ) { return revenueShare ; } | org . junit . Assert . assertEquals ( BigDecimal . TEN , result . getRevenueShare ( ) ) |
tooManyTerms ( ) { java . lang . String q = "file:a<sp>OR<sp>file:b<sp>OR<sp>file:c" ; com . google . gerrit . index . query . Predicate < com . google . gerrit . server . query . change . ChangeData > in = parse ( q ) ; "<AssertPlaceHolder>" ; exception . expect ( com . google . gerrit . index . query . QueryParseException . class ) ; exception . expectMessage ( "too<sp>many<sp>terms<sp>in<sp>query" ) ; rewrite ( parse ( ( q + "<sp>OR<sp>file:d" ) ) ) ; } query ( java . lang . String ) { java . lang . String s = com . google . gerrit . client . Dispatcher . skip ( token ) ; int c = s . indexOf ( ',' ) ; com . google . gerrit . client . ui . Screen screen ; if ( c >= 0 ) { java . lang . String prefix = s . substring ( 0 , c ) ; if ( s . substring ( c ) . equals ( ",n,z" ) ) { screen = new com . google . gerrit . client . changes . QueryScreen ( prefix , 0 ) ; } else { screen = new com . google . gerrit . client . changes . QueryScreen ( prefix , java . lang . Integer . parseInt ( s . substring ( ( c + 1 ) ) ) ) ; } } else { screen = new com . google . gerrit . client . changes . QueryScreen ( s , 0 ) ; } com . google . gerrit . client . Gerrit . display ( token , screen ) ; } | org . junit . Assert . assertEquals ( query ( in ) , rewrite ( in ) ) |
testSelectConcurrencyTest ( ) { org . davidmoten . rx . jdbc . DatabaseTest . debug ( ) ; try { try ( org . davidmoten . rx . jdbc . Database db = org . davidmoten . rx . jdbc . DatabaseTest . db ( 1 ) ) { io . reactivex . Scheduler scheduler = io . reactivex . schedulers . Schedulers . from ( java . util . concurrent . Executors . newFixedThreadPool ( 2 ) ) ; int n = 2 ; java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( n ) ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( ) ; for ( int i = 0 ; i < n ; i ++ ) { db . select ( "select<sp>score<sp>from<sp>person<sp>where<sp>name=?" ) . parameters ( "FRED" , "JOSEPH" ) . getAs ( org . davidmoten . rx . jdbc . Integer . class ) . subscribeOn ( scheduler ) . toList ( ) . doOnSuccess ( ( x ) -> { if ( ! ( x . equals ( com . github . davidmoten . guavamini . Lists . newArrayList ( 21 , 34 ) ) ) ) { throw new java . lang . RuntimeException ( "run<sp>broken" ) ; } } ) . doOnSuccess ( ( x ) -> { count . incrementAndGet ( ) ; latch . countDown ( ) ; } ) . doOnError ( ( x ) -> latch . countDown ( ) ) . subscribe ( ) ; org . davidmoten . rx . jdbc . DatabaseTest . log . info ( ( "submitted<sp>" + i ) ) ; } if ( ! ( latch . await ( 5000 , TimeUnit . SECONDS ) ) ) { throw new java . util . concurrent . TimeoutException ( "timeout" ) ; } "<AssertPlaceHolder>" ; } } finally { org . davidmoten . rx . jdbc . DatabaseTest . debug ( ) ; } } get ( ) { return selectBuilder . autoMap ( cls ) ; } | org . junit . Assert . assertEquals ( n , count . get ( ) ) |
testClosedOpenDescending ( ) { org . apache . commons . functor . range . IntegerRange range = org . apache . commons . functor . range . Ranges . integerRange ( 5 , BoundType . CLOSED , ( - 5 ) , BoundType . OPEN , ( - 3 ) ) ; java . util . List < java . lang . Integer > expected = java . util . Arrays . asList ( 5 , 2 , ( - 1 ) , ( - 4 ) ) ; java . util . Collection < java . lang . Integer > elements = org . apache . commons . functor . generator . loop . IteratorToGeneratorAdapter . adapt ( range ) . toCollection ( ) ; "<AssertPlaceHolder>" ; } toCollection ( ) { return new org . apache . commons . functor . generator . util . CollectionTransformer < E , java . util . Collection < E > > ( new java . util . ArrayList < E > ( ) ) ; } | org . junit . Assert . assertEquals ( expected , elements ) |
partialMessage ( ) { encodeApplicationMessage ( buffer , 0 , messages [ ( ( messageCount ) - 1 ) ] ) ; buffer . limit ( ( ( buffer . position ( ) ) - 1 ) ) ; buffer . flip ( ) ; spliterator = new io . fixprotocol . silverflash . frame . MessageLengthFrameSpliterator ( buffer ) ; "<AssertPlaceHolder>" ; } tryAdvance ( java . util . function . Consumer ) { java . util . Objects . requireNonNull ( action ) ; int messageOffset = ( offset ) + ( SofhFrameDecoder . HEADER_LENGTH ) ; if ( messageOffset > ( buffer . limit ( ) ) ) { return false ; } decoder . wrap ( buffer ) ; decoder . decodeFrameHeader ( ) ; final int messageLength = decoder . getMessageLength ( ) ; int messageLimit = ( ( offset ) + ( SofhFrameDecoder . HEADER_LENGTH ) ) + messageLength ; if ( ( messageLength <= 0 ) || ( messageLimit > ( buffer . limit ( ) ) ) ) { return false ; } java . nio . ByteBuffer message = buffer . duplicate ( ) ; message . order ( originalByteOrder ) ; message . limit ( messageLimit ) ; action . accept ( message ) ; buffer . position ( messageLimit ) ; offset = messageLimit ; buffer . order ( originalByteOrder ) ; return true ; } | org . junit . Assert . assertFalse ( spliterator . tryAdvance ( new java . util . function . Consumer < java . nio . ByteBuffer > ( ) { public void accept ( java . nio . ByteBuffer message ) { } } ) ) |
readsCharsFromEmptyBuffer ( ) { char [ ] array = new char [ ] { 'T' , 'e' , 'a' , 'V' , 'M' } ; java . nio . CharBuffer buffer = java . nio . CharBuffer . wrap ( array ) ; java . nio . CharBuffer target = java . nio . CharBuffer . allocate ( 2 ) ; buffer . position ( 5 ) ; int charsRead = buffer . read ( target ) ; "<AssertPlaceHolder>" ; } read ( byte [ ] ) { throw new org . teavm . classlib . java . io . TEOFException ( ) ; } | org . junit . Assert . assertThat ( charsRead , org . hamcrest . CoreMatchers . is ( ( - 1 ) ) ) |
testSerializing ( ) { cache = com . trivago . triava . tcache . TCacheFactory . standardFactory ( ) . < java . lang . String , java . lang . Integer > builder ( ) . setCacheWriteMode ( CacheWriteMode . Serialize ) . build ( ) ; java . lang . Integer putValue = 1 ; cache . put ( "ONE" , putValue ) ; java . lang . Integer value = cache . get ( "ONE" ) ; "<AssertPlaceHolder>" ; } get ( K ) { return cache . get ( key ) ; } | org . junit . Assert . assertEquals ( putValue , value ) |
testXMLFormat ( ) { processor = new org . apache . cxf . tools . wsdlto . frontend . jaxws . JAXWSContainer ( null ) ; env . put ( ToolConstants . CFG_WSDLURL , getLocation ( "/wsdl2java_wsdl/xml_format_root.wsdl" ) ) ; processor . setContext ( env ) ; try { processor . execute ( ) ; org . junit . Assert . fail ( "xml_format_root.wsdl<sp>is<sp>not<sp>a<sp>valid<sp>wsdl,<sp>should<sp>throws<sp>exception<sp>here" ) ; } catch ( java . lang . Exception e ) { java . lang . String expected = "Binding(Greeter_XMLBinding):BindingOperation" + ( "({http://apache.org/xml_http_bare}sayHi)-input:<sp>empty<sp>value<sp>of<sp>rootNode<sp>attribute,<sp>" + "the<sp>value<sp>should<sp>be<sp>{http://apache.org/xml_http_bare}sayHi" ) ; "<AssertPlaceHolder>" ; } } getMessage ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ( errors ) != null ) { sb . append ( errors . toString ( ) ) ; } return sb . toString ( ) ; } | org . junit . Assert . assertEquals ( expected , e . getMessage ( ) . trim ( ) ) |
getNetworkIds_NetworkIdIsNull ( ) { org . apache . commons . configuration . HierarchicalConfiguration configuration = prepareConfiguration ( org . oscm . app . ror . LPlatformConfigurationTest . NETWORKID , null ) ; lPlatformConfiguration = new org . oscm . app . ror . data . LPlatformConfiguration ( configuration ) ; java . util . List < org . oscm . app . iaas . data . Network > result = lPlatformConfiguration . getNetworks ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
shouldSeeAllEntriesInAllEntriesReader ( ) { org . neo4j . kernel . api . index . IndexEntryUpdate < org . neo4j . storageengine . api . schema . IndexDescriptor > [ ] updates = someUpdatesSingleType ( ) ; processAll ( updates ) ; java . util . Set < java . lang . Long > ids = asUniqueSet ( accessor . newAllEntriesReader ( ) ) ; java . util . Set < java . lang . Long > expectedIds = java . util . stream . Stream . of ( updates ) . map ( IndexEntryUpdate :: getEntityId ) . collect ( java . util . stream . Collectors . toCollection ( HashSet :: new ) ) ; "<AssertPlaceHolder>" ; } collect ( org . neo4j . internal . collector . CollectorStateMachine ) { try { return stateMachine . collect ( java . util . Collections . emptyMap ( ) ) ; } catch ( org . neo4j . kernel . api . exceptions . InvalidArgumentsException e ) { throw new java . lang . IllegalStateException ( e ) ; } } | org . junit . Assert . assertEquals ( expectedIds , ids ) |
shouldDetectWhenDoesNotHaveUnrunMutations ( ) { this . testee . setStatusForMutation ( this . details , DetectionStatus . KILLED ) ; "<AssertPlaceHolder>" ; } hasUnrunMutations ( ) { return ! ( getUnrunMutations ( ) . isEmpty ( ) ) ; } | org . junit . Assert . assertFalse ( this . testee . hasUnrunMutations ( ) ) |
testMatchExactlyDlDstErr ( ) { params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "type" , "aaa" ) ; put ( "in_node" , "node01" ) ; put ( "in_port" , "port01" ) ; put ( "eth_dst" , "dl_dst" ) ; } } ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowMatchQuery ( params ) ; target . parse ( ) ; org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch match = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch ( ) ; match . setEthDst ( "dl_src" ) ; "<AssertPlaceHolder>" ; } matchExactly ( org . o3project . odenos . core . component . network . flow . basic . FlowAction ) { if ( ( target == null ) || ( ! ( target . getType ( ) . equals ( org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionCopyTtlOut . class . getSimpleName ( ) ) ) ) ) { return false ; } return true ; } | org . junit . Assert . assertThat ( target . matchExactly ( match ) , org . hamcrest . CoreMatchers . is ( false ) ) |
test_mail_settings_address_whitelist_get ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . GET ) ; request . setEndpoint ( "mail_settings/address_whitelist" ) ; com . sendgrid . Response response = sg . api ( request ) ; "<AssertPlaceHolder>" ; } api ( com . sendgrid . Request ) { com . sendgrid . Request req = new com . sendgrid . Request ( ) ; req . setMethod ( request . getMethod ( ) ) ; req . setBaseUri ( this . host ) ; req . setEndpoint ( ( ( ( "/" + ( version ) ) + "/" ) + ( request . getEndpoint ( ) ) ) ) ; req . setBody ( request . getBody ( ) ) ; for ( Map . Entry < java . lang . String , java . lang . String > header : this . requestHeaders . entrySet ( ) ) { req . addHeader ( header . getKey ( ) , header . getValue ( ) ) ; } for ( Map . Entry < java . lang . String , java . lang . String > queryParam : request . getQueryParams ( ) . entrySet ( ) ) { req . addQueryParam ( queryParam . getKey ( ) , queryParam . getValue ( ) ) ; } return makeCall ( req ) ; } | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
inotTest1 ( ) { final short [ ] content = new short [ ] { 1 , 3 , 5 , 7 , 9 } ; org . roaringbitmap . buffer . MappeableContainer c = org . roaringbitmap . buffer . TestContainer . makeContainer ( content ) ; c = c . inot ( 0 , 65536 ) ; final short [ ] s = new short [ 65536 - ( content . length ) ] ; int pos = 0 ; for ( int i = 0 ; i < 65536 ; ++ i ) { if ( ( java . util . Arrays . binarySearch ( content , ( ( short ) ( i ) ) ) ) < 0 ) { s [ ( pos ++ ) ] = ( ( short ) ( i ) ) ; } } "<AssertPlaceHolder>" ; } checkContent ( org . roaringbitmap . buffer . MappeableContainer , short [ ] ) { org . roaringbitmap . ShortIterator si = c . getShortIterator ( ) ; int ctr = 0 ; boolean fail = false ; while ( si . hasNext ( ) ) { if ( ctr == ( s . length ) ) { fail = true ; break ; } if ( ( si . next ( ) ) != ( s [ ctr ] ) ) { fail = true ; break ; } ++ ctr ; } if ( ctr != ( s . length ) ) { fail = true ; } if ( fail ) { System . out . print ( "fail,<sp>found<sp>" ) ; si = c . getShortIterator ( ) ; while ( si . hasNext ( ) ) { System . out . print ( ( "<sp>" + ( si . next ( ) ) ) ) ; } System . out . print ( "\n<sp>expected<sp>" ) ; for ( final short s1 : s ) { System . out . print ( ( "<sp>" + s1 ) ) ; } System . out . println ( ) ; } return ! fail ; } | org . junit . Assert . assertTrue ( org . roaringbitmap . buffer . TestContainer . checkContent ( c , s ) ) |
testUpdateDatePositive ( ) { new mockit . NonStrictExpectations ( ) { { certificate . getCertificateHolderAuthorizationTemplate ( ) ; result = isCvcaChat ; certificate . getEffectiveDate ( ) ; result = future ; } } ; de . persosim . simulator . protocols . ta . AbstractTaProtocol . updateDate ( certificate , issuingCertificate , currentDate ) ; "<AssertPlaceHolder>" ; } getDate ( ) { return new java . util . Date ( currentDate . getTime ( ) ) ; } | org . junit . Assert . assertEquals ( future , currentDate . getDate ( ) ) |
traceMarkerThrowableMessageArgs ( ) { uk . org . lidalia . slf4jtest . LoggingEvent event = uk . org . lidalia . slf4jtest . LoggingEvent . trace ( marker , throwable , message , arg1 , arg2 ) ; uk . org . lidalia . slf4jtest . LoggingEvent expected = new uk . org . lidalia . slf4jtest . LoggingEvent ( TRACE , marker , throwable , message , arg1 , arg2 ) ; "<AssertPlaceHolder>" ; } trace ( java . util . Map , org . slf4j . Marker , java . lang . Throwable , java . lang . String , java . lang . Object [ ] ) { return new uk . org . lidalia . slf4jtest . LoggingEvent ( uk . org . lidalia . slf4jext . Level . TRACE , mdc , marker , throwable , message , arguments ) ; } | org . junit . Assert . assertThat ( event , org . hamcrest . core . Is . is ( expected ) ) |
testRewritePomUnmappedExtension ( ) { java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createReactorProjects ( "internal-snapshot-extension" ) ; org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = createUnmappedConfiguration ( reactorProjects , "internal-snapshot-extension" ) ; try { phase . execute ( org . apache . maven . shared . release . config . ReleaseUtils . buildReleaseDescriptor ( builder ) , new org . apache . maven . shared . release . env . DefaultReleaseEnvironment ( ) , reactorProjects ) ; org . junit . Assert . fail ( "Should<sp>have<sp>thrown<sp>an<sp>exception" ) ; } catch ( org . apache . maven . shared . release . ReleaseFailureException e ) { "<AssertPlaceHolder>" ; } } buildReleaseDescriptor ( org . apache . maven . shared . release . config . ReleaseDescriptorBuilder ) { return builder . build ( ) ; } | org . junit . Assert . assertTrue ( true ) |
testAssocMany ( ) { org . tests . inheritance . model . Configurations configurations = new org . tests . inheritance . model . Configurations ( ) ; io . ebean . EbeanServer server = io . ebean . Ebean . getServer ( null ) ; server . save ( configurations ) ; final org . tests . inheritance . model . GroupConfiguration gc = new org . tests . inheritance . model . GroupConfiguration ( "GC1" ) ; configurations . add ( gc ) ; server . save ( gc ) ; org . tests . inheritance . model . Configurations configurationsQueried = server . find ( org . tests . inheritance . model . Configurations . class , configurations . getId ( ) ) ; java . util . List < org . tests . inheritance . model . GroupConfiguration > groups = configurationsQueried . getGroupConfigurations ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return propSet . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( ( ! ( groups . isEmpty ( ) ) ) ) |
EntitysWithNullIdsAreNeverSame ( ) { cleancoderscom . entities . Entity e1 = new cleancoderscom . entities . Entity ( ) ; cleancoderscom . entities . Entity e2 = new cleancoderscom . entities . Entity ( ) ; "<AssertPlaceHolder>" ; } isSame ( cleancoderscom . entities . Entity ) { return ( ( id ) != null ) && ( java . util . Objects . equals ( id , entity . id ) ) ; } | org . junit . Assert . assertFalse ( e1 . isSame ( e2 ) ) |
testGetDisconnectedOn ( ) { try { java . util . Date date = new java . text . SimpleDateFormat ( "MM/dd/yyyy<sp>HH:mm:ss" ) . parse ( "01/01/2012<sp>12:12:12" ) ; java . util . Date d = host . getDisconnectedOn ( ) ; "<AssertPlaceHolder>" ; } catch ( java . text . ParseException e ) { e . printStackTrace ( ) ; } } compareTo ( org . apache . cloudstack . ldap . LdapUser ) { return getUsername ( ) . compareTo ( other . getUsername ( ) ) ; } | org . junit . Assert . assertTrue ( ( ( d . compareTo ( date ) ) == 0 ) ) |
testSubstr_count_String_String ( ) { logger . info ( "substr_count" ) ; java . lang . String string = "test<sp>tester" ; java . lang . String substring = "test" ; int expResult = 2 ; int result = com . datumbox . framework . core . common . utilities . PHPMethods . substr_count ( string , substring ) ; "<AssertPlaceHolder>" ; } substr_count ( java . lang . String , java . lang . String ) { if ( ( substring . length ( ) ) == 1 ) { return com . datumbox . framework . core . common . utilities . PHPMethods . substr_count ( string , substring . charAt ( 0 ) ) ; } int count = 0 ; int idx = 0 ; while ( ( idx = string . indexOf ( substring , idx ) ) != ( - 1 ) ) { ++ idx ; ++ count ; } return count ; } | org . junit . Assert . assertEquals ( expResult , result ) |
setValue_unbound_singleEventOnSetValue ( ) { binder . forField ( nameField ) . bind ( Person :: getFirstName , Person :: setFirstName ) ; binder . forField ( ageField ) . withConverter ( new com . vaadin . flow . data . converter . StringToIntegerConverter ( "" ) ) . bind ( Person :: getAge , Person :: setAge ) ; binder . addValueChangeListener ( this :: statusChanged ) ; "<AssertPlaceHolder>" ; nameField . setValue ( "foo" ) ; verifyEvent ( nameField ) ; } get ( ) { return com . vaadin . flow . dom . impl . BasicTextElementStateProvider . INSTANCE ; } | org . junit . Assert . assertNull ( event . get ( ) ) |
runTestLoop2 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "GeneralJava/Loop2.apk" ) ; "<AssertPlaceHolder>" ; } size ( ) { return set . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , res . size ( ) ) |
shouldSearchAndReturnConceptsThatContainsNamePartInRequest ( ) { service . updateConceptIndex ( service . getConceptByUuid ( "15f83cd6-64e9-4e06-a5f9-364d3b14a43d" ) ) ; org . springframework . mock . web . MockHttpServletRequest req = request ( RequestMethod . GET , getURI ( ) ) ; org . openmrs . module . webservices . rest . SimpleObject result ; java . util . List < java . lang . Object > hits ; java . lang . String conceptClassUuid = "3d065ed4-b0b9-4710-9a17-6d8c4fd259b7" ; java . lang . String name = "Asp" ; java . lang . String searchType = "fuzzy" ; req . addParameter ( "class" , conceptClassUuid ) ; req . addParameter ( "name" , name ) ; req . addParameter ( "searchType" , searchType ) ; result = deserialize ( handle ( req ) ) ; hits = result . get ( "results" ) ; "<AssertPlaceHolder>" ; } hasUuid ( java . lang . String ) { return new org . hamcrest . FeatureMatcher < java . lang . Object , java . lang . String > ( org . hamcrest . CoreMatchers . equalTo ( uuid ) , "uuid" , "uuid" ) { @ org . openmrs . module . webservices . rest . web . v1_0 . controller . openmrs1_9 . Override protected java . lang . String featureValueOf ( java . lang . Object o ) { try { return ( ( java . lang . String ) ( org . apache . commons . beanutils . PropertyUtils . getProperty ( o , "uuid" ) ) ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } } } ; } | org . junit . Assert . assertThat ( hits , org . hamcrest . Matchers . contains ( hasUuid ( "15f83cd6-64e9-4e06-a5f9-364d3b14a43d" ) ) ) |
testListDataRecordWithoutSpecifyingStartIndex ( ) { com . liferay . data . engine . model . DEDataRecordCollection deDataRecordCollection = com . liferay . data . engine . service . test . DEDataEngineTestUtil . insertDEDataRecordCollection ( _adminUser , _group , _deDataDefinitionService , _deDataRecordCollectionService ) ; int total = 5 ; for ( int i = 0 ; i < total ; i ++ ) { com . liferay . data . engine . service . test . DEDataEngineTestUtil . insertDEDataRecord ( _adminUser , _group , deDataRecordCollection , _deDataRecordCollectionService ) ; } com . liferay . data . engine . service . DEDataRecordCollectionListRecordRequest deDataRecordCollectionListRecordRequest = com . liferay . data . engine . service . DEDataRecordCollectionRequestBuilder . listRecordBuilder ( deDataRecordCollection . getDEDataRecordCollectionId ( ) ) . endingAt ( 3 ) . build ( ) ; com . liferay . data . engine . service . DEDataRecordCollectionListRecordResponse deDataRecordCollectionListRecordResponse = _deDataRecordCollectionService . execute ( deDataRecordCollectionListRecordRequest ) ; java . util . List < com . liferay . data . engine . model . DEDataRecord > deDataRecords = deDataRecordCollectionListRecordResponse . getDEDataRecords ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; } | org . junit . Assert . assertEquals ( deDataRecords . toString ( ) , 3 , deDataRecords . size ( ) ) |
testInvokeCallbackWithTypedArray_Uint8Array ( ) { com . eclipsesource . v8 . JavaCallback callback = new com . eclipsesource . v8 . JavaCallback ( ) { @ com . eclipsesource . v8 . Override public com . eclipsesource . v8 . Boolean invoke ( final com . eclipsesource . v8 . V8Object receiver , final com . eclipsesource . v8 . V8Array parameters ) { com . eclipsesource . v8 . V8TypedArray result = ( ( com . eclipsesource . v8 . utils . TypedArray ) ( com . eclipsesource . v8 . utils . V8ObjectUtils . getValue ( parameters , 0 ) ) ) . getV8TypedArray ( ) ; try { return ( result . getType ( ) ) == ( V8Value . UNSIGNED_INT_8_ARRAY ) ; } finally { result . close ( ) ; } } } ; v8 . registerJavaMethod ( callback , "callback" ) ; java . lang . Object result = v8 . executeScript ( "callback(new<sp>Uint8Array(24));" ) ; "<AssertPlaceHolder>" ; } executeScript ( java . lang . String ) { return executeScript ( script , null , 0 ) ; } | org . junit . Assert . assertTrue ( ( ( java . lang . Boolean ) ( result ) ) ) |
less_report ( ) { com . asakusafw . runtime . io . text . driver . RecordDefinition < java . lang . String [ ] > def = com . asakusafw . runtime . io . text . driver . RecordDefinition . builder ( java . lang . String [ ] . class ) . withField ( self ( ) , field ( 0 ) . build ( ) ) . withField ( self ( ) , field ( 1 ) . build ( ) ) . withOnLessInput ( ErrorAction . REPORT ) . build ( ) ; java . lang . String [ ] [ ] results = collect ( def , new java . lang . String [ ] [ ] { new java . lang . String [ ] { "A" , "B" } , new java . lang . String [ ] { "C" } , new java . lang . String [ ] { "D" , "E" } } ) ; "<AssertPlaceHolder>" ; } build ( ) { if ( ( row ) != null ) { entity . add ( row ) ; row = null ; } return new com . asakusafw . iterative . common . basic . BasicParameterTable ( entity ) ; } | org . junit . Assert . assertThat ( results , is ( new java . lang . String [ ] [ ] { new java . lang . String [ ] { "A" , "B" } , new java . lang . String [ ] { "C" , null } , new java . lang . String [ ] { "D" , "E" } } ) ) |
testFindExistingWithMultipleEntries ( ) { java . lang . String ipAddress = "192.168.250.1" ; repository . save ( createMockLocation ( ipAddress , to . noc . devicefp . server . domain . repository . MaxMindLocationRepositoryTest . TWO_HOURS_AGO ) ) ; to . noc . devicefp . server . domain . entity . MaxMindLocation latestLocation = repository . save ( createMockLocation ( ipAddress , to . noc . devicefp . server . domain . repository . MaxMindLocationRepositoryTest . HOUR_AGO ) ) ; to . noc . devicefp . server . domain . entity . MaxMindLocation result = repository . getLatestAfterDate ( ipAddress , to . noc . devicefp . server . domain . repository . MaxMindLocationRepositoryTest . DAY_AGO ) ; "<AssertPlaceHolder>" ; } getLatestAfterDate ( java . lang . String , java . util . Date ) { javax . persistence . Query query = entityManager . createQuery ( ( "select<sp>loc<sp>" + ( ( ( ( "from<sp>MaxMindLocation<sp>loc<sp>" + "where<sp>loc.ipAddress<sp>=<sp>:ipAddress<sp>" ) + "and<sp>loc.stamp<sp>><sp>:afterTimestamp<sp>" ) + "order<sp>by<sp>loc.stamp<sp>desc<sp>" ) + ")" ) ) ) ; query . setParameter ( "ipAddress" , ipAddress ) ; query . setParameter ( "afterTimestamp" , afterTimestamp ) ; query . setMaxResults ( 1 ) ; to . noc . devicefp . server . domain . entity . MaxMindLocation result = null ; try { result = ( ( to . noc . devicefp . server . domain . entity . MaxMindLocation ) ( query . getSingleResult ( ) ) ) ; } catch ( javax . persistence . NoResultException | org . springframework . dao . EmptyResultDataAccessException ex ) { to . noc . devicefp . server . domain . repository . MaxMindLocationRepositoryImpl . log . debug ( "{}:<sp>getLatestAfterDate(ipAddress={},<sp>afterTimestamp={})" , ex . getClass ( ) . getSimpleName ( ) , ipAddress , afterTimestamp ) ; } return result ; } | org . junit . Assert . assertEquals ( latestLocation , result ) |
testInitiatePdmlNonEmptyDestPacketFilter ( ) { org . kaazing . k3po . pcap . converter . internal . filter . Filter pf = new org . kaazing . k3po . pcap . converter . internal . filter . NonEmptyDestPortTcpPacketFilter ( 53 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( pf ) |
testEqualsSelf ( ) { org . jfree . data . time . Quarter quarter = new org . jfree . data . time . Quarter ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; mdz . hc . ProcessValue other = ( ( mdz . hc . ProcessValue ) ( obj ) ) ; if ( ( state ) != ( other . state ) ) return false ; if ( ( timestamp ) == null ) { if ( ( other . timestamp ) != null ) return false ; } else if ( ! ( timestamp . equals ( other . timestamp ) ) ) return false ; if ( ( value ) == null ) { if ( ( other . value ) != null ) return false ; } else if ( ! ( value . equals ( other . value ) ) ) return false ; return true ; } | org . junit . Assert . assertTrue ( quarter . equals ( quarter ) ) |
testAllTechniquesNISTExample ( ) { final double [ ] d = new double [ ] { 95.1772 , 95.1567 , 95.1937 , 95.1959 , 95.1442 , 95.061 , 95.1591 , 95.1195 , 95.1772 , 95.0925 , 95.199 , 95.1682 } ; testAssertMappedValues ( d , new java . lang . Object [ ] [ ] { new java . lang . Object [ ] { org . apache . commons . math4 . stat . descriptive . rank . Percentile . EstimationType . LEGACY , 95.1981 } , new java . lang . Object [ ] { org . apache . commons . math4 . stat . descriptive . rank . Percentile . EstimationType . R_1 , 95.1959 } , new java . lang . Object [ ] { org . apache . commons . math4 . stat . descriptive . rank . Percentile . EstimationType . R_2 , 95.1959 } , new java . lang . Object [ ] { org . apache . commons . math4 . stat . descriptive . rank . Percentile . EstimationType . R_3 , 95.1959 } , new java . lang . Object [ ] { org . apache . commons . math4 . stat . descriptive . rank . Percentile . EstimationType . R_4 , 95.19546 } , new java . lang . Object [ ] { org . apache . commons . math4 . stat . descriptive . rank . Percentile . EstimationType . R_5 , 95.19683 } , new java . lang . Object [ ] { org . apache . commons . math4 . stat . descriptive . rank . Percentile . EstimationType . R_6 , 95.19807 } , new java . lang . Object [ ] { org . apache . commons . math4 . stat . descriptive . rank . Percentile . EstimationType . R_7 , 95.19568 } , new java . lang . Object [ ] { org . apache . commons . math4 . stat . descriptive . rank . Percentile . EstimationType . R_8 , 95.19724 } , new java . lang . Object [ ] { org . apache . commons . math4 . stat . descriptive . rank . Percentile . EstimationType . R_9 , 95.19714 } } , 90.0 , 1.0E-4 ) ; for ( final org . apache . commons . math4 . stat . descriptive . rank . Percentile . EstimationType e : Percentile . EstimationType . values ( ) ) { reset ( 100.0 , e ) ; "<AssertPlaceHolder>" ; } } getUnivariateStatistic ( ) { return new org . apache . commons . math4 . stat . descriptive . moment . SecondMoment ( ) ; } | org . junit . Assert . assertEquals ( 95.199 , getUnivariateStatistic ( ) . evaluate ( d ) , 1.0E-4 ) |
testIsPresentlyValidWithNullBounds ( ) { org . w3c . dom . Element issuedAssertion = this . readDocument ( "/saml.xml" ) . getDocumentElement ( ) ; issuedAssertion . getElementsByTagName ( "saml2:Conditions" ) . item ( 0 ) . getAttributes ( ) . removeNamedItem ( "NotBefore" ) ; issuedAssertion . getElementsByTagName ( "saml2:Conditions" ) . item ( 0 ) . getAttributes ( ) . removeNamedItem ( "NotOnOrAfter" ) ; ddf . security . assertion . impl . SecurityAssertionImpl assertion = getSecurityAssertion ( issuedAssertion ) ; "<AssertPlaceHolder>" ; } isPresentlyValid ( ) { java . util . Date now = new java . util . Date ( ) ; if ( ( ( getNotBefore ( ) ) != null ) && ( now . before ( getNotBefore ( ) ) ) ) { ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "SAML<sp>Assertion<sp>Time<sp>Bound<sp>Check<sp>Failed." ) ; ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "\t<sp>Checked<sp>time<sp>of<sp>{}<sp>is<sp>before<sp>the<sp>NotBefore<sp>time<sp>of<sp>{}" , now , getNotBefore ( ) ) ; return false ; } if ( ( ( getNotOnOrAfter ( ) ) != null ) && ( ( now . equals ( getNotOnOrAfter ( ) ) ) || ( now . after ( getNotOnOrAfter ( ) ) ) ) ) { ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "SAML<sp>Assertion<sp>Time<sp>Bound<sp>Check<sp>Failed." ) ; ddf . security . assertion . impl . SecurityAssertionImpl . LOGGER . debug ( "\t<sp>Checked<sp>time<sp>of<sp>{}<sp>is<sp>equal<sp>to<sp>or<sp>after<sp>the<sp>NotOnOrAfter<sp>time<sp>of<sp>{}" , now , getNotOnOrAfter ( ) ) ; return false ; } return true ; } | org . junit . Assert . assertTrue ( assertion . isPresentlyValid ( ) ) |
refinementCardinalityAtLeastOne ( ) { generateDrugHierarchy ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:<sp>[1..*]<sp>%s=<%s" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . HAS_ACTIVE_INGREDIENT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . SUBSTANCE ) ) ; final com . b2international . index . query . Expression expected = com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . and ( descendantsOf ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT ) , ids ( com . google . common . collect . ImmutableSet . of ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . TRIPHASIL_TABLET , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . PANADOL_TABLET ) ) ) ; "<AssertPlaceHolder>" ; } of ( java . lang . String , java . lang . String ) { return new com . b2international . snowowl . snomed . core . ecl . EclExpression ( ecl , expressionForm ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testAMRestartNotLostContainerCompleteMsg ( ) { getConf ( ) . setInt ( YarnConfiguration . RM_AM_MAX_ATTEMPTS , 2 ) ; org . apache . hadoop . yarn . server . resourcemanager . MockRM rm1 = new org . apache . hadoop . yarn . server . resourcemanager . MockRM ( getConf ( ) ) ; rm1 . start ( ) ; org . apache . hadoop . yarn . server . resourcemanager . rmapp . RMApp app1 = rm1 . submitApp ( 200 , "name" , "user" , new java . util . HashMap < org . apache . hadoop . yarn . api . records . ApplicationAccessType , java . lang . String > ( ) , false , "default" , ( - 1 ) , null , "MAPREDUCE" , false , true ) ; org . apache . hadoop . yarn . server . resourcemanager . MockNM nm1 = new org . apache . hadoop . yarn . server . resourcemanager . MockNM ( "127.0.0.1:1234" , 10240 , rm1 . getResourceTrackerService ( ) ) ; nm1 . registerNode ( ) ; org . apache . hadoop . yarn . server . resourcemanager . MockAM am1 = org . apache . hadoop . yarn . server . resourcemanager . MockRM . launchAndRegisterAM ( app1 , rm1 , nm1 ) ; org . apache . hadoop . yarn . server . resourcemanager . applicationsmanager . TestAMRestart . allocateContainers ( nm1 , am1 , 1 ) ; nm1 . nodeHeartbeat ( am1 . getApplicationAttemptId ( ) , 2 , ContainerState . RUNNING ) ; org . apache . hadoop . yarn . api . records . ContainerId containerId2 = org . apache . hadoop . yarn . api . records . ContainerId . newContainerId ( am1 . getApplicationAttemptId ( ) , 2 ) ; rm1 . waitForState ( nm1 , containerId2 , RMContainerState . RUNNING ) ; nm1 . nodeHeartbeat ( am1 . getApplicationAttemptId ( ) , 2 , ContainerState . COMPLETE ) ; rm1 . waitForState ( nm1 , containerId2 , RMContainerState . COMPLETED ) ; while ( true ) { org . apache . hadoop . yarn . api . protocolrecords . AllocateResponse response = am1 . allocate ( new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ResourceRequest > ( ) , new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ContainerId > ( ) ) ; java . util . List < org . apache . hadoop . yarn . api . records . ContainerStatus > containerStatuses = response . getCompletedContainersStatuses ( ) ; if ( ( isContainerIdInContainerStatus ( containerStatuses , containerId2 ) ) == false ) { java . lang . Thread . sleep ( 100 ) ; continue ; } containerStatuses = app1 . getCurrentAppAttempt ( ) . getJustFinishedContainers ( ) ; if ( isContainerIdInContainerStatus ( containerStatuses , containerId2 ) ) { org . junit . Assert . fail ( ) ; } break ; } nm1 . nodeHeartbeat ( am1 . getApplicationAttemptId ( ) , 1 , ContainerState . COMPLETE ) ; rm1 . waitForState ( am1 . getApplicationAttemptId ( ) , RMAppAttemptState . FAILED ) ; rm1 . waitForState ( app1 . getApplicationId ( ) , RMAppState . ACCEPTED ) ; org . apache . hadoop . yarn . api . records . ApplicationAttemptId newAttemptId = app1 . getCurrentAppAttempt ( ) . getAppAttemptId ( ) ; "<AssertPlaceHolder>" ; org . apache . hadoop . yarn . server . resourcemanager . rmapp . attempt . RMAppAttempt attempt2 = app1 . getCurrentAppAttempt ( ) ; org . apache . hadoop . yarn . server . resourcemanager . MockAM am2 = rm1 . launchAndRegisterAM ( app1 , rm1 , nm1 ) ; org . apache . hadoop . yarn . api . protocolrecords . AllocateResponse allocateResponse = am2 . allocate ( new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ResourceRequest > ( ) , new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ContainerId > ( ) ) ; java . util . List < org . apache . hadoop . yarn . api . records . ContainerStatus > containerStatuses = allocateResponse . getCompletedContainersStatuses ( ) ; if ( ( isContainerIdInContainerStatus ( containerStatuses , containerId2 ) ) == false ) { org . junit . Assert . fail ( ) ; } containerStatuses = attempt2 . getJustFinishedContainers ( ) ; if ( isContainerIdInContainerStatus ( containerStatuses , containerId2 ) ) { org . junit . Assert . fail ( ) ; } allocateResponse = am2 . allocate ( new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ResourceRequest > ( ) , new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ContainerId > ( ) ) ; containerStatuses = allocateResponse . getCompletedContainersStatuses ( ) ; if ( isContainerIdInContainerStatus ( containerStatuses , containerId2 ) ) { org . junit . Assert . fail ( ) ; } rm1 . stop ( ) ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof org . apache . hadoop . ozone . client . rest . response . BucketInfo ) ) { return false ; } org . apache . hadoop . ozone . client . rest . response . BucketInfo that = ( ( org . apache . hadoop . ozone . client . rest . response . BucketInfo ) ( o ) ) ; com . google . common . base . Preconditions . checkState ( that . getVolumeName ( ) . equals ( this . getVolumeName ( ) ) ) ; return bucketName . equals ( that . bucketName | org . junit . Assert . assertFalse ( newAttemptId . equals ( am1 . getApplicationAttemptId ( ) ) ) |
shouldReturnFeatureEnabledGivenSpringExpressionWithBeanReferenceWithMethodInvocationOnPropertyValueEvaluatesToTrue ( ) { java . lang . reflect . Method method = org . flips . fixture . TestClientFlipAnnotationsWithSpringExpressionAnnotations . class . getMethod ( "featureWithSpringExpressionBasedOnBeanReferenceWithMethodInvocationOnPropertyValue" ) ; boolean result = flipAnnotationsStore . isFeatureEnabled ( method ) ; "<AssertPlaceHolder>" ; } isFeatureEnabled ( java . lang . reflect . Method ) { return store . getOrDefault ( method , flipConditionEvaluatorFactory . getEmptyFlipConditionEvaluator ( ) ) . evaluate ( ) ; } | org . junit . Assert . assertEquals ( true , result ) |
onCreateShouldRegisterKeyListenerThatIgnoresOtherEvents ( ) { activityController . create ( ) ; final android . widget . EditText privateChatInput = ( ( android . widget . EditText ) ( controller . findViewById ( R . id . privateChatInput ) ) ) ; privateChatInput . setText ( "Hello" ) ; privateChatInput . dispatchKeyEvent ( new android . view . KeyEvent ( android . view . KeyEvent . ACTION_DOWN , android . view . KeyEvent . KEYCODE_ENTER ) ) ; privateChatInput . dispatchKeyEvent ( new android . view . KeyEvent ( android . view . KeyEvent . ACTION_UP , android . view . KeyEvent . KEYCODE_SPACE ) ) ; verify ( ui , never ( ) ) . sendPrivateMessage ( anyString ( ) , any ( net . usikkert . kouchat . misc . User . class ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( "Line{" + "lineNumber=" ) + ( lineNumber ) ) + ",<sp>lineText=" ) + ( lineText ) ) + '}' ; } | org . junit . Assert . assertEquals ( "Hello" , privateChatInput . getText ( ) . toString ( ) ) |
whenEquivalentAndNoVersionInfoForEither ( ) { oid1 = org . apache . isis . core . metamodel . adapter . oid . RootOid . create ( cusObjectSpecId , "123" ) ; oid2 = org . apache . isis . core . metamodel . adapter . oid . RootOid . create ( cusObjectSpecId , "123" ) ; "<AssertPlaceHolder>" ; } is ( org . apache . isis . core . metamodel . spec . feature . Contributed ) { return new com . google . common . base . Predicate < T > ( ) { @ org . apache . isis . core . metamodel . specloader . specimpl . Override public boolean apply ( org . apache . isis . core . metamodel . spec . feature . ObjectMember input ) { return contributed . isIncluded ( ) ; } } ; } | org . junit . Assert . assertThat ( oid1 , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( oid2 ) ) ) |
testConnectionContextWithHttpRemoting ( ) { org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . configureServerSideForInboundHttpRemoting ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . serverSideMCC ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddOutboundSocketBindingOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OUTBOUND_SOCKET_BINDING , org . jboss . as . test . shared . TestSuiteEnvironment . getServerAddress ( ) , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . HTTP_REMOTING_PORT ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddAuthenticationConfigurationOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_AUTH_CONFIG , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . HTTP_REMOTING_PROTOCOL , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . PROPERTIES_REALM , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_USERNAME , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_PASSWORD ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddAuthenticationContextOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_AUTH_CONTEXT , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_AUTH_CONFIG ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . applyUpdate ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . getAddConnectionOp ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . REMOTE_OUTBOUND_CONNECTION , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OUTBOUND_SOCKET_BINDING , org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_AUTH_CONTEXT ) ) ; org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . executeBlockingReloadClientServer ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . clientSideMCC ) ; deployer . deploy ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . EJB_SERVER_DEPLOYMENT ) ; deployer . deploy ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . EJB_CLIENT_DEPLOYMENT ) ; "<AssertPlaceHolder>" ; } callIntermediateWhoAmI ( ) { org . wildfly . security . auth . client . AuthenticationConfiguration common = org . wildfly . security . auth . client . AuthenticationConfiguration . empty ( ) . useProviders ( ( ) -> new java . security . Provider [ ] { new org . wildfly . security . WildFlyElytronProvider ( ) } ) . setSaslMechanismSelector ( SaslMechanismSelector . ALL ) ; org . wildfly . security . auth . client . AuthenticationContext authCtxEmpty = org . wildfly . security . auth . client . AuthenticationContext . empty ( ) ; final org . wildfly . security . auth . client . AuthenticationContext authCtx = authCtxEmpty . with ( MatchRule . ALL , common ) ; final org . jboss . ejb . client . EJBClientContext . Builder ejbClientBuilder = new org . jboss . ejb . client . EJBClientContext . Builder ( ) ; ejbClientBuilder . addTransportProvider ( new org . jboss . ejb . protocol . remote . RemoteTransportProvider ( ) ) ; final org . jboss . ejb . client . EJBClientConnection . Builder connBuilder = new org . jboss . ejb . client . EJBClientConnection . Builder ( ) ; connBuilder . setDestination ( java . net . URI . create ( ( ( "remote+http://" + ( org . jboss . as . test . shared . TestSuiteEnvironment . getServerAddressNode1 ( ) ) ) + ":8180" ) ) | org . junit . Assert . assertEquals ( org . jboss . as . test . manualmode . ejb . client . outbound . connection . security . ElytronRemoteOutboundConnectionTestCase . OVERRIDING_USERNAME , callIntermediateWhoAmI ( ) ) |
testConfigurationStringWithDuplicates ( ) { java . lang . String configuration = ( ( ( ( ( ( "var1=aaa" + ( LINE_SEPARATOR ) ) + "var2=bbb" ) + ( LINE_SEPARATOR ) ) + "var3=ccc" ) + ( LINE_SEPARATOR ) ) + "var2=ddd" ) + ( LINE_SEPARATOR ) ; io . strimzi . operator . cluster . model . OrderedProperties expectedConfiguration = createWithDefaults ( "var3" , "ccc" , "var2" , "ddd" , "var1" , "aaa" ) ; io . strimzi . operator . cluster . model . AbstractConfiguration config = new io . strimzi . operator . cluster . model . TestConfiguration ( configuration ) ; "<AssertPlaceHolder>" ; } asOrderedProperties ( ) { return options ; } | org . junit . Assert . assertEquals ( expectedConfiguration , config . asOrderedProperties ( ) ) |
testMultilineCompletion ( ) { java . lang . String buf = "val<sp>x<sp>=<sp>1\nsc." ; java . util . List < org . apache . zeppelin . interpreter . thrift . InterpreterCompletion > completions = org . apache . zeppelin . spark . OldSparkInterpreterTest . repl . completion ( buf , buf . length ( ) , null ) ; "<AssertPlaceHolder>" ; } size ( ) { synchronized ( resultMessageOutputs ) { return resultMessageOutputs . size ( ) ; } } | org . junit . Assert . assertTrue ( ( ( completions . size ( ) ) > 0 ) ) |
testHandleMessagesForNonExistingCheckpoints ( ) { try { final org . apache . flink . api . common . JobID jid = new org . apache . flink . api . common . JobID ( ) ; final long timestamp = java . lang . System . currentTimeMillis ( ) ; final org . apache . flink . runtime . executiongraph . ExecutionAttemptID triggerAttemptID = new org . apache . flink . runtime . executiongraph . ExecutionAttemptID ( ) ; final org . apache . flink . runtime . executiongraph . ExecutionAttemptID ackAttemptID1 = new org . apache . flink . runtime . executiongraph . ExecutionAttemptID ( ) ; final org . apache . flink . runtime . executiongraph . ExecutionAttemptID ackAttemptID2 = new org . apache . flink . runtime . executiongraph . ExecutionAttemptID ( ) ; final org . apache . flink . runtime . executiongraph . ExecutionAttemptID commitAttemptID = new org . apache . flink . runtime . executiongraph . ExecutionAttemptID ( ) ; org . apache . flink . runtime . executiongraph . ExecutionVertex triggerVertex = org . apache . flink . runtime . checkpoint . CheckpointCoordinatorTest . mockExecutionVertex ( triggerAttemptID ) ; org . apache . flink . runtime . executiongraph . ExecutionVertex ackVertex1 = org . apache . flink . runtime . checkpoint . CheckpointCoordinatorTest . mockExecutionVertex ( ackAttemptID1 ) ; org . apache . flink . runtime . executiongraph . ExecutionVertex ackVertex2 = org . apache . flink . runtime . checkpoint . CheckpointCoordinatorTest . mockExecutionVertex ( ackAttemptID2 ) ; org . apache . flink . runtime . executiongraph . ExecutionVertex commitVertex = org . apache . flink . runtime . checkpoint . CheckpointCoordinatorTest . mockExecutionVertex ( commitAttemptID ) ; org . apache . flink . runtime . checkpoint . CheckpointCoordinator coord = new org . apache . flink . runtime . checkpoint . CheckpointCoordinator ( jid , 200000 , 200000 , 0 , Integer . MAX_VALUE , CheckpointRetentionPolicy . NEVER_RETAIN_AFTER_TERMINATION , new org . apache . flink . runtime . executiongraph . ExecutionVertex [ ] { triggerVertex } , new org . apache . flink . runtime . executiongraph . ExecutionVertex [ ] { ackVertex1 , ackVertex2 } , new org . apache . flink . runtime . executiongraph . ExecutionVertex [ ] { commitVertex } , new org . apache . flink . runtime . checkpoint . StandaloneCheckpointIDCounter ( ) , new org . apache . flink . runtime . checkpoint . StandaloneCompletedCheckpointStore ( 2 ) , new org . apache . flink . runtime . state . memory . MemoryStateBackend ( ) , org . apache . flink . runtime . concurrent . Executors . directExecutor ( ) , org . apache . flink . runtime . state . SharedStateRegistry . DEFAULT_FACTORY ) ; "<AssertPlaceHolder>" ; long checkpointId = coord . getPendingCheckpoints ( ) . keySet ( ) . iterator ( ) . next ( ) ; coord . receiveAcknowledgeMessage ( new org . apache . flink . runtime . messages . checkpoint . AcknowledgeCheckpoint ( new org . apache . flink . api . common . JobID ( ) , ackAttemptID1 , checkpointId ) ) ; coord . receiveAcknowledgeMessage ( new org . apache . flink . runtime . messages . checkpoint . AcknowledgeCheckpoint ( jid , ackAttemptID1 , 1L ) ) ; coord . receiveAcknowledgeMessage ( new org . apache . flink . runtime . messages . checkpoint . AcknowledgeCheckpoint ( jid , new org . apache . flink . runtime . executiongraph . ExecutionAttemptID ( ) , checkpointId ) ) ; coord . shutdown ( JobStatus . FINISHED ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } } triggerCheckpoint ( long , boolean ) { return triggerCheckpoint ( timestamp , checkpointProperties , null , isPeriodic , false ) . isSuccess ( ) ; } | org . junit . Assert . assertTrue ( coord . triggerCheckpoint ( timestamp , false ) ) |
testValidToken ( ) { org . talend . esb . test . oidc . OidcAccessTokenValidatorTest . ContainerRequestContextTest ctx = new org . talend . esb . test . oidc . OidcAccessTokenValidatorTest . ContainerRequestContextTest ( ) ; setAuthzHeader ( "Bearer<sp>valid_token" ) ; try { org . talend . esb . test . oidc . OidcAccessTokenValidatorTest . validator . filter ( ctx ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } "<AssertPlaceHolder>" ; } isAborted ( ) { return aborted ; } | org . junit . Assert . assertFalse ( ctx . isAborted ( ) ) |
testIsCheckerDisabledWhenUnsettingForbiddenOrganizationToUser ( ) { long forbiddenOrganizationId = addForbiddenOrganizations ( ) [ 0 ] ; com . liferay . portal . kernel . model . Organization forbiddenOrganization = com . liferay . portal . kernel . service . OrganizationLocalServiceUtil . getOrganization ( forbiddenOrganizationId ) ; com . liferay . portlet . usersadmin . search . UserOrganizationChecker userOrganizationChecker = new com . liferay . portlet . usersadmin . search . UserOrganizationChecker ( com . liferay . portal . security . membership . policy . organization . test . OrganizationMembershipPolicyRowCheckerTest . _renderResponse , forbiddenOrganization ) ; com . liferay . portal . kernel . model . User user = com . liferay . portal . kernel . test . util . UserTestUtil . addUser ( ) ; com . liferay . portal . kernel . service . OrganizationLocalServiceUtil . addUserOrganization ( user . getUserId ( ) , forbiddenOrganizationId ) ; "<AssertPlaceHolder>" ; } isDisabled ( java . lang . Object ) { com . liferay . portal . kernel . model . UserNotificationEvent userNotificationEvent = ( ( com . liferay . portal . kernel . model . UserNotificationEvent ) ( obj ) ) ; if ( userNotificationEvent . isActionRequired ( ) ) { return true ; } return super . isDisabled ( obj ) ; } | org . junit . Assert . assertFalse ( userOrganizationChecker . isDisabled ( user ) ) |
testTranslateContextKnownTypeError ( ) { int context = - 10 ; java . lang . String result = org . goodoldai . jeff . report . json . JSONChunkUtility . translateContext ( context , textEchunk1 ) ; java . lang . String err = "error" ; "<AssertPlaceHolder>" ; } translateContext ( int , org . goodoldai . jeff . explanation . ExplanationChunk ) { java . lang . Class cl = echunk . getClass ( ) ; java . lang . reflect . Field [ ] fields = cl . getFields ( ) ; for ( int i = 0 ; i < ( fields . length ) ; i ++ ) { try { java . lang . reflect . Field field = fields [ i ] ; if ( ( field . getInt ( field . getName ( ) ) ) == context ) { return field . getName ( ) . toLowerCase ( ) ; } } catch ( java . lang . IllegalArgumentException ex ) { throw new org . goodoldai . jeff . explanation . ExplanationException ( ex . getMessage ( ) ) ; } catch ( java . lang . IllegalAccessException ex ) { throw new org . goodoldai . jeff . explanation . ExplanationException ( ex . getMessage ( ) ) ; } } return java . lang . String . valueOf ( context ) ; } | org . junit . Assert . assertEquals ( err , result ) |
shouldReturnEmptyOptionalWhenWorkflowIdDoesNotExist ( ) { java . util . Optional < com . spotify . styx . model . Workflow > retrieved = storage . workflow ( com . spotify . styx . model . WorkflowId . create ( "foo" , "bar" ) ) ; "<AssertPlaceHolder>" ; } is ( com . spotify . styx . api . Api$Version ) { return new org . hamcrest . TypeSafeMatcher < com . spotify . styx . api . Api . Version > ( ) { @ com . spotify . styx . api . Override protected boolean matchesSafely ( com . spotify . styx . api . Api . Version item ) { return ( item . ordinal ( ) ) == ( version . ordinal ( ) ) ; } @ com . spotify . styx . api . Override public void describeTo ( org . hamcrest . Description description ) { description . appendText ( "Version<sp>can<sp>only<sp>be" ) ; description . appendValue ( version ) ; } } ; } | org . junit . Assert . assertThat ( retrieved , org . hamcrest . Matchers . is ( java . util . Optional . empty ( ) ) ) |
marksPosition ( ) { double [ ] array = new double [ ] { 2 , 3 , 5 , 7 } ; java . nio . DoubleBuffer buffer = java . nio . DoubleBuffer . wrap ( array ) ; buffer . position ( 1 ) ; buffer . mark ( ) ; buffer . position ( 2 ) ; buffer . reset ( ) ; "<AssertPlaceHolder>" ; } position ( ) { return position ; } | org . junit . Assert . assertThat ( buffer . position ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . LayoutVersion > layoutVersions = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( layoutVersions . isEmpty ( ) ) |
testNullScopeEqualsEmptyStringScope ( ) { final com . picocontainer . security . PicoAccessPermission mainTest = new com . picocontainer . security . PicoAccessPermission ( null , "read,write" ) ; final com . picocontainer . security . PicoAccessPermission testTwo = new com . picocontainer . security . PicoAccessPermission ( "" , "read,write" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( mainTest , testTwo ) |
validFloatLessThanConstraintShouldNotCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createLessDefinition ( ToscaTypes . FLOAT . toString ( ) , 42.456F ) , alien4cloud . tosca . container . validation . ToscaSequence . class ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "name:<sp>[" + ( name ) ) + "],<sp>value:<sp>[" ) + ( value ) ) + "]" ; } | org . junit . Assert . assertEquals ( 0 , violations . size ( ) ) |
test2_28LogFile ( ) { net . openhft . chronicle . bytes . Bytes b = net . openhft . chronicle . bytes . Bytes . elasticByteBuffer ( ) ; try { java . io . InputStream is = net . openhft . chronicle . wire . YamlSpecTest . class . getResourceAsStream ( ( ( net . openhft . chronicle . wire . YamlSpecTest . DIR ) + "2_28LogFile.yaml" ) ) ; java . lang . Object o = net . openhft . chronicle . wire . Marshallable . fromString ( is ) ; "<AssertPlaceHolder>" ; java . lang . String actual = o . toString ( ) ; } finally { b . release ( ) ; } } fromString ( java . lang . CharSequence ) { return net . openhft . chronicle . wire . WireType . TEXT . fromString ( cs ) ; } | org . junit . Assert . assertNotNull ( o ) |
testJsonFormat ( ) { com . sonalake . utah . cli . CommandLineInterface iface = new com . sonalake . utah . cli . CommandLineInterface ( ) ; com . sonalake . utah . cli . CommandLineInterfaceTest . OutputHelper helper = new com . sonalake . utah . cli . CommandLineInterfaceTest . OutputHelper ( ) ; com . sonalake . utah . Parser parser = mock ( com . sonalake . utah . Parser . class ) ; com . sonalake . utah . cli . Map < java . lang . String , java . lang . String > [ ] parsedRecords = new com . sonalake . utah . cli . MapHelper ( ) . newMap ( ) . put ( "a" , "hello" ) . put ( "b" , null ) . newMap ( ) . put ( "b" , "out" ) . put ( "c" , "there" ) . toArray ( ) ; when ( parser . next ( ) ) . thenReturn ( parsedRecords [ 0 ] , parsedRecords [ 1 ] , null ) ; iface . printToJSON ( parser , helper . target ) ; java . lang . String expected = new com . google . gson . GsonBuilder ( ) . setPrettyPrinting ( ) . create ( ) . toJson ( parsedRecords ) ; java . lang . String observed = helper . getOutputAsString ( ) ; "<AssertPlaceHolder>" ; } getOutputAsString ( ) { return new java . lang . String ( baos . toByteArray ( ) , java . nio . charset . StandardCharsets . UTF_8 ) ; } | org . junit . Assert . assertEquals ( expected , observed ) |
testSessionDeleteOnExpiration ( ) { sm . setGlobalSessionTimeout ( 100 ) ; org . apache . shiro . session . mgt . eis . SessionDAO sessionDAO = createMock ( org . apache . shiro . session . mgt . eis . SessionDAO . class ) ; sm . setSessionDAO ( sessionDAO ) ; java . lang . String sessionId1 = java . util . UUID . randomUUID ( ) . toString ( ) ; final org . apache . shiro . session . mgt . SimpleSession session1 = new org . apache . shiro . session . mgt . SimpleSession ( ) ; session1 . setId ( sessionId1 ) ; final org . apache . shiro . session . Session [ ] activeSession = new org . apache . shiro . session . mgt . SimpleSession [ ] { session1 } ; sm . setSessionFactory ( new org . apache . shiro . session . mgt . SessionFactory ( ) { public org . apache . shiro . session . Session createSession ( org . apache . shiro . session . mgt . SessionContext initData ) { return activeSession [ 0 ] ; } } ) ; expect ( sessionDAO . create ( eq ( session1 ) ) ) . andReturn ( sessionId1 ) ; sessionDAO . update ( eq ( session1 ) ) ; expectLastCall ( ) . anyTimes ( ) ; replay ( sessionDAO ) ; org . apache . shiro . session . Session session = sm . start ( null ) ; "<AssertPlaceHolder>" ; verify ( sessionDAO ) ; reset ( sessionDAO ) ; expect ( sessionDAO . readSession ( sessionId1 ) ) . andReturn ( session1 ) . anyTimes ( ) ; sessionDAO . update ( eq ( session1 ) ) ; replay ( sessionDAO ) ; sm . setTimeout ( new org . apache . shiro . session . mgt . DefaultSessionKey ( sessionId1 ) , 1 ) ; verify ( sessionDAO ) ; reset ( sessionDAO ) ; sleep ( 20 ) ; expect ( sessionDAO . readSession ( sessionId1 ) ) . andReturn ( session1 ) ; sessionDAO . update ( eq ( session1 ) ) ; sessionDAO . delete ( session1 ) ; replay ( sessionDAO ) ; try { sm . getTimeout ( new org . apache . shiro . session . mgt . DefaultSessionKey ( sessionId1 ) ) ; org . junit . Assert . fail ( ( ( "Session<sp>with<sp>id<sp>[" + sessionId1 ) + "]<sp>should<sp>have<sp>expired<sp>due<sp>to<sp>timeout." ) ) ; } catch ( org . apache . shiro . session . ExpiredSessionException expected ) { } verify ( sessionDAO ) ; } start ( org . apache . shiro . session . mgt . SessionContext ) { return createSession ( context ) ; } | org . junit . Assert . assertNotNull ( session ) |
isCanonicalClassNameUsed_A$String$String$ClassMeta_CanonicalClassName ( ) { java . lang . String expectedCanonicalClassName = "com.example.bean.SampleBean" ; java . lang . String usedClassName = "com.example.bean.SampleBean" ; org . junithelper . core . meta . ClassMeta targetClassMeta = new org . junithelper . core . meta . ClassMeta ( ) ; boolean actual = org . junithelper . core . generator . GeneratorImplFunction . isCanonicalClassNameUsed ( expectedCanonicalClassName , usedClassName , targetClassMeta ) ; boolean expected = true ; "<AssertPlaceHolder>" ; } isCanonicalClassNameUsed ( java . lang . String , java . lang . String , org . junithelper . core . meta . ClassMeta ) { org . junithelper . core . util . Assertion . on ( "expectedCanonicalClassName" ) . mustNotBeNull ( expectedCanonicalClassName ) ; org . junithelper . core . util . Assertion . on ( "usedClassName" ) . mustNotBeNull ( usedClassName ) ; org . junithelper . core . util . Assertion . on ( "targetClassMeta" ) . mustNotBeNull ( targetClassMeta ) ; if ( ( usedClassName . equals ( expectedCanonicalClassName ) ) || ( usedClassName . equals ( expectedCanonicalClassName . replace ( "java.lang." , "" ) ) ) ) { return true ; } else { java . lang . String [ ] extSplitted = expectedCanonicalClassName . split ( "\\." ) ; java . lang . String extClassName = extSplitted [ ( ( extSplitted . length ) - 1 ) ] ; if ( usedClassName . equals ( extClassName ) ) { java . lang . String extInSamplePackage = ( ( targetClassMeta . packageName ) + "." ) + extClassName ; if ( extInSamplePackage . equals ( expectedCanonicalClassName ) ) { return true ; } else { for ( java . lang . String imported : targetClassMeta . importedList ) { java . lang . String target = expectedCanonicalClassName . replaceFirst ( extClassName , "" ) ; if ( ( imported . matches ( expectedCanonicalClassName ) ) || ( imported . matches ( ( target + ".+" ) ) ) ) { return true ; } } } } } return false ; } | org . junit . Assert . assertThat ( actual , is ( equalTo ( expected ) ) ) |
getOOBSupportedOperations_OOBUnavailable ( ) { java . util . HashMap < java . lang . String , java . util . List < com . vmware . vrack . hms . common . servernodes . api . HmsApi > > oobOperations = com . vmware . vrack . hms . aggregator . util . InventoryUtil . getOOBSupportedOperations ( "/samplePath" , "application/json" ) ; "<AssertPlaceHolder>" ; } getOOBSupportedOperations ( java . lang . String , java . lang . String ) { com . vmware . vrack . hms . aggregator . util . InventoryUtil . logger . debug ( java . lang . String . format ( "Trying<sp>to<sp>get<sp>inventory<sp>OOB.<sp>Url<sp>for<sp>OOB<sp>operation<sp>-<sp>Path:<sp>%s,<sp>Content<sp>Type:<sp>%s<sp>" , path , contentType ) ) ; org . springframework . http . ResponseEntity < java . util . HashMap < java . lang . String , java . util . List < com . vmware . vrack . hms . common . servernodes . api . HmsApi > > > oobResponse = null ; if ( path != null ) { try { com . vmware . vrack . hms . rest . factory . HmsOobAgentRestTemplate < java . lang . Object > restTemplate = new com . vmware . vrack . hms . rest . factory . HmsOobAgentRestTemplate < java . lang . Object > ( null , contentType ) ; org . springframework . core . ParameterizedTypeReference < java . util . HashMap < java . lang . String , java . util . List < com . vmware . vrack . hms . common . servernodes . api . HmsApi > > > typeRef = new org . springframework . core . ParameterizedTypeReference < java . util . HashMap < java . lang . String , java . util . List < com . vmware . vrack . hms . common . servernodes . api . HmsApi > > > ( ) { } ; oobResponse = restTemplate . exchange ( HttpMethod . GET , path , typeRef ) ; } catch ( org . springframework . web . client . HttpStatusCodeException e ) { org . springframework . http . HttpHeaders headers = new org . springframework . http . HttpHeaders ( ) ; headers . setContentType ( MediaType . APPLICATION_JSON ) ; com . vmware . vrack . hms . aggregator . util . InventoryUtil . logger . error ( ( "Http<sp>Status<sp>Code<sp>Exception<sp>when<sp>trying<sp>to<sp>get<sp>oob<sp>operations:<sp>" + e ) ) ; } catch ( java . lang . Exception e ) { com . vmware . vrack . hms . aggregator . util . InventoryUtil . logger . error ( ( "Error<sp>while<sp>trying<sp>to<sp>get<sp>nodes:<sp>" + e ) ) ; throw new com . vmware . vrack . hms . common . exception . HMSRestException ( HttpStatus . INTERNAL_SERVER_ERROR . value ( ) , "Server<sp>Error" , ( "Exception<sp>while<sp>connecting<sp>to<sp>hms." + ( path != null ? path . toString ( ) : "" ) ) ) ; } } else { com . vmware . vrack . hms . aggregator . util . InventoryUtil . logger . error ( java . lang . String . format ( ( "Unable<sp>to<sp>get<sp>OOB<sp>supported<sp>operations<sp>because<sp>some<sp>Final<sp>OOB<sp>Url<sp>cannot<sp>be<sp>constructed.<sp>" + "Url<sp>for<sp>OOB<sp>operation<sp>is<sp>Path:<sp>%s,<sp>Content<sp>Type:<sp>%s<sp>" ) , path , contentType ) ) ; throw new com . vmware . vrack . hms . common . exception . HMSRestException ( HttpStatus . INTERNAL_SERVER_ERROR . value ( ) , "Server<sp>Error" , "Exception<sp>while<sp>connecting<sp>to<sp>hms.<sp>Unable<sp>to<sp>create<sp>Url" ) ; } return oobResponse . getBody ( ) ; } | org . junit . Assert . assertNull ( oobOperations ) |
serialize ( ) { com . google . gson . Gson gson = com . github . seratch . jslack . common . json . GsonFactory . createSnakeCase ( ) ; com . github . seratch . jslack . api . model . event . FileDeletedEvent event = new com . github . seratch . jslack . api . model . event . FileDeletedEvent ( ) ; event . setFileId ( "123" ) ; event . setEventTs ( "234" ) ; java . lang . String generatedJson = gson . toJson ( event ) ; java . lang . String expectedJson = "{\"type\":\"file_deleted\",\"file_id\":\"123\",\"event_ts\":\"234\"}" ; "<AssertPlaceHolder>" ; } createSnakeCase ( ) { return new com . google . gson . GsonBuilder ( ) . setFieldNamingPolicy ( FieldNamingPolicy . LOWER_CASE_WITH_UNDERSCORES ) . registerTypeAdapter ( com . github . seratch . jslack . api . model . block . LayoutBlock . class , new com . github . seratch . jslack . common . json . GsonLayoutBlockFactory ( ) ) . registerTypeAdapter ( com . github . seratch . jslack . api . model . block . composition . TextObject . class , new com . github . seratch . jslack . common . json . GsonTextObjectFactory ( ) ) . registerTypeAdapter ( com . github . seratch . jslack . api . model . block . ContextBlockElement . class , new com . github . seratch . jslack . common . json . GsonContextBlockElementFactory ( ) ) . registerTypeAdapter ( com . github . seratch . jslack . api . model . block . element . BlockElement . class , new com . github . seratch . jslack . common . json . GsonBlockElementFactory ( ) ) . create ( ) ; } | org . junit . Assert . assertThat ( generatedJson , org . hamcrest . CoreMatchers . is ( expectedJson ) ) |
testGetMERGE ( ) { java . lang . String actual = table . getMERGE ( ) ; java . lang . String expected = "merge" ; "<AssertPlaceHolder>" ; } getMERGE ( ) { return "merge" ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testCreateCanonicalCondition ( ) { com . google . api . ads . adwords . axis . v201809 . cm . ProductCanonicalCondition condition = com . google . api . ads . adwords . axis . utils . v201809 . shopping . ProductDimensions . createCanonicalCondition ( ProductCanonicalConditionCondition . NEW ) ; "<AssertPlaceHolder>" ; } getCondition ( ) { return condition ; } | org . junit . Assert . assertEquals ( ProductCanonicalConditionCondition . NEW , condition . getCondition ( ) ) |
testGetScreenshotAsBase64 ( ) { driver . get ( pages . simpleTestPage ) ; java . lang . String screenshot = screenshoter . getScreenshotAs ( OutputType . BASE64 ) ; "<AssertPlaceHolder>" ; } length ( ) { return 1 ; } | org . junit . Assert . assertTrue ( ( ( screenshot . length ( ) ) > 0 ) ) |
testPropertyIsLessThanOrEqualToLongLiteral ( ) { net . opengis . filter . v_1_1_0 . FilterType filterType = cswFilterDelegate . propertyIsLessThanOrEqualTo ( propertyName , shortLiteral ) ; java . lang . String cqlText = org . codice . ddf . spatial . ogc . csw . catalog . source . CswCqlTextFilter . getInstance ( ) . getCqlText ( filterType ) ; "<AssertPlaceHolder>" ; } getCqlText ( net . opengis . filter . v_1_1_0 . FilterType ) { org . geotools . xml . Parser parser = new org . geotools . xml . Parser ( new org . geotools . filter . v1_1 . OGCConfiguration ( ) ) ; try { java . io . StringReader reader = new java . io . StringReader ( marshalFilterType ( filterType ) ) ; java . lang . Object parsedFilter = parser . parse ( reader ) ; if ( parsedFilter instanceof org . opengis . filter . Filter ) { org . opengis . filter . Filter filterToCql = ( ( org . opengis . filter . Filter ) ( parsedFilter ) ) ; org . codice . ddf . spatial . ogc . csw . catalog . source . CswCqlTextFilter . LOGGER . debug ( "Filter<sp>to<sp>Convert<sp>to<sp>CQL<sp>=><sp>{}" , filterToCql ) ; java . lang . String cql = org . geotools . filter . text . ecql . ECQL . toCQL ( filterToCql ) ; org . codice . ddf . spatial . ogc . csw . catalog . source . CswCqlTextFilter . LOGGER . debug ( "Generated<sp>CQL<sp>from<sp>Filter<sp>=><sp>{}" , cql ) ; return cql ; } else { throw new ddf . catalog . source . UnsupportedQueryException ( "Query<sp>did<sp>not<sp>produce<sp>a<sp>valid<sp>filter." ) ; } } catch ( java . io . IOException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } catch ( org . xml . sax . SAXException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } catch ( javax . xml . parsers . ParserConfigurationException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } catch ( javax . xml . bind . JAXBException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } } | org . junit . Assert . assertEquals ( propertyIsLessThanOrEqualTo , cqlText ) |
test1 ( ) { int expectedGas = 438 ; org . ethereum . vm . DataWord key1 = new org . ethereum . vm . DataWord ( 999 ) ; org . ethereum . vm . DataWord value1 = new org . ethereum . vm . DataWord ( 3 ) ; java . lang . String callerAddr = "cd2a3d9f938e13cd947ec05abc7fe734df8dd826" ; java . lang . String contractAddr = "77045e71a7a2c50903d88e564cd72fab11e82051" ; java . lang . String code = "6103e75660005460006000530b0f630000004c596001600053036103e757600060006000600060007377045e71a7a2c50903d88e564cd72fab11e820516008600a5c0402f1630000004c585d00" ; byte [ ] contractAddrB = org . spongycastle . util . encoders . Hex . decode ( contractAddr ) ; byte [ ] callerAddrB = org . spongycastle . util . encoders . Hex . decode ( callerAddr ) ; byte [ ] codeB = org . spongycastle . util . encoders . Hex . decode ( code ) ; byte [ ] codeKey = org . ethereum . crypto . HashUtil . sha3 ( codeB ) ; org . ethereum . core . AccountState accountState = new org . ethereum . core . AccountState ( ) ; accountState . setCodeHash ( codeKey ) ; org . ethereum . vm . ProgramInvokeMockImpl pi = new org . ethereum . vm . ProgramInvokeMockImpl ( ) ; pi . setOwnerAddress ( contractAddrB ) ; org . ethereum . facade . Repository repository = pi . getRepository ( ) ; repository . createAccount ( callerAddrB ) ; repository . addBalance ( callerAddrB , new java . math . BigInteger ( "100000000000000000000" ) ) ; repository . createAccount ( contractAddrB ) ; repository . saveCode ( contractAddrB , codeB ) ; repository . addStorageRow ( contractAddrB , key1 , value1 ) ; org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; org . ethereum . vm . Program program = new org . ethereum . vm . Program ( codeB , pi ) ; try { while ( ! ( program . isStopped ( ) ) ) vm . step ( program ) ; } catch ( java . lang . RuntimeException e ) { program . setRuntimeFailure ( e ) ; } System . out . println ( ) ; System . out . println ( "============<sp>Results<sp>============" ) ; java . math . BigInteger balance = repository . getBalance ( callerAddrB ) ; System . out . println ( ( "***<sp>Used<sp>gas:<sp>" + ( program . result . getGasUsed ( ) ) ) ) ; System . out . println ( ( "***<sp>Contract<sp>Balance:<sp>" + balance ) ) ; repository . close ( ) ; "<AssertPlaceHolder>" ; } getGasUsed ( ) { return gasUsed ; } | org . junit . Assert . assertEquals ( expectedGas , program . result . getGasUsed ( ) ) |
isBrokerRevenueSharePercentVisible_notReadonly_noRevenueShare ( ) { org . oscm . ui . model . Marketplace m = new org . oscm . ui . model . Marketplace ( ) ; m . setRevenueSharesReadOnly ( true ) ; m . setBrokerRevenueShareObject ( null ) ; "<AssertPlaceHolder>" ; } isBrokerRevenueShareVisible ( ) { return ( isRevenueSharesReadOnly ( ) ) && ( ( brokerRevenueShare ) != null ) ; } | org . junit . Assert . assertFalse ( m . isBrokerRevenueShareVisible ( ) ) |
testPropertySetAndGet ( ) { config . setProperty ( org . trendafilov . confucius . ConfigurationTest . TEST_KEY , "value" ) ; "<AssertPlaceHolder>" ; } setProperty ( java . lang . String , T ) { java . lang . String item = value . toString ( ) ; java . lang . System . setProperty ( key , item ) ; org . trendafilov . confucius . core . AbstractConfiguration . LOG . info ( "Set<sp>configuration<sp>property:<sp>[{}]<sp>=><sp>[{}]" , key , item ) ; } | org . junit . Assert . assertEquals ( "value" , java . lang . System . getProperty ( org . trendafilov . confucius . ConfigurationTest . TEST_KEY ) ) |
ISSUE_merge_collapse_non_bubble_results_in_invalid_kmer_path ( ) { au . edu . wehi . idsv . debruijn . positional . KmerPathNode start = KPN ( 4 , "AAAA" , 1 , 1 , true ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode toMerge1 = KPN ( 4 , "AAAT" , 2 , 2 , true ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode toMerge2 = KPN ( 4 , "AATGGG" , 3 , 3 , true ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode into = KPN ( 4 , "AAACGGG" , 2 , 2 , true ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode end = KPN ( 4 , "GGGG" , 6 , 6 , true ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode toMergeAlt = KPN ( 4 , "AATCCCGTGTGTTGTG" , 3 , 3 , true ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( start , toMerge1 ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( toMerge1 , toMerge2 ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( start , into ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( toMerge2 , end ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( into , end ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( toMerge1 , toMergeAlt ) ; java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > result = go ( 4 , 100 , 2 , com . google . common . collect . ImmutableList . of ( start , toMerge1 , toMerge2 , into , end , toMergeAlt ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return kmers . size ( ) ; } | org . junit . Assert . assertEquals ( 5 , result . size ( ) ) |
test6 ( ) { java . lang . String addr = "cd2a3d9f938e13cd947ec05abc7fe734df8dd826" ; org . ethereum . facade . Repository repository = new org . ethereum . db . RepositoryImpl ( ) ; byte [ ] code ; try { code = repository . getCode ( org . spongycastle . util . encoders . Hex . decode ( addr ) ) ; "<AssertPlaceHolder>" ; } finally { repository . close ( ) ; } } decode ( byte [ ] ) { org . ethereum . util . RLPList data = org . ethereum . util . RLP . decode2 ( rlpCode ) ; org . ethereum . util . RLPList rlpList = ( ( org . ethereum . util . RLPList ) ( data . get ( 0 ) ) ) ; org . ethereum . util . RLPList keys = ( ( org . ethereum . util . RLPList ) ( rlpList . get ( 0 ) ) ) ; org . ethereum . util . RLPList values = ( ( org . ethereum . util . RLPList ) ( rlpList . get ( 1 ) ) ) ; org . ethereum . util . RLPElement code = ( ( org . ethereum . util . RLPElement ) ( rlpList . get ( 2 ) ) ) ; if ( ( keys . size ( ) ) > 0 ) { storageKeys = new java . util . ArrayList ( ) ; storageValues = new java . util . ArrayList ( ) ; } for ( int i = 0 ; i < ( keys . size ( ) ) ; ++ i ) { org . ethereum . util . RLPItem rlpItem = ( ( org . ethereum . util . RLPItem ) ( keys . get ( i ) ) ) ; storageKeys . add ( new org . ethereum . vm . DataWord ( rlpItem . getRLPData ( ) ) ) ; } for ( int i = 0 ; i < ( values . size ( ) ) ; ++ i ) { org . ethereum . util . RLPItem rlpItem = ( ( org . ethereum . util . RLPItem ) ( values . get ( i ) ) ) ; storageValues . add ( new org . ethereum . vm . DataWord ( rlpItem . getRLPData ( ) ) ) ; } for ( int i = 0 ; i < ( keys . size ( ) ) ; ++ i ) { org . ethereum . vm . DataWord key = storageKeys . get ( i ) ; org . ethereum . vm . DataWord value = storageValues . get ( i ) ; storageTrie . update ( key . getData ( ) , org . ethereum . util . RLP . encodeElement ( value . getNoLeadZeroesData ( ) ) ) ; } this . code = code . getRLPData ( ) ; this . rlpEncoded = rlpCode ; } | org . junit . Assert . assertTrue ( ( code == null ) ) |
testGetDev ( ) { org . dcache . nfs . vfs . Stat stat = new org . dcache . nfs . vfs . Stat ( ) ; stat . setDev ( 1 ) ; "<AssertPlaceHolder>" ; } getDev ( ) { guard ( org . dcache . nfs . vfs . Stat . StatAttribute . DEV ) ; return _dev ; } | org . junit . Assert . assertEquals ( 1 , stat . getDev ( ) ) |
getLength_noPosition ( ) { cruise . umple . parser . Token t = new cruise . umple . parser . Token ( "p" , "START" ) ; "<AssertPlaceHolder>" ; } getLength ( ) { return length ; } | org . junit . Assert . assertEquals ( 5 , t . getLength ( ) ) |
testNewChemFile ( ) { org . openscience . cdk . interfaces . IChemObjectBuilder builder = org . openscience . cdk . AbstractChemObjectBuilderTest . rootObject . getBuilder ( ) ; org . openscience . cdk . interfaces . IChemFile file = builder . newInstance ( org . openscience . cdk . interfaces . IChemFile . class ) ; "<AssertPlaceHolder>" ; } getBuilder ( ) { return org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ; } | org . junit . Assert . assertNotNull ( file ) |
testFindHighestMatchingBuildNumber_Fuse ( ) { java . lang . String version = "2.10.0-000164.fuse-000001-redhat" ; final java . util . Set < java . lang . String > versionSet = new java . util . HashSet ( ) ; versionSet . add ( "2.10.0.redhat-000022" ) ; versionSet . add ( "2.10.0.000164-fuse-000001-redhat-2" ) ; versionSet . add ( "2.10.0.fuse-000022-redhat-2" ) ; versionSet . add ( "2.10.0.fuse-000022-redhat-1" ) ; "<AssertPlaceHolder>" ; versionSet . clear ( ) ; } findHighestMatchingBuildNumber ( java . lang . String , java . util . Set ) { int highestBuildNum = 0 ; java . lang . String osgiVersion = org . commonjava . maven . ext . core . impl . Version . getOsgiVersion ( version ) ; java . lang . String qualifier = org . commonjava . maven . ext . core . impl . Version . getQualifier ( osgiVersion ) ; java . util . regex . Matcher qualifierMatcher = org . commonjava . maven . ext . core . impl . Version . qualifierPattern . matcher ( qualifier ) ; if ( qualifierMatcher . matches ( ) ) { qualifier = org . commonjava . maven . ext . core . impl . Version . removeLeadingDelimiter ( qualifierMatcher . group ( 1 ) ) ; } java . lang . StringBuilder versionPatternBuf = new java . lang . StringBuilder ( ) ; versionPatternBuf . append ( '(' ) . append ( java . util . regex . Pattern . quote ( org . commonjava . maven . ext . core . impl . Version . getMMM ( version ) ) ) . append ( '(' ) . append ( org . commonjava . maven . ext . core . impl . Version . DELIMITER_REGEX ) . append ( "0)*" ) . append ( ")?" ) . append ( org . commonjava . maven . ext . core . impl . Version . DELIMITER_REGEX ) ; if ( ! ( org . commonjava . maven . ext . core . impl . Version . isEmpty ( qualifier ) ) ) { versionPatternBuf . append ( java . util . regex . Pattern . quote ( qualifier ) ) ; versionPatternBuf . append ( org . commonjava . maven . ext . core . impl . Version . DELIMITER_REGEX ) ; } versionPatternBuf . append ( "(\\d+)" ) ; java . lang . String candidatePatternStr = versionPatternBuf . toString ( ) ; org . commonjava . maven . ext . core . impl . Version . logger . debug ( "Using<sp>pattern:<sp>'{}'<sp>to<sp>find<sp>compatible<sp>versions<sp>from<sp>metadata." , candidatePatternStr ) ; final java . util . regex . Pattern candidateSuffixPattern = java . util . regex . Pattern . compile ( candidatePatternStr ) ; for ( final java . lang . String compareVersion : versionSet ) { final java . util . regex . Matcher candidateSuffixMatcher = candidateSuffixPattern . matcher ( compareVersion ) ; if ( candidateSuffixMatcher . matches ( ) ) { java . lang . String buildNumberStr = candidateSuffixMatcher . group ( 3 ) ; int compareBuildNum = java . lang . Integer . parseInt ( buildNumberStr ) ; if ( compareBuildNum > highestBuildNum ) { highestBuildNum = compareBuildNum ; } } } org . commonjava . maven . ext . core . impl . Version . logger . debug ( "Found<sp>highest<sp>matching<sp>build<sp>number<sp>{}<sp>from<sp>set<sp>{}<sp>" , highestBuildNum , versionSet ) ; return highestBuildNum ; } | org . junit . Assert . assertThat ( org . commonjava . maven . ext . core . impl . Version . findHighestMatchingBuildNumber ( version , versionSet ) , org . hamcrest . CoreMatchers . equalTo ( 2 ) ) |
testSortArrayIgnoreCase ( ) { final org . apache . commons . vfs2 . FileObject file1 = org . apache . commons . vfs2 . provider . test . FileObjectSortTestCase . VfsFileSystem . resolveFile ( "A1" ) ; final org . apache . commons . vfs2 . FileObject file2 = org . apache . commons . vfs2 . provider . test . FileObjectSortTestCase . VfsFileSystem . resolveFile ( "a2" ) ; final org . apache . commons . vfs2 . FileObject file3 = org . apache . commons . vfs2 . provider . test . FileObjectSortTestCase . VfsFileSystem . resolveFile ( "A3" ) ; final org . apache . commons . vfs2 . FileObject [ ] actualArray = new org . apache . commons . vfs2 . FileObject [ ] { file3 , file1 , file2 , file1 , file2 } ; final org . apache . commons . vfs2 . FileObject [ ] expectedArray = new org . apache . commons . vfs2 . FileObject [ ] { file1 , file1 , file2 , file2 , file3 } ; java . util . Arrays . sort ( actualArray ) ; "<AssertPlaceHolder>" ; } resolveFile ( org . apache . commons . vfs2 . FileName ) { synchronized ( this ) { if ( ( this . fs ) == null ) { final java . lang . String hdfsUri = name . getRootURI ( ) ; final org . apache . commons . vfs2 . provider . hdfs . HdfsFileSystemConfigBuilder builder = org . apache . commons . vfs2 . provider . hdfs . HdfsFileSystemConfigBuilder . getInstance ( ) ; final org . apache . commons . vfs2 . FileSystemOptions options = getFileSystemOptions ( ) ; final java . lang . String [ ] configNames = builder . getConfigNames ( options ) ; final org . apache . hadoop . fs . Path [ ] configPaths = builder . getConfigPaths ( options ) ; final java . net . URL [ ] configURLs = builder . getConfigURLs ( options ) ; final java . io . InputStream configStream = builder . getConfigInputStream ( options ) ; final org . apache . hadoop . conf . Configuration configConfiguration = builder . getConfigConfiguration ( options ) ; final org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( true ) ; conf . set ( FileSystem . FS_DEFAULT_NAME_KEY , hdfsUri ) ; if ( configNames != null ) { for ( final java . lang . String configName : configNames ) { org . apache . commons . vfs2 . provider . hdfs . HdfsFileSystem . log . debug ( ( "Adding<sp>HDFS<sp>configuration<sp>resource:<sp>" + configName ) ) ; conf . addResource ( configName ) ; } } if ( configPaths != null ) { for ( final org . apache . hadoop . fs . Path path : configPaths ) { org . apache . commons . vfs2 . provider . hdfs . HdfsFileSystem . log . debug ( ( "Adding<sp>HDFS<sp>configuration<sp>path:<sp>" + path ) ) ; conf . addResource ( path ) ; } } if ( configURLs != null ) { for ( final java . net . URL url : configURLs ) { org . apache . commons . vfs2 . provider . hdfs . HdfsFileSystem . log . debug ( ( "Adding<sp>HDFS<sp>configuration<sp>URL:<sp>" + url ) ) ; conf . addResource ( url ) ; } } if ( configStream != null ) { org . apache . commons . vfs2 . provider . hdfs . HdfsFileSystem . log . debug ( "Adding<sp>HDFS<sp>configuration<sp>stream" ) ; conf . addResource ( configStream ) ; } if ( configConfiguration != null ) { org . apache . commons . vfs2 . provider . hdfs . HdfsFileSystem . log . debug ( "Adding<sp>HDFS<sp>configuration<sp>object" ) ; conf . addResource ( configConfiguration ) ; } try { fs = org . apache . hadoop . fs . FileSystem . get ( conf ) ; } catch ( final java . io . IOException e ) { org . apache . commons . vfs2 . provider . hdfs . HdfsFileSystem . log . error ( ( "Error<sp>connecting<sp>to<sp>filesystem<sp>" + hdfsUri ) , e ) ; throw new org . apache . commons . vfs2 . FileSystemException ( ( "Error<sp>connecting<sp>to<sp>filesystem<sp>" + hdfsUri ) , e ) ; } } } final boolean useCache = null != ( getContext ( ) . getFileSystemManager ( ) . getFilesCache ( ) ) ; org . apache . commons . vfs2 . FileObject file ; if ( useCache ) { file = this . getFileFromCache ( name ) ; } else { file = null ; } if ( null == file ) { java . lang . String path = null ; try { path = java . net . URLDecoder . decode ( name . getPath ( ) , "UTF-8" ) ; } catch ( final java . io . UnsupportedEncodingException e ) { path = name . getPath ( ) ; } final org . apache . hadoop . fs . Path filePath = new org . apache . hadoop . fs . Path ( path ) ; file = new org . apache . commons . vfs2 . provider . hdfs . HdfsFileObject ( ( ( org . apache . commons . vfs2 . provider . AbstractFileName ) ( name ) ) , this , fs , filePath ) ; if ( useCache ) { this . putFileToCache ( file ) ; } } if ( getFileSystemManager ( ) . getCacheStrategy ( ) . equals ( CacheStrategy . ON_RESOLVE ) ) { file . refresh ( ) ; } return file ; } | org . junit . Assert . assertArrayEquals ( expectedArray , actualArray ) |
testIntoTo_ToArray ( ) { xapi . collect . api . IntTo < java . lang . String > array = new xapi . collect . impl . IntToList < java . lang . String > ( java . lang . String . class ) ; array . add ( "1" ) ; java . lang . String [ ] asArray = array . toArray ( ) ; "<AssertPlaceHolder>" ; } get ( K ) { return getter . io ( key ) ; } | org . junit . Assert . assertEquals ( asArray [ 0 ] , array . get ( 0 ) ) |
cannotWriteFileItemsThatFail ( ) { java . util . List < java . lang . String > errors = new java . util . ArrayList < java . lang . String > ( ) ; org . apache . commons . fileupload . FileItem file2FileItem = mock ( org . apache . commons . fileupload . FileItem . class , "file2" ) ; org . apache . commons . fileupload . FileItem zipFileItem = mock ( org . apache . commons . fileupload . FileItem . class , "zip" ) ; when ( zipFileItem . getName ( ) ) . thenReturn ( zip . getName ( ) ) ; doThrow ( new java . io . IOException ( "zip<sp>write<sp>failed" ) ) . when ( zipFileItem ) . write ( zip ) ; when ( file2FileItem . getName ( ) ) . thenReturn ( file2 . getName ( ) ) ; doThrow ( new java . io . IOException ( "file2<sp>write<sp>failed" ) ) . when ( file2FileItem ) . write ( file2 ) ; file2 . delete ( ) ; zip . delete ( ) ; manager . upload ( java . util . Arrays . asList ( file2FileItem , zipFileItem ) , errors ) ; "<AssertPlaceHolder>" ; } size ( ) { return statusCache . getCount ( ) ; } | org . junit . Assert . assertEquals ( 4 , errors . size ( ) ) |
testSetVariableColumns ( ) { final com . orangesignal . csv . CsvConfig cfg = new com . orangesignal . csv . CsvConfig ( ) ; cfg . setVariableColumns ( false ) ; "<AssertPlaceHolder>" ; } isVariableColumns ( ) { return variableColumns ; } | org . junit . Assert . assertThat ( cfg . isVariableColumns ( ) , org . hamcrest . core . Is . is ( false ) ) |
preProcessPassThrough ( ) { this . inputMessage = new flex . messaging . messages . CommandMessage ( flex . messaging . messages . CommandMessage . LOGIN_OPERATION ) ; "<AssertPlaceHolder>" ; } preProcess ( org . springframework . flex . core . MessageProcessingContext , flex . messaging . messages . Message ) { if ( ! ( isPassThroughCommand ( inputMessage ) ) ) { org . springframework . security . access . intercept . InterceptorStatusToken token = beforeInvocation ( context . getMessageTarget ( ) ) ; context . getAttributes ( ) . put ( org . springframework . flex . security3 . EndpointInterceptor . STATUS_TOKEN , token ) ; } return inputMessage ; } | org . junit . Assert . assertSame ( this . inputMessage , this . interceptor . preProcess ( null , this . inputMessage ) ) |
testShouldRestartFromRecoveredStatus ( ) { org . atlasapi . remotesite . rovi . processing . restartable . IngestStatus recoveredStatus = new org . atlasapi . remotesite . rovi . processing . restartable . IngestStatus ( BRANDS_WITH_PARENT , 3 ) ; org . mockito . ArgumentCaptor < org . atlasapi . remotesite . rovi . processing . restartable . IngestStatus > argument = org . mockito . ArgumentCaptor . forClass ( org . atlasapi . remotesite . rovi . processing . restartable . IngestStatus . class ) ; org . atlasapi . remotesite . rovi . processing . restartable . IngestProcessingChain processingChain = new org . atlasapi . remotesite . rovi . processing . restartable . IngestProcessingChain ( steps ) ; processingChain . restartFrom ( recoveredStatus ) ; verify ( step1 , times ( 0 ) ) . execute ( ) ; verify ( step2 , times ( 1 ) ) . execute ( argument . capture ( ) ) ; verify ( step3 , times ( 1 ) ) . execute ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( recoveredStatus , argument . getValue ( ) ) |
testCreate ( ) { org . oscarehr . common . model . LookupListItem entity = new org . oscarehr . common . model . LookupListItem ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; } | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
createTheme ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . theme . tests . THEME ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningProjectBuildingJobs ( ) ; viewAction . project . openUpdateMavenProjectDialog ( com . liferay . ide . ui . theme . tests . NewThemeProjectModuleWorkspaceMavenTests . liferayWorkspace . getName ( ) ) ; dialogAction . updateMavenProject . selectAll ( ) ; dialogAction . confirm ( ) ; jobAction . waitForUpdateMavenProject ( ) ; "<AssertPlaceHolder>" ; viewAction . project . closeAndDelete ( com . liferay . ide . ui . theme . tests . NewThemeProjectModuleWorkspaceMavenTests . liferayWorkspace . getWarFiles ( project . getName ( ) ) ) ; } visibleFileTry ( java . lang . String [ ] ) { try { return _getProjects ( ) . isVisible ( files ) ; } catch ( java . lang . Exception e ) { _getProjects ( ) . setFocus ( ) ; try { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - 1 ) ) ; _getProjects ( ) . expand ( parents ) ; _getProjects ( ) . contextMenu ( com . liferay . ide . ui . liferay . action . REFRESH , parents ) ; ide . sleep ( 2000 ) ; } catch ( java . lang . Exception e1 ) { } for ( int i = ( files . length ) - 1 ; i > 0 ; i -- ) { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - i ) ) ; org . eclipse . swtbot . swt . finder . widgets . SWTBotTreeItem parent = _getProjects ( ) . getTreeItem ( parents ) ; _getProjects ( ) . expand ( parents ) ; java . lang . String subnode = files [ ( ( files . length ) - i ) ] ; _jobAction . waitForSubnode ( parent , subnode , com . liferay . ide . ui . liferay . action . REFRESH ) ; } return _getProjects ( ) . isVisible ( files ) ; } } | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( com . liferay . ide . ui . theme . tests . NewThemeProjectModuleWorkspaceMavenTests . liferayWorkspace . getWarFiles ( project . getName ( ) ) ) ) |
ServicePrincipalClientSymmetricKeyShouldWork ( ) { java . lang . String tenant = config . getProperty ( "media.azuread.test.tenant" ) . toString ( ) ; java . lang . String restApiEndpoint = config . getProperty ( "media.azuread.test.account_api_uri" ) . toString ( ) ; java . lang . String clientId = config . getProperty ( "media.azuread.test.clientid" ) . toString ( ) ; java . lang . String clientKey = config . getProperty ( "media.azuread.test.clientkey" ) . toString ( ) ; com . microsoft . windowsazure . services . media . authentication . AzureAdTokenCredentials credentials = new com . microsoft . windowsazure . services . media . authentication . AzureAdTokenCredentials ( tenant , new com . microsoft . windowsazure . services . media . authentication . AzureAdClientSymmetricKey ( clientId , clientKey ) , com . microsoft . windowsazure . services . media . authentication . AzureEnvironments . AZURE_CLOUD_ENVIRONMENT ) ; com . microsoft . windowsazure . services . media . authentication . TokenProvider provider = new com . microsoft . windowsazure . services . media . authentication . AzureAdTokenProvider ( credentials , executorService ) ; com . microsoft . windowsazure . Configuration configuration = com . microsoft . windowsazure . services . media . MediaConfiguration . configureWithAzureAdTokenProvider ( new java . net . URI ( restApiEndpoint ) , provider ) ; com . microsoft . windowsazure . services . media . MediaContract mediaService = com . microsoft . windowsazure . services . media . MediaService . create ( configuration ) ; com . microsoft . windowsazure . services . media . models . ListResult < com . microsoft . windowsazure . services . media . models . AssetInfo > assets = mediaService . list ( com . microsoft . windowsazure . services . media . models . Asset . list ( ) ) ; "<AssertPlaceHolder>" ; } list ( ) { return new com . microsoft . windowsazure . services . media . entityoperations . DefaultListOperation < com . microsoft . windowsazure . services . media . models . AssetInfo > ( com . microsoft . windowsazure . services . media . models . Asset . ENTITY_SET , new com . sun . jersey . api . client . GenericType < com . microsoft . windowsazure . services . media . models . ListResult < com . microsoft . windowsazure . services . media . models . AssetInfo > > ( ) { } ) ; } | org . junit . Assert . assertNotNull ( assets ) |
testGetExpirationFromMessageUsingAbsoluteExpirationNegative ( ) { final java . util . Date expirationTime = new java . util . Date ( ( - 1 ) ) ; org . apache . qpid . proton . message . impl . MessageImpl protonMessage = ( ( org . apache . qpid . proton . message . impl . MessageImpl ) ( Message . Factory . create ( ) ) ) ; org . apache . qpid . proton . amqp . messaging . Properties properties = new org . apache . qpid . proton . amqp . messaging . Properties ( ) ; properties . setAbsoluteExpiryTime ( expirationTime ) ; protonMessage . setProperties ( properties ) ; org . apache . activemq . artemis . protocol . amqp . broker . AMQPMessage decoded = encodeAndDecodeMessage ( protonMessage ) ; "<AssertPlaceHolder>" ; } getExpiration ( ) { return 0 ; } | org . junit . Assert . assertEquals ( 0 , decoded . getExpiration ( ) ) |
convert_when_mapMessage_has_jmsExpiration ( ) { long jmsExpiration = 3600L ; javax . jms . MapMessage message = new org . apache . activemq . command . ActiveMQMapMessage ( ) ; message . setJMSExpiration ( jmsExpiration ) ; javax . jms . MapMessage result = uut . convert ( message ) ; "<AssertPlaceHolder>" ; } getJMSExpiration ( ) { return this . jmsExpiration ; } | org . junit . Assert . assertEquals ( jmsExpiration , result . getJMSExpiration ( ) ) |
canConvertSocialEventAction ( ) { converter = new edu . zipcloud . cloudstreetmarket . core . converters . IdentifiableToIdConverter ( edu . zipcloud . cloudstreetmarket . core . converters . SocialEventAction . class ) ; "<AssertPlaceHolder>" ; } canConvert ( java . lang . Class ) { return type . isAssignableFrom ( this . type ) ; } | org . junit . Assert . assertTrue ( converter . canConvert ( edu . zipcloud . cloudstreetmarket . core . converters . SocialEventAction . class ) ) |
testParallelScanAsyncFuture ( ) { final com . allanbank . mongodb . client . ClusterStats mockStats = createMock ( com . allanbank . mongodb . client . ClusterStats . class ) ; final com . allanbank . mongodb . bson . builder . DocumentBuilder commandDoc = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) ; commandDoc . add ( "parallelCollectionScan" , "test" ) ; commandDoc . add ( "numCursors" , 2 ) ; final com . allanbank . mongodb . bson . builder . DocumentBuilder replyDoc = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) ; replyDoc . add ( "ok" , 1 ) ; replyDoc . pushArray ( "cursors" ) . push ( ) . push ( "cursor" ) . add ( "id" , 1234 ) . pushArray ( "firstBatch" ) ; final com . allanbank . mongodb . builder . ParallelScan . Builder scan = com . allanbank . mongodb . builder . ParallelScan . builder ( ) . requestedIteratorCount ( 2 ) . readPreference ( ReadPreference . PREFER_SECONDARY ) ; final com . allanbank . mongodb . client . message . ParallelScanCommand commandMsg = new com . allanbank . mongodb . client . message . ParallelScanCommand ( scan . build ( ) , "test" , "test" , commandDoc . build ( ) , com . allanbank . mongodb . ReadPreference . PREFER_SECONDARY ) ; expect ( myMockClient . getClusterType ( ) ) . andReturn ( ClusterType . REPLICA_SET ) ; expect ( myMockDatabase . getName ( ) ) . andReturn ( "test" ) ; myMockClient . send ( eq ( commandMsg ) , com . allanbank . mongodb . AnswerCallback . callback ( reply ( replyDoc . build ( ) ) ) ) ; expectLastCall ( ) ; replay ( mockStats ) ; final java . util . Collection < com . allanbank . mongodb . MongoIterator < com . allanbank . mongodb . bson . Document > > result = myTestInstance . parallelScanAsync ( scan ) . get ( ) ; "<AssertPlaceHolder>" ; verify ( mockStats ) ; } size ( ) { int size = ( HEADER_SIZE ) + 10 ; size += com . allanbank . mongodb . bson . io . StringEncoder . utf8Size ( myDatabaseName ) ; size += com . allanbank . mongodb . bson . io . StringEncoder . utf8Size ( myCollectionName ) ; size += myQuery . size ( ) ; return size ; } | org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . Matchers . is ( 1 ) ) |
shouldExcludeRecordsThatHappenedBeforeWindowStart ( ) { final org . apache . kafka . streams . kstream . UnlimitedWindows w = org . apache . kafka . streams . kstream . UnlimitedWindows . of ( ) . startOn ( ofEpochMilli ( org . apache . kafka . streams . kstream . UnlimitedWindowsTest . anyStartTime ) ) ; final long timestamp = ( w . startMs ) - 1 ; final java . util . Map < java . lang . Long , org . apache . kafka . streams . kstream . internals . UnlimitedWindow > matchedWindows = w . windowsFor ( timestamp ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( headers ) == null ? true : headers . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( matchedWindows . isEmpty ( ) ) |
testToBuilderIncomplete ( ) { com . google . cloud . bigquery . DatasetInfo datasetInfo = com . google . cloud . bigquery . DatasetInfo . newBuilder ( com . google . cloud . bigquery . DatasetInfoTest . DATASET_ID ) . build ( ) ; "<AssertPlaceHolder>" ; } toBuilder ( ) { return ( this ) == ( com . google . firestore . admin . v1 . DeleteIndexRequest . DEFAULT_INSTANCE ) ? new com . google . firestore . admin . v1 . DeleteIndexRequest . Builder ( ) : new com . google . firestore . admin . v1 . DeleteIndexRequest . Builder ( ) . mergeFrom ( this ) ; } | org . junit . Assert . assertEquals ( datasetInfo , datasetInfo . toBuilder ( ) . build ( ) ) |
testGetters ( ) { gov . hhs . fha . nhinc . docsubmission . entity . proxy . EntityDocSubmissionProxyWebServiceUnsecuredImpl proxyImpl = new gov . hhs . fha . nhinc . docsubmission . entity . proxy . EntityDocSubmissionProxyWebServiceUnsecuredImpl ( ) ; "<AssertPlaceHolder>" ; } createWebServiceProxyHelper ( ) { return new gov . hhs . fha . nhinc . webserviceproxy . WebServiceProxyHelper ( ) ; } | org . junit . Assert . assertNotNull ( proxyImpl . createWebServiceProxyHelper ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.