input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
existsReturn ( ) { java . util . List < java . net . URL > paths = java . util . Collections . singletonList ( new java . net . URL ( "http://localhost:80/" ) ) ; when ( mockTracker . getPaths ( fm . last . moji . impl . MojiFileImplTest . KEY , fm . last . moji . impl . MojiFileImplTest . DOMAIN ) ) . thenReturn ( pat... | org . junit . Assert . assertThat ( exists , org . hamcrest . CoreMatchers . is ( true ) ) |
testGetTcpNoDelayDelegatesToSocket2 ( ) { when ( mockS . getTcpNoDelay ( ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; verify ( mockS ) . getTcpNoDelay ( ) ; } getTcpNoDelay ( ) { return socket . getTcpNoDelay ( ) ; } | org . junit . Assert . assertTrue ( ws . getTcpNoDelay ( ) ) |
testSumValuesForRepeatableField ( ) { com . liferay . dynamic . data . mapping . model . DDMForm ddmForm = com . liferay . dynamic . data . mapping . test . util . DDMFormTestUtil . createDDMForm ( ) ; com . liferay . dynamic . data . mapping . model . DDMFormField ddmFormField0 = createDDMFormField ( "field1_0" 2 , "n... | org . junit . Assert . assertEquals ( new java . math . BigDecimal ( 4 ) , ddmFormFieldPropertyChanges . get ( "value" ) ) |
testDescribeBackupPolicy ( ) { try { com . fit2cloud . aliyun . rds . model . request . DescribeBackupPolicyRequest request = new com . fit2cloud . aliyun . rds . model . request . DescribeBackupPolicyRequest ( ) ; request . setDBInstanceId ( dBInstanceId ) ; com . fit2cloud . aliyun . Response response = client . desc... | org . junit . Assert . assertTrue ( true ) |
testSuccessiveMarkup ( ) { startupPage . activate ( ) ; mockTemplate ( "<some<sp>html>" ) ; startupPage . send ( response ) ; org . eclipse . rap . rwt . testfixture . internal . TestResponse subsequentResponse = new org . eclipse . rap . rwt . testfixture . internal . TestResponse ( ) ; startupPage . send ( subsequent... | org . junit . Assert . assertEquals ( response . getContent ( ) , subsequentResponse . getContent ( ) ) |
testCommaDelimitedListToStringArrayEmptyList ( ) { java . util . List < java . lang . String > elements = new java . util . ArrayList < java . lang . String > ( ) ; java . lang . String actual = org . apache . catalina . filters . RemoteIpFilter . listToCommaDelimitedString ( elements ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "" , actual ) |
testPutObjectObject ( ) { cache . put ( "key1" , "value1" ) ; "<AssertPlaceHolder>" ; } get ( K ) { checkValidate ( key ) ; java . lang . ref . SoftReference < V > sr = getCache ( key ) . get ( key ) ; if ( sr == null ) { expiryCache . remove ( key ) ; return null ; } else { return sr . get ( ) ; } } | org . junit . Assert . assertEquals ( "value1" , cache . get ( "key1" ) ) |
testVoorkomenVoorvoegselIncorrect ( ) { final nl . bzk . brp . bijhouding . business . stappen . resultaat . Resultaat resultaat = berichtVerrijkingsStap . voerStapUit ( bouwVoorvoegselTestBericht ( "van<sp>der" , "<sp>" ) , bouwBerichtContext ( "" ) ) ; verify ( referentieDataRepository , times ( 1 ) ) . bestaatVoorvo... | org . junit . Assert . assertEquals ( 1 , resultaat . getMeldingen ( ) . size ( ) ) |
simpleTest ( ) { gov . nasa . ensemble . core . rcp . OperationHistoryMonitor monitor = new gov . nasa . ensemble . core . rcp . OperationHistoryMonitor ( ) ; org . eclipse . core . commands . operations . OperationHistoryEvent event = new org . eclipse . core . commands . operations . OperationHistoryEvent ( org . ecl... | org . junit . Assert . assertTrue ( true ) |
readByte_random ( ) { byte [ ] bytes = "ABC|D|EF" . getBytes ( StandardCharsets . US_ASCII ) ; org . apache . hadoop . io . InputBuffer buffer = new org . apache . hadoop . io . InputBuffer ( ) ; buffer . reset ( bytes , bytes . length ) ; java . util . Random random = new java . util . Random ( 12345 ) ; for ( int i =... | org . junit . Assert . assertThat ( java . util . Arrays . toString ( bounds ) , buf . toString ( ) , is ( "ABC|D|EF" ) ) |
appendJsonAttribute_good_case_value_empty ( ) { java . lang . StringBuilder stringBuilder = new java . lang . StringBuilder ( ) ; stringBuilder . append ( "prefix_" ) ; java . lang . String expResult = "prefix_\"keyname\":null," ; com . microsoft . azure . sdk . iot . service . Tools . appendJsonAttribute ( stringBuild... | org . junit . Assert . assertEquals ( expResult , stringBuilder . toString ( ) ) |
testThatInstantiatesWithoutUsingConstructor ( ) { net . vidageek . mirror . fixtures . ConstructorThatThrowsException instance = new net . vidageek . mirror . dsl . Mirror ( ) . on ( net . vidageek . mirror . fixtures . ConstructorThatThrowsException . class ) . invoke ( ) . constructor ( new net . vidageek . mirror . ... | org . junit . Assert . assertNotNull ( instance ) |
testStructuredEventWithoutTimeoutProperty ( ) { org . jacorb . notification . interfaces . Message _event = messageFactory_ . newMessage ( structuredEvent_ ) ; "<AssertPlaceHolder>" ; } hasTimeout ( ) { return false ; } | org . junit . Assert . assertTrue ( ( ! ( _event . hasTimeout ( ) ) ) ) |
shouldReturnTrueGivenDocumentWithIdExists ( ) { java . lang . Double documentId = org . apache . commons . lang . math . RandomUtils . nextDouble ( ) ; org . springframework . data . elasticsearch . DoubleIDEntity sampleEntity = new org . springframework . data . elasticsearch . DoubleIDEntity ( ) ; sampleEntity . setI... | org . junit . Assert . assertEquals ( exist , true ) |
close ( ) { org . opendaylight . mdsal . dom . store . inmemory . InmemoryDOMDataTreeShardWriteTransactionTest . inmemoryDOMDataTreeShardWriteTransaction . createCursor ( org . opendaylight . mdsal . dom . store . inmemory . InmemoryDOMDataTreeShardWriteTransactionTest . DOM_DATA_TREE_IDENTIFIER ) ; org . opendaylight ... | org . junit . Assert . assertTrue ( org . opendaylight . mdsal . dom . store . inmemory . InmemoryDOMDataTreeShardWriteTransactionTest . inmemoryDOMDataTreeShardWriteTransaction . isFinished ( ) ) |
voteMatch_ONE_ORG_NAME__ENOUGH_COMMON_WORDS__WITH_REGARD_TO_AFF ( ) { voter . setRatioRelation ( RatioRelation . WITH_REGARD_TO_AFF_WORDS ) ; resetOrgNames ( "University<sp>of<sp>Toronto" ) ; whenFilterCharsThen ( affOrgName , "Department<sp>Chemistry<sp>University<sp>Toronto" ) ; whenFilterCharsThen ( "University<sp>o... | org . junit . Assert . assertTrue ( voter . voteMatch ( affiliation , organization ) ) |
shouldTryAnotherTargetOnNewTargetFailure ( ) { setUpTest ( false ) ; givenAFileUpdateForAFileWithOneLocationOffline ( ) ; whenHandleUpdateIsCalled ( ) ; whenVerifyIsRun ( ) ; afterInspectingSourceAndTarget ( ) ; whenOperationFailsWithNewTargetError ( ) ; whenVerifyIsRun ( ) ; "<AssertPlaceHolder>" ; } theNewTargetIsDif... | org . junit . Assert . assertTrue ( theNewTargetIsDifferent ( ) ) |
testShiftNullShort ( ) { final short [ ] array = null ; org . apache . commons . lang3 . ArrayUtils . shift ( array , 1 ) ; "<AssertPlaceHolder>" ; } shift ( java . lang . Object [ ] , int ) { if ( array == null ) { return ; } org . apache . commons . lang3 . ArrayUtils . shift ( array , 0 , array . length , offset ) ;... | org . junit . Assert . assertNull ( array ) |
testGetPathColorNstd ( ) { System . out . println ( "getPathColorNstd" ) ; mudmap2 . backend . World instance = new mudmap2 . backend . World ( "MyWorld" ) ; java . awt . Color expResult = instance . pathColorNonCardinal ; java . awt . Color result = instance . getPathColorNstd ( ) ; "<AssertPlaceHolder>" ; } getPathCo... | org . junit . Assert . assertEquals ( expResult , result ) |
testDeadlock1 ( ) { final org . apache . tinkerpop . gremlin . structure . Vertex v1 = sqlgGraph . addVertex ( T . label , "t1" , "name" , "n1" ) ; org . apache . tinkerpop . gremlin . structure . Vertex v2 = sqlgGraph . addVertex ( T . label , "t1" , "name" , "n2" ) ; org . apache . tinkerpop . gremlin . structure . V... | org . junit . Assert . assertEquals ( 2 , ok . get ( ) ) |
testEqualsName ( ) { import1 . setName ( new org . kie . workbench . common . dmn . api . property . dmn . Name ( "name" ) ) ; import2 . setName ( new org . kie . workbench . common . dmn . api . property . dmn . Name ( "name" ) ) ; "<AssertPlaceHolder>" ; } setName ( org . kie . workbench . common . dmn . api . proper... | org . junit . Assert . assertEquals ( import1 , import2 ) |
testNodeTypeInWithURIFilterNoAction ( ) { org . hawkular . apm . api . model . config . CollectorConfiguration cc = new org . hawkular . apm . api . model . config . CollectorConfiguration ( ) ; org . hawkular . apm . api . model . config . txn . TransactionConfig btc = new org . hawkular . apm . api . model . config .... | org . junit . Assert . assertFalse ( service . hasProperty ( "test" ) ) |
check_defaultKey_succ ( ) { expect ( request . getParameter ( "_csrf_token" ) ) . andReturn ( "any" ) ; replay ( request ) ; "<AssertPlaceHolder>" ; verify ( request ) ; } check ( javax . servlet . http . HttpServletRequest ) { java . lang . String key = com . alibaba . citrus . turbine . util . CsrfToken . getKey ( ) ... | org . junit . Assert . assertTrue ( com . alibaba . citrus . turbine . util . CsrfToken . check ( request ) ) |
testParse_emptyXml ( ) { byte [ ] bytes = "" . getBytes ( StandardCharsets . UTF_8 ) ; org . w3c . dom . Document document = com . google . cloud . tools . eclipse . appengine . validation . PositionalXmlScanner . parse ( bytes ) ; "<AssertPlaceHolder>" ; } parse ( byte [ ] ) { if ( ( bytes . length ) == 0 ) { return n... | org . junit . Assert . assertNull ( document ) |
shouldReturnEscapingQuoteForSingleQuoteAtIndexZero ( ) { edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType type = edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . getType ( 0 , '\'' , 1 ) ; "<AssertPlaceHolder>" ; } getType ( int , char , int ) { if ( java . lang... | org . junit . Assert . assertEquals ( EntityNameCharType . ESCAPING_QUOTE , type ) |
testMaakentityConvertorPredicaat ( ) { nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . ConverterContext ctx = createContext ( nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . entity . IstStapelVoorkomenConverterTest . MINIMAAL ) ; converter . convertInhoudelijk ( ctx , IstStapelVoorkomenConverter . HEADER_... | org . junit . Assert . assertEquals ( predicaat , stapelVoorkomen . getPredicaat ( ) ) |
testAllColumns ( ) { org . apache . ibatis . session . SqlSession sqlSession = tk . mybatis . mapper . mapper . MybatisHelper . getSqlSession ( ) ; try { tk . mybatis . mapper . mapper . CountryMapper mapper = sqlSession . getMapper ( tk . mybatis . mapper . mapper . CountryMapper . class ) ; tk . mybatis . mapper . mo... | org . junit . Assert . assertEquals ( 1 , countryList . size ( ) ) |
getModel ( ) { org . oscm . ui . dialog . classic . partnerservice . PartnerServiceViewModel m = new org . oscm . ui . dialog . classic . partnerservice . PartnerServiceViewModel ( ) ; ctrl . setModel ( m ) ; org . oscm . ui . dialog . classic . partnerservice . PartnerServiceViewModel m2 = ctrl . getModel ( ) ; "<Asse... | org . junit . Assert . assertTrue ( ( m == m2 ) ) |
render_asciidocWithPageTitleAndPageTitlePostProcessorConfigured_returnsConfluencePageWithPostProcessedPageTitle ( ) { java . lang . String adoc = "=<sp>Page<sp>Title" ; org . sahli . asciidoc . confluence . publisher . converter . PageTitlePostProcessor pageTitlePostProcessor = mock ( org . sahli . asciidoc . confluenc... | org . junit . Assert . assertThat ( asciidocConfluencePage . pageTitle ( ) , org . hamcrest . Matchers . is ( "Post-Processed<sp>Page<sp>Title" ) ) |
testSetValue08 ( ) { javax . el . ArrayELResolver resolver = new javax . el . ArrayELResolver ( ) ; javax . el . ELContext context = new javax . el . StandardELContext ( javax . el . ELManager . getExpressionFactory ( ) ) ; int [ ] base = new int [ ] { 1 , 2 , 3 } ; resolver . setValue ( context , base , java . lang . ... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( base [ 1 ] ) , java . lang . Integer . valueOf ( 4 ) ) |
testIdentityToStringStringBuffer ( ) { final java . lang . Integer i = java . lang . Integer . valueOf ( 45 ) ; final java . lang . String expected = "java.lang.Integer@" + ( java . lang . Integer . toHexString ( java . lang . System . identityHashCode ( i ) ) ) ; final java . lang . StringBuffer buffer = new java . la... | org . junit . Assert . assertEquals ( expected , buffer . toString ( ) ) |
test_size_3 ( ) { org . trie4j . Trie t = trieWithWords ( "hello" , "hel" , "world" , "hel" ) ; "<AssertPlaceHolder>" ; } size ( ) { return orig . size ( ) ; } | org . junit . Assert . assertEquals ( 3 , t . size ( ) ) |
testCannotAddAlreadyRegisteredDependency ( ) { final org . springframework . roo . project . Dependency mockExistingDependency = mock ( org . springframework . roo . project . Dependency . class ) ; when ( mockExistingDependency . getType ( ) ) . thenReturn ( DependencyType . JAR ) ; when ( mockExistingDependency . get... | org . junit . Assert . assertFalse ( pom . canAddDependency ( mockExistingDependency , true ) ) |
testSerialization ( ) { org . jfree . data . category . DefaultCategoryDataset dataset = new org . jfree . data . category . DefaultCategoryDataset ( ) ; org . jfree . chart . axis . CategoryAxis domainAxis = new org . jfree . chart . axis . CategoryAxis ( "Domain" ) ; org . jfree . chart . axis . NumberAxis rangeAxis ... | org . junit . Assert . assertTrue ( p1 . equals ( p2 ) ) |
testStrict ( ) { final uk . gov . dstl . baleen . types . common . Person p = new uk . gov . dstl . baleen . types . common . Person ( jCas ) ; p . addToIndexes ( ) ; final uk . gov . dstl . baleen . types . semantic . Location l = new uk . gov . dstl . baleen . types . semantic . Location ( jCas ) ; p . addToIndexes (... | org . junit . Assert . assertEquals ( 1 , select . size ( ) ) |
testEqualsWithSelf ( ) { au . gov . ga . earthsci . core . temporal . timescale . BasicTimePeriod period1 = au . gov . ga . earthsci . core . temporal . timescale . BasicTimePeriod . Builder . buildTimePeriod ( "id1" , "name1" , "description" ) . atLevel ( au . gov . ga . earthsci . core . temporal . timescale . BasicT... | org . junit . Assert . assertTrue ( period1 . equals ( period2 ) ) |
testSimpleIDAcquisition ( ) { final com . thinkaurelius . titan . graphdb . database . idassigner . IDBlockSizer blockSizer = new com . thinkaurelius . titan . diskstorage . IDAuthorityTest . InnerIDBlockSizer ( ) ; idAuthorities [ 0 ] . setIDBlockSizer ( blockSizer ) ; int numTrials = 100 ; com . carrotsearch . hppc .... | org . junit . Assert . assertEquals ( ( previous + 1 ) , block . getId ( 0 ) ) |
test11716 ( ) { java . lang . String sql = "SELECT<sp>e1<sp>FROM<sp>pm1.g1<sp>where<sp>e1='1'" ; java . util . Map externalMetadata = new java . util . HashMap ( ) ; org . teiid . query . sql . symbol . GroupSymbol inputSet = new org . teiid . query . sql . symbol . GroupSymbol ( "INPUT" ) ; java . util . List inputSet... | org . junit . Assert . assertFalse ( groups . contains ( inputSet ) ) |
testFunctionCaseInsensitive ( ) { com . udojava . evalex . Expression expression = new com . udojava . evalex . Expression ( "a+testsum(1,3)" ) ; expression . setVariable ( "A" , new java . math . BigDecimal ( 1 ) ) ; expression . addFunction ( expression . new com . udojava . evalex . Function ( "testSum" , ( - 1 ) ) ... | org . junit . Assert . assertEquals ( expression . eval ( ) , new java . math . BigDecimal ( 5 ) ) |
testServiceWithMfaRole ( ) { final java . util . List < org . jasig . cas . web . support . ArgumentExtractor > set = new java . util . ArrayList ( ) ; set . add ( new org . jasig . cas . web . support . CasArgumentExtractor ( ) ) ; final net . unicon . cas . mfa . web . support . MultiFactorWebApplicationServiceFactor... | org . junit . Assert . assertNull ( webSvc ) |
shouldReturnTrueWhenDeathIsDueToSterilization ( ) { boolean didRuleSucceed = rule . apply ( new org . ei . drishti . util . SafeMap ( ) . put ( "isSterilizationDeath" , "yes" ) ) ; "<AssertPlaceHolder>" ; } put ( java . lang . String , java . lang . String ) { data . put ( key , value ) ; return this ; } | org . junit . Assert . assertTrue ( didRuleSucceed ) |
testRank ( ) { double [ ] [ ] d = new double [ ] [ ] { new double [ ] { 1 , 1 , 1 } , new double [ ] { 0 , 0 , 0 } , new double [ ] { 1 , 2 , 3 } } ; org . hipparchus . linear . RealMatrix m = new org . hipparchus . linear . Array2DRowRealMatrix ( d ) ; org . hipparchus . linear . SingularValueDecomposition svd = new o... | org . junit . Assert . assertEquals ( 2 , svd . getRank ( ) ) |
testFullCircle ( ) { org . pentaho . di . trans . TransMeta consumerMeta = new org . pentaho . di . trans . TransMeta ( getClass ( ) . getResource ( "/amq-consumer.ktr" ) . getPath ( ) ) ; org . pentaho . di . trans . Trans consumerTrans = new org . pentaho . di . trans . Trans ( consumerMeta ) ; consumerTrans . prepar... | org . junit . Assert . assertEquals ( 10 , consumerTrans . getSteps ( ) . get ( 0 ) . step . getLinesWritten ( ) ) |
shouldEncodeReplaceWithCASRequest ( ) { io . netty . buffer . ByteBuf content = io . netty . buffer . Unpooled . copiedBuffer ( "content" , CharsetUtil . UTF_8 ) ; com . couchbase . client . core . message . kv . ReplaceRequest request = new com . couchbase . client . core . message . kv . ReplaceRequest ( "key" , cont... | org . junit . Assert . assertEquals ( 4234234234L , outbound . getCAS ( ) ) |
testBug1075255 ( ) { org . jfree . data . time . TimeSeries ts = new org . jfree . data . time . TimeSeries ( "dummy" ) ; ts . add ( new org . jfree . data . time . FixedMillisecond ( 0L ) , 0.0 ) ; org . jfree . data . time . TimeSeries ts2 = new org . jfree . data . time . TimeSeries ( "dummy2" ) ; ts2 . add ( new or... | org . junit . Assert . assertEquals ( 1 , ts . getItemCount ( ) ) |
whenDivideTwoBigIntegerValues_shouldDivideThemAndReturnTheResultForFloorRounding ( ) { java . math . BigInteger result = com . google . common . math . BigIntegerMath . divide ( new java . math . BigInteger ( "10" ) , new java . math . BigInteger ( "3" ) , RoundingMode . FLOOR ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( new java . math . BigInteger ( "3" ) , result ) |
testNumericType ( ) { methodWatcher . execute ( java . lang . String . format ( ( "create<sp>external<sp>table<sp>t_num<sp>(col1<sp>NUMERIC(23,2),<sp>col2<sp>bigint)" + "<sp>STORED<sp>AS<sp>PARQUET<sp>LOCATION<sp>'%s'" ) , ( ( getResourceDirectory ( ) ) + "t_num" ) ) ) ; methodWatcher . execute ( "insert<sp>into<sp>t_n... | org . junit . Assert . assertEquals ( actual , expected , actual ) |
testPeerAddressRoundtrip ( ) { java . lang . String fromSpec = "010000000000000000000000000000000000ffff0a000001208d" ; com . google . bitcoin . core . PeerAddress pa = new com . google . bitcoin . core . PeerAddress ( com . google . bitcoin . params . MainNetParams . get ( ) , org . bouncycastle . util . encoders . He... | org . junit . Assert . assertEquals ( reserialized , fromSpec ) |
testParseResourceWithContainedResourcesWithProfile ( ) { java . lang . String input = "<meta><sp>" 5 http : ca . uhn . fhir . context . FhirContext ctx = ca . uhn . fhir . context . FhirContext . forDstu2_1 ( ) ; ctx . setDefaultTypeForProfile ( "http://fhir.something.com/StructureDefinition/our-medication" , ca . uhn ... | org . junit . Assert . assertEquals ( ca . uhn . fhir . parser . CustomTypeDstu2_1Test . MyMedication . class , mo . getContained ( ) . get ( 0 ) . getClass ( ) ) |
testGetINDS ( ) { java . lang . String actual = table . getINDS ( ) ; java . lang . String expected = "inds" ; "<AssertPlaceHolder>" ; } getINDS ( ) { return "inds" ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testTrainC_ClassificationDataSet_ExecutorService ( ) { System . out . println ( "trainC" ) ; for ( boolean useCatFeatures : new boolean [ ] { true , false } ) { jsat . classifiers . trees . RandomForest instance = new jsat . classifiers . trees . RandomForest ( ) ; for ( int trials = 0 ; trials < ( jsat . classifiers .... | org . junit . Assert . assertEquals ( cme . getErrorRate ( ) , 0.0 , 0.001 ) |
testGetVideosNull ( ) { org . joda . time . DateTime now = new org . joda . time . DateTime ( java . lang . System . currentTimeMillis ( ) ) ; com . google . api . services . youtube . YouTube youtube = buildYouTube ( 0 , 0 , 0 , now . plus ( 10000 ) , now . minus ( 10000 ) ) ; java . util . concurrent . BlockingQueue ... | org . junit . Assert . assertEquals ( video . size ( ) , 0 ) |
single_null ( ) { biweekly . io . json . JCalValue value = biweekly . io . json . JCalValue . single ( null ) ; java . util . List < biweekly . io . json . JsonValue > expected = java . util . Arrays . asList ( new biweekly . io . json . JsonValue ( ( ( java . lang . Object ) ( null ) ) ) ) ; java . util . List < biwee... | org . junit . Assert . assertEquals ( expected , actual ) |
searchPayments_filterByEmail ( ) { java . lang . String payments = aPaginatedPaymentSearchResult ( ) . withCount ( 10 ) . withPage ( 2 ) . withTotal ( 20 ) . withPayments ( aSuccessfulSearchPayment ( ) . withEmail ( uk . gov . pay . api . it . PaymentResourceSearchITest . TEST_EMAIL ) . getResults ( ) ) . build ( ) ; c... | org . junit . Assert . assertThat ( results , matchesField ( "email" , uk . gov . pay . api . it . PaymentResourceSearchITest . TEST_EMAIL ) ) |
applyTest ( ) { java . lang . String [ ] [ ] tests = new java . lang . String [ ] [ ] { new java . lang . String [ ] { "{%<sp>if<sp>1.0<sp>!=<sp>1<sp>%}TRUE{%<sp>else<sp>%}FALSE{%<sp>endif<sp>%}" , "FALSE" } , new java . lang . String [ ] { "{%<sp>if<sp>nil<sp>!=<sp>nil<sp>%}TRUE{%<sp>else<sp>%}FALSE{%<sp>endif<sp>%}" ... | org . junit . Assert . assertThat ( rendered , org . hamcrest . CoreMatchers . is ( test [ 1 ] ) ) |
assertThatGetBoundChannelsReturnsEmptySet ( ) { java . util . Set < org . eclipse . smarthome . core . thing . ChannelUID > boundThings = itemChannelLinkRegistry . getBoundChannels ( "notExistingItem" ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( size ( ) ) == 0 ; } | org . junit . Assert . assertTrue ( boundThings . isEmpty ( ) ) |
testRandomHeapBufferTransfer2 ( ) { byte [ ] valueContent = new byte [ ( org . apache . flink . runtime . io . network . buffer . AbstractByteBufTest . BLOCK_SIZE ) * 2 ] ; org . apache . flink . shaded . netty4 . io . netty . buffer . ByteBuf value = wrappedBuffer ( valueContent ) ; for ( int i = 0 ; i < ( ( ( buffer ... | org . junit . Assert . assertEquals ( expectedValue . getByte ( j ) , value . getByte ( j ) ) |
testHandleCanvasElementsClearEvent ( ) { command . bind ( session ) ; ( ( org . kie . workbench . common . stunner . core . client . session . command . impl . AbstractSelectionAwareSessionCommand ) ( command ) ) . handleCanvasElementsClearEvent ( new org . kie . workbench . common . stunner . core . client . canvas . ... | org . junit . Assert . assertFalse ( command . isEnabled ( ) ) |
toPrimitiveLongForString ( ) { "<AssertPlaceHolder>" ; } toPrimitiveLong ( java . lang . Object ) { java . lang . Long l = org . slim3 . util . LongUtil . toLong ( o ) ; if ( l == null ) { return 0 ; } return l . longValue ( ) ; } | org . junit . Assert . assertThat ( org . slim3 . util . LongUtil . toPrimitiveLong ( "1" ) , org . hamcrest . CoreMatchers . is ( 1L ) ) |
doseInstructionsNullTest ( ) { org . marc . everest . datatypes . ED text = substanceAdministrationHelper ( org . oscarehr . e2e . model . export . template . observation . DoseObservationModelTest . nullDrug ) . getText ( ) ; "<AssertPlaceHolder>" ; } getText ( ) { return text ; } | org . junit . Assert . assertNotNull ( text ) |
testWarStop ( ) { org . osgi . framework . Bundle bundle = null ; for ( org . osgi . framework . Bundle b : bundleContext . getBundles ( ) ) { if ( org . ops4j . pax . web . itest . jetty . TEST_BUNDLE_SYMBOLIC_NAME . equalsIgnoreCase ( b . getSymbolicName ( ) ) ) { bundle = b ; break ; } } "<AssertPlaceHolder>" ; bund... | org . junit . Assert . assertNotNull ( bundle ) |
testSetSchemaWithNoMetaData ( ) { org . netbeans . lib . ddl . impl . DriverSpecification ds = new org . netbeans . lib . ddl . impl . DriverSpecification ( null ) ; ds . setMetaData ( null ) ; ds . setSchema ( "ANY" ) ; "<AssertPlaceHolder>" ; } getSchema ( ) { return schema ; } | org . junit . Assert . assertEquals ( "ANY" , ds . getSchema ( ) ) |
testValidUri3 ( ) { connectionUri = "postgresql://myhost:5433" ; actualConfiguration = io . reactiverse . pgclient . PgConnectOptions . fromUri ( connectionUri ) ; expectedConfiguration = new io . reactiverse . pgclient . PgConnectOptions ( ) . setHost ( "myhost" ) . setPort ( 5433 ) ; "<AssertPlaceHolder>" ; } setPort... | org . junit . Assert . assertEquals ( expectedConfiguration , actualConfiguration ) |
testGetChildrenReverse_leaf ( ) { try { java . lang . Iterable < org . abego . treelayout . StringTreeNode > iter = tree . getChildrenReverse ( n1 ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception ex ) { } } iterator ( ) { return org . abego . treelayout . internal . util . java . util . IteratorUtil . crea... | org . junit . Assert . assertFalse ( iter . iterator ( ) . hasNext ( ) ) |
getByName ( ) { org . xwiki . icon . IconSet iconSet = new org . xwiki . icon . IconSet ( "key" ) ; when ( cache . get ( "NAMED:key" ) ) . thenReturn ( iconSet ) ; org . xwiki . icon . IconSet result = mocker . getComponentUnderTest ( ) . get ( "key" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return t... | org . junit . Assert . assertTrue ( ( iconSet == result ) ) |
removeTrigger ( ) { hudson . model . AbstractProject < ? , ? > p = ( ( hudson . model . AbstractProject ) ( j . jenkins . createProjectFromXML ( "foo" , getClass ( ) . getResourceAsStream ( "AbstractProjectTest/vectorTriggers.xml" ) ) ) ) ; hudson . triggers . TriggerDescriptor SCM_TRIGGER_DESCRIPTOR = ( ( hudson . tri... | org . junit . Assert . assertEquals ( 0 , p . triggers ( ) . size ( ) ) |
test_GetList_By_AutomationId ( ) { when ( element . findFirst ( any ( ) , any ( ) ) ) . thenReturn ( targetElement ) ; mmarquee . automation . controls . AutomationList list = wndw . getList ( mmarquee . automation . controls . Search . getBuilder ( ) . automationId ( "myID" ) . build ( ) ) ; "<AssertPlaceHolder>" ; ve... | org . junit . Assert . assertEquals ( targetElement , list . getElement ( ) ) |
get ( ) { final org . graylog . plugins . metrics . statsd . providers . StatsdProvider provider = new org . graylog . plugins . metrics . statsd . providers . StatsdProvider ( new org . graylog . plugins . metrics . statsd . MetricsStatsdReporterConfiguration ( ) ) ; final com . basistech . metrics . reporting . Stats... | org . junit . Assert . assertNotNull ( statsd ) |
testNestedTemplateIsNotASegment ( ) { org . trimou . engine . parser . Template template = ( ( org . trimou . engine . parser . Template ) ( engine . compileMustache ( "nested_notsegment" , "{{+nested}}world{{/nested}}Hello<sp>{{>nested}}!" ) ) ) ; java . util . List < org . trimou . engine . segment . Segment > segmen... | org . junit . Assert . assertEquals ( 3 , segments . size ( ) ) |
iteratorTest ( ) { eu . danieldk . dictomaton . collections . ImmutableStringIntMap test = new eu . danieldk . dictomaton . collections . ImmutableStringIntMap . Builder ( ) . putAll ( d_check1 ) . build ( ) ; eu . danieldk . dictomaton . collections . Set < java . lang . String > isiKeys = new eu . danieldk . dictomat... | org . junit . Assert . assertEquals ( d_check1 . keySet ( ) , isiKeys ) |
testAutoCreatePropertyFromEmptyDefaultValues ( ) { org . apache . jackrabbit . oak . api . PropertyState defaultSingleValue = org . apache . jackrabbit . oak . plugins . memory . PropertyStates . createProperty ( org . apache . jackrabbit . JcrConstants . JCR_DEFAULTVALUES , com . google . common . collect . ImmutableL... | org . junit . Assert . assertNull ( autocreated ) |
testConfigurePublicIpsOnLogicalRouterApiException ( ) { resource . configure ( "NiciraNvpResource" , parameters ) ; final com . cloud . agent . api . ConfigurePublicIpsOnLogicalRouterCommand cmd = mock ( com . cloud . agent . api . ConfigurePublicIpsOnLogicalRouterCommand . class ) ; @ com . cloud . network . resource ... | org . junit . Assert . assertFalse ( answer . getResult ( ) ) |
localDiffCache ( ) { initializeNodeStore ( false ) ; org . apache . jackrabbit . oak . plugins . document . DocumentNodeStore ns2 = builderProvider . newBuilder ( ) . setClusterId ( 2 ) . setDocumentStore ( store ) . setAsyncDelay ( 0 ) . build ( ) ; ns2 . runBackgroundOperations ( ) ; ns . runBackgroundOperations ( ) ... | org . junit . Assert . assertEquals ( requests , stats . getCount ( ) ) |
testView ( ) { org . openntf . domino . Session sess = org . openntf . domino . utils . Factory . getSession ( SessionType . CURRENT ) ; org . openntf . domino . View vw = sess . getDatabase ( "log.nsf" ) . getViews ( ) . get ( 0 ) ; org . openntf . domino . View ret = test ( vw , false ) ; "<AssertPlaceHolder>" ; } te... | org . junit . Assert . assertTrue ( ( vw == ret ) ) |
testPositiveOutOfRangeValue ( ) { final int i = 1027 ; final net . imglib2 . type . numeric . integer . UnsignedByteType u = new net . imglib2 . type . numeric . integer . UnsignedByteType ( i ) ; "<AssertPlaceHolder>" ; } get ( ) { return converted ; } | org . junit . Assert . assertEquals ( 3 , u . get ( ) ) |
testDoView ( ) { System . out . println ( "doView" ) ; javax . portlet . RenderRequest request = null ; javax . portlet . RenderResponse response = null ; org . jboss . gatein . analyticportal . GAPortlet instance = new org . jboss . gatein . analyticportal . GAPortlet ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
getFieldValue ( ) { class MyClass { @ com . vaadin . flow . internal . SuppressWarnings ( "unused" ) public com . vaadin . flow . internal . Integer getField ( ) { return 1 ; } @ com . vaadin . flow . internal . SuppressWarnings ( "unused" ) public void setField ( java . lang . Integer i ) { } } class MySubClass extend... | org . junit . Assert . assertTrue ( ( fieldValue instanceof java . lang . String ) ) |
fixPdfTest07 ( ) { java . lang . String filename = ( com . itextpdf . kernel . pdf . PdfReaderTest . sourceFolder ) + "XRefSectionWithFreeReferences1.pdf" ; com . itextpdf . kernel . pdf . PdfReader reader = new com . itextpdf . kernel . pdf . PdfReader ( filename ) ; boolean exception = false ; try { new com . itextpd... | org . junit . Assert . assertTrue ( exception ) |
testSynsetAddAll ( ) { dictionary . edit ( ) ; net . sf . extjwnl . data . Synset s = new net . sf . extjwnl . data . Synset ( dictionary , POS . NOUN ) ; s . setGloss ( "test<sp>gloss" ) ; net . sf . extjwnl . data . Synset t = new net . sf . extjwnl . data . Synset ( dictionary , POS . NOUN ) ; t . setGloss ( "car<sp... | org . junit . Assert . assertEquals ( 3 , iws . getSenses ( ) . size ( ) ) |
testTimestampNoMilliseconds ( ) { org . w3c . dom . Document doc = org . apache . wss4j . dom . common . SOAPUtil . toSOAPPart ( SOAPUtil . SAMPLE_SOAP_MSG ) ; org . apache . wss4j . dom . message . WSSecHeader secHeader = new org . apache . wss4j . dom . message . WSSecHeader ( doc ) ; secHeader . insertSecurityHeader... | org . junit . Assert . assertNotNull ( actionResult ) |
scriptFilesAreImportedInQueries ( ) { java . lang . String hiveSql = "use<sp>default" ; java . io . File importedFile = new java . io . File ( tempFolder . getRoot ( ) , "imported_script.sql" ) ; com . google . common . io . Files . write ( hiveSql , importedFile , com . klarna . hiverunner . builder . UTF_8 ) ; com . ... | org . junit . Assert . assertThat ( results . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
shouldNotConstructNewWithSomethingAlreadyDetached ( ) { final org . apache . tinkerpop . gremlin . structure . Vertex v = graph . addVertex ( ) ; final org . apache . tinkerpop . gremlin . structure . util . detached . DetachedVertex dv = org . apache . tinkerpop . gremlin . structure . util . detached . DetachedFactor... | org . junit . Assert . assertSame ( dv , org . apache . tinkerpop . gremlin . structure . util . detached . DetachedFactory . detach ( dv , true ) ) |
valueOfString ( ) { "<AssertPlaceHolder>" ; expectFacetsErrorInValueOfString ( instance , "longtext" , null , null , null , null , null ) ; expectFacetsErrorInValueOfString ( instance , "text" , null , 3 , null , null , null ) ; expectFacetsErrorInValueOfString ( instance , "schrg" , null , null , null , null , null ) ... | org . junit . Assert . assertEquals ( "text" , instance . valueOfString ( "text" , null , null , null , null , null , java . lang . String . class ) ) |
testIsNotAvailableFromProvider ( ) { java . net . URI uri = fs . getUri ( ) ; "<AssertPlaceHolder>" ; fs . close ( ) ; try { java . nio . file . FileSystems . getFileSystem ( uri ) ; org . junit . Assert . fail ( ) ; } catch ( java . nio . file . FileSystemNotFoundException expected ) { } } getFileSystem ( java . nio .... | org . junit . Assert . assertEquals ( fs , java . nio . file . FileSystems . getFileSystem ( uri ) ) |
getHeaderFieldMatchesCaseInsensitive ( ) { final int status = 200 ; final byte [ ] body = new byte [ ] { 1 } ; final byte [ ] errorReason = new byte [ ] { } ; final java . util . Map < java . lang . String , java . util . List < java . lang . String > > headerFields = new java . util . HashMap ( ) ; final java . lang .... | org . junit . Assert . assertThat ( testValues , org . hamcrest . CoreMatchers . is ( expectedValues ) ) |
testGetQueryLTFilters ( ) { filters . add ( org . nohope . cassandra . mapservice . cfilter . CFilters . lt ( org . nohope . cassandra . mapservice . Value . bound ( org . nohope . cassandra . mapservice . CFilterBuilderTest . INT_COL , 4 ) ) ) ; final java . util . List < org . nohope . cassandra . mapservice . cfilte... | org . junit . Assert . assertEquals ( filters , builderFilters ) |
testGetTagTypeUpperCaseParameters ( ) { tagTypeDaoTestHelper . createTagTypeEntity ( org . finra . herd . service . TAG_TYPE , org . finra . herd . service . TAG_TYPE_DISPLAY_NAME , org . finra . herd . service . TAG_TYPE_ORDER , org . finra . herd . service . TAG_TYPE_DESCRIPTION ) ; org . finra . herd . model . api .... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . TagType ( new org . finra . herd . model . api . xml . TagTypeKey ( TAG_TYPE ) , TAG_TYPE_DISPLAY_NAME , TAG_TYPE_ORDER , TAG_TYPE_DESCRIPTION ) , resultTagType ) |
testReadBytesFromUtf8 ( ) { javax . ws . rs . ext . MessageBodyReader p = new org . apache . cxf . jaxrs . provider . BinaryDataProvider ( ) ; byte [ ] utf8Bytes = "" . getBytes ( "UTF-16" ) ; byte [ ] readBytes = ( ( byte [ ] ) ( p . readFrom ( byte [ ] . class , byte [ ] . class , new java . lang . annotation . Annot... | org . junit . Assert . assertArrayEquals ( utf8Bytes , readBytes ) |
testGetAsObjectSpaceAndThreeByteSpaceMixture ( ) { java . lang . String in = "<sp>" + ( ( ( " " + "<sp>" ) + " " ) + "<sp>" ) ; java . lang . String out = ( ( java . lang . String ) ( converter . getAsObject ( context , component , in ) ) ) ; "<AssertPlaceHolder>" ; } getAsObject ( javax . faces . context . FacesContex... | org . junit . Assert . assertEquals ( null , out ) |
testExportWithBoundedBy ( ) { java . net . URL docURL = org . deegree . gml . feature . GMLFeatureReaderTest . class . getResource ( "../cite/feature/dataset-sf0.xml" ) ; org . deegree . gml . GMLStreamReader gmlReader = org . deegree . gml . GMLInputFactory . createGMLStreamReader ( org . deegree . gml . GMLVersion . ... | org . junit . Assert . assertEquals ( 15 , boundedBys . size ( ) ) |
testStaleWhenClosed ( ) { final java . io . OutputStream outStream = org . mockito . Mockito . mock ( java . io . OutputStream . class ) ; org . mockito . Mockito . when ( socket . getOutputStream ( ) ) . thenReturn ( outStream ) ; conn . bind ( socket ) ; conn . ensureOpen ( ) ; conn . close ( ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertTrue ( conn . isStale ( ) ) |
testBlobVar ( ) { byte [ ] [ ] vals = new byte [ ] [ ] { "" . getBytes ( ) , "22" 4. getBytes ( ) , "22" 9. getBytes ( ) , new byte [ ] { ( ( byte ) ( 170 ) ) , ( ( byte ) ( 170 ) ) , ( ( byte ) ( 170 ) ) , ( ( byte ) ( 170 ) ) , ( ( byte ) ( 170 ) ) , ( ( byte ) ( 170 ) ) , ( ( byte ) ( 170 ) ) for ( org . apache . ha... | org . junit . Assert . assertArrayEquals ( java . lang . String . format ( "22" 7 , java . util . Arrays . toString ( sortedVals [ i ] ) , java . util . Arrays . toString ( decoded ) , ord ) , sortedVals [ i ] , decoded ) |
testRemove ( ) { com . liferay . dynamic . data . mapping . model . DDMFormInstanceRecordVersion newDDMFormInstanceRecordVersion = addDDMFormInstanceRecordVersion ( ) ; _persistence . remove ( newDDMFormInstanceRecordVersion ) ; com . liferay . dynamic . data . mapping . model . DDMFormInstanceRecordVersion existingDDM... | org . junit . Assert . assertNull ( existingDDMFormInstanceRecordVersion ) |
testBigRingSystem_MaxRingSize4_fourRing5x10 ( ) { org . openscience . cdk . interfaces . IRingSet ringSet = null ; org . openscience . cdk . ringsearch . AllRingsFinder arf = new org . openscience . cdk . ringsearch . AllRingsFinder ( ) ; java . lang . String filename = "data/mdl/four-ring-5x10.mol" ; java . io . Input... | org . junit . Assert . assertEquals ( 50 , ringSet . getAtomContainerCount ( ) ) |
testAddParameterMethod ( ) { final org . opendaylight . mdsal . binding . model . util . generated . type . builder . MethodSignatureBuilderImpl signatureBuilderImpl = new org . opendaylight . mdsal . binding . model . util . generated . type . builder . MethodSignatureBuilderImpl ( "testMethod" ) ; final org . openday... | org . junit . Assert . assertEquals ( "ipAddress" , methodSignature . getParameters ( ) . get ( 0 ) . getName ( ) ) |
testStripSecretFromUrl2 ( ) { java . lang . String input = "abc&client_secret=x&client_secret=password" ; java . lang . String expected = "abc&client_secret=*****&client_secret=*****" ; java . lang . String secret = "client_secret" ; java . lang . String value = com . ibm . ws . security . common . web . WebUtils . str... | org . junit . Assert . assertEquals ( expected , value ) |
withTemplateLoader ( ) { com . github . jknack . handlebars . Handlebars handlebars = new com . github . jknack . handlebars . Handlebars ( ) . with ( new com . github . jknack . handlebars . io . ClassPathTemplateLoader ( ) ) ; "<AssertPlaceHolder>" ; } with ( com . github . jknack . handlebars . io . TemplateLoader [... | org . junit . Assert . assertNotNull ( handlebars ) |
writable_zero ( ) { com . asakusafw . runtime . value . DateOption option = new com . asakusafw . runtime . value . DateOption ( ) ; option . modify ( date ( 0 ) ) ; com . asakusafw . runtime . value . DateOption restored = restore ( option ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( canGet ) { return next ; } throw n... | org . junit . Assert . assertThat ( option . get ( ) , is ( restored . get ( ) ) ) |
testPurgeExpiredFiles ( ) { org . apache . hadoop . hbase . regionserver . HStore store = prepareData ( ) ; "<AssertPlaceHolder>" ; org . apache . hadoop . hbase . regionserver . compactions . TestFIFOCompactionPolicy . TEST_UTIL . getAdmin ( ) . majorCompact ( tableName ) ; org . apache . hadoop . hbase . regionserver... | org . junit . Assert . assertEquals ( 10 , store . getStorefilesCount ( ) ) |
testCalcDiffValueWithFloatingPoint ( ) { org . ebayopensource . turmeric . monitoring . v1 . services . MetricGroupData metricGroupData = new org . ebayopensource . turmeric . monitoring . v1 . services . MetricGroupData ( ) ; metricGroupData . setCount1 ( 14.0 ) ; metricGroupData . setCount2 ( 174.0 ) ; service . calc... | org . junit . Assert . assertEquals ( expectedValue , java . lang . Double . valueOf ( metricGroupData . getDiff ( ) ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.