input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGeospatialPredicateNullOperation ( ) { java . lang . String methodName = "testGeospatialPredicateNullOperation" ; ddf . catalog . pubsub . PredicateTest . LOGGER . debug ( "***************<sp>START:<sp>{}<sp>*****************" , methodName ) ; java . lang . String geometryWkt = "POLYGON<sp>((40<sp>34,<sp>40<sp>33,<... | org . junit . Assert . assertTrue ( predicate . matches ( testEvent ) ) |
testInnerClass ( javax . enterprise . inject . Instance ) { org . jboss . weld . tests . smoke . Crasher crasher = instance . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( ( ctx ) == null ) { ctx = new org . jboss . weld . module . web . el . ELCreationalContext < java . lang . Object > ( null ) ; } return ctx ; } | org . junit . Assert . assertNotNull ( crasher ) |
testFindKeyWithSpace ( ) { final ch . cyberduck . core . Path container = new ch . cyberduck . core . Path ( "test-us-east-1-cyberduck" , java . util . EnumSet . of ( Path . Type . directory , Path . Type . volume ) ) ; final ch . cyberduck . core . Path test = new ch . cyberduck . core . Path ( container , "t<sp>f" , ... | org . junit . Assert . assertTrue ( list . isEmpty ( ) ) |
testName ( ) { com . avanza . astrix . context . AstrixConfigurer astrixConfigurer = new com . avanza . astrix . context . AstrixConfigurer ( ) ; astrixConfigurer . set ( AstrixSettings . SERVICE_REGISTRY_URI , tutorial . p3 . LunchServicePuTest . serviceRegistry . getServiceUri ( ) ) ; astrixConfigurer . set ( AstrixS... | org . junit . Assert . assertEquals ( "FEI" , lunchService . getAllRestaurants ( ) . get ( 0 ) ) |
testSerde ( ) { java . util . List < io . cdap . cdap . api . dataset . table . TableSplit > splits = java . util . Arrays . asList ( new io . cdap . cdap . api . dataset . table . TableSplit ( io . cdap . cdap . api . common . Bytes . toBytes ( "0" ) , io . cdap . cdap . api . common . Bytes . toBytes ( "1" ) ) , new ... | org . junit . Assert . assertEquals ( splits , decoded ) |
testFromGraph ( ) { int numNodes = 20 ; int numIterations = 20 ; for ( int i = 0 ; i < numIterations ; i ++ ) { edu . cmu . tetrad . test . Graph dag = edu . cmu . tetrad . test . GraphUtils . randomDag ( numNodes , 0 , numNodes , 10 , 10 , 10 , false ) ; edu . cmu . tetrad . search . Fges fges = new edu . cmu . tetrad... | org . junit . Assert . assertEquals ( pattern2 , pattern1 ) |
testSchemasPassedThrough ( ) { java . util . List < org . apache . beam . sdk . transforms . ParDoSchemaTest . InferredPojo > pojoList = org . apache . beam . vendor . guava . v20_0 . com . google . common . collect . Lists . newArrayList ( new org . apache . beam . sdk . transforms . ParDoSchemaTest . InferredPojo ( "... | org . junit . Assert . assertTrue ( out . hasSchema ( ) ) |
countPreviousContinuedBackslash_A$String$int$int_StringIsEmpty ( ) { java . lang . String str = "" ; int currentNotBackslashCharIndex = 0 ; int count = 0 ; int actual = org . junithelper . core . filter . impl . TrimInsideOfStringFilter . countPreviousContinuedBackslash ( str , currentNotBackslashCharIndex , count ) ; ... | org . junit . Assert . assertThat ( actual , is ( equalTo ( expected ) ) ) |
testRewriteConfidentialNoParams ( ) { System . out . println ( "running<sp>testRewriteConfidentialNoParams()" ) ; LOGGER . info ( org . owasp . security . logging . log4j . Log4JMarkerConverter . convertMarker ( SecurityMarkers . CONFIDENTIAL ) , ( "ssn=" + ( org . owasp . security . logging . log4j . mask . MaskingRew... | org . junit . Assert . assertTrue ( message . getFormattedMessage ( ) . contains ( ( "ssn=" + ( org . owasp . security . logging . log4j . mask . MaskingRewritePolicyTest . SSN ) ) ) ) |
testGetParentLogger ( ) { io . sniffy . sql . Driver driver = io . sniffy . sql . DriverManager . getDriver ( "sniffy:jdbc:h2:mem:" ) ; try { driver . getParentLogger ( ) ; org . junit . Assert . fail ( ) ; } catch ( io . sniffy . sql . SQLFeatureNotSupportedException e ) { "<AssertPlaceHolder>" ; } } getParentLogger (... | org . junit . Assert . assertNotNull ( e ) |
shouldReturnDefaultVersionIfNoGeoVersion ( ) { com . emc . storageos . db . client . DbClient dbClientMock = org . easymock . EasyMock . createMock ( com . emc . storageos . db . client . DbClient . class ) ; org . easymock . EasyMock . expect ( dbClientMock . queryByType ( com . emc . storageos . db . client . model .... | org . junit . Assert . assertEquals ( expectedVdcVersion , minialVdcVersion ) |
usesCustomComparisonFormatter ( ) { java . lang . String control = "<a><b></b><c/></a>" ; java . lang . String test = "<a><b></b><c/><d/></a>" ; org . xmlunit . diff . Diff myDiff = org . xmlunit . builder . DiffBuilder . compare ( control ) . withTest ( test ) . withComparisonController ( ComparisonControllers . StopW... | org . junit . Assert . assertEquals ( "foo" , myDiff . toString ( ) ) |
testConfig1Predicates ( ) { com . google . common . base . Predicate < de . unima . dws . dbpediagraph . loader . Triple > loadingTypes = de . unima . dws . dbpediagraph . loader . TriplePredicate . fromConfig ( de . unima . dws . dbpediagraph . loader . TestTriplePredicate . config1 ) ; "<AssertPlaceHolder>" ; } fromC... | org . junit . Assert . assertNotNull ( loadingTypes ) |
testThrowOnPartialStrategyWithOneTable ( ) { createOneTable ( "SUS1" ) ; setStrategy ( org . apache . cayenne . access . dbsync . ThrowOnPartialSchemaStrategy . class ) ; java . lang . String template = "SELECT<sp>#result('ARTIST_ID'<sp>'int')<sp>FROM<sp>ARTIST<sp>ORDER<sp>BY<sp>ARTIST_ID" ; org . apache . cayenne . qu... | org . junit . Assert . assertEquals ( 1 , existingTables ( ) . size ( ) ) |
countShouldReturnZeroIfUnknownSku ( ) { createConsumer ( owner ) ; java . util . List < java . lang . String > skus = new java . util . ArrayList ( ) ; skus . add ( "unknown-sku" ) ; int count = consumerCurator . countConsumers ( owner . getKey ( ) , typeLabels , skus , subscriptionIds , contracts ) ; "<AssertPlaceHold... | org . junit . Assert . assertEquals ( 0 , count ) |
testUpdateRetry ( ) { org . slc . sli . common . util . tenantdb . TenantContext . setTenantId ( "SLIUnitTest" ) ; repository . deleteAll ( "student" , null ) ; com . mongodb . DBObject indexKeys = new com . mongodb . BasicDBObject ( "body.cityOfBirth" , 1 ) ; mongoTemplate . getCollection ( "student" ) . ensureIndex (... | org . junit . Assert . assertEquals ( 1 , repository . count ( "student" , neutralQuery ) ) |
test1 ( ) { java . util . List < io . djigger . aggregation . Thread > threads = threads ( new java . lang . Object [ ] [ ] { new java . lang . Object [ ] { "m1" , "m2" } , new java . lang . Object [ ] { "m1" , "m3" } , new java . lang . Object [ ] { "m1" , "m2" } , new java . lang . Object [ ] { "m1" , "m3" } } ) ; fi... | org . junit . Assert . assertEquals ( 5 , events . size ( ) ) |
testCheckArtifactFailOnNoFile ( ) { org . sonatype . aether . impl . UpdateCheck < org . sonatype . aether . artifact . Artifact , org . sonatype . aether . transfer . ArtifactTransferException > check = newArtifactCheck ( ) ; check . setItem ( artifact . setFile ( null ) ) ; check . setFile ( null ) ; manager . checkA... | org . junit . Assert . assertNotNull ( check . getException ( ) ) |
testName_Gets_Value_From_Element ( ) { mmarquee . automation . AutomationElement element = org . mockito . Mockito . mock ( mmarquee . automation . AutomationElement . class ) ; mmarquee . automation . pattern . Toggle pattern = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Toggle . class ) ; when ... | org . junit . Assert . assertTrue ( name . equals ( "NAME" ) ) |
testDoubleLevelTree ( ) { org . antlr . runtime . tree . TreeWizard wiz = new org . antlr . runtime . tree . TreeWizard ( org . antlr . test . TestTreeWizard . adaptor , org . antlr . test . TestTreeWizard . tokens ) ; org . antlr . runtime . tree . CommonTree t = ( ( org . antlr . runtime . tree . CommonTree ) ( wiz .... | org . junit . Assert . assertEquals ( expecting , found ) |
testNull ( ) { "<AssertPlaceHolder>" ; } buildInterfaceSpecifier ( java . lang . Object ) { if ( input == null ) { return AllInterfacesInterfaceSpecifier . INSTANCE ; } checkArgument ( ( input instanceof java . lang . String ) , ( ( org . batfish . specifier . FlexibleInterfaceSpecifierFactory . NAME ) + "<sp>requires<... | org . junit . Assert . assertThat ( new org . batfish . specifier . FlexibleInterfaceSpecifierFactory ( ) . buildInterfaceSpecifier ( null ) , org . hamcrest . Matchers . equalTo ( AllInterfacesInterfaceSpecifier . INSTANCE ) ) |
testWriteReadFields ( ) { for ( org . apache . accumulo . core . data . Column c : org . apache . accumulo . core . data . ColumnTest . col ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; c . write ( new java . io . DataOutputStream ( baos ) ) ; org . apache . accumulo . core . ... | org . junit . Assert . assertEquals ( c , other ) |
canConvertAccountActivity ( ) { converter = new edu . zipcloud . cloudstreetmarket . core . converters . IdentifiableToIdConverter ( edu . zipcloud . cloudstreetmarket . core . converters . AccountActivity . class ) ; "<AssertPlaceHolder>" ; } canConvert ( java . lang . Class ) { return type . isAssignableFrom ( this .... | org . junit . Assert . assertTrue ( converter . canConvert ( edu . zipcloud . cloudstreetmarket . core . converters . AccountActivity . class ) ) |
testExtract_fieldNotInXml ( ) { java . util . Map < java . lang . String , java . lang . String > ret = xmlFieldExtractor . extract ( new java . io . ByteArrayInputStream ( com . google . api . ads . common . lib . utils . XmlFieldExtractorTest . REPORT_DOWNLOAD_ERROR . getBytes ( com . google . api . ads . common . li... | org . junit . Assert . assertNull ( ret . get ( "foo" ) ) |
testAge ( ) { treeMap . merge ( otherKeyTreeMap ) ; "<AssertPlaceHolder>" ; } allPersons ( org . drools . verifier . core . maps . KeyTreeMap ) { final org . drools . verifier . core . index . matchers . Matcher age = new org . drools . verifier . core . index . matchers . Matcher ( org . drools . verifier . core . map... | org . junit . Assert . assertEquals ( 2 , allPersons ( treeMap ) . size ( ) ) |
testRemoteAsyncInvocationByValue ( ) { org . jboss . as . test . integration . ejb . remote . async . StatelessRemoteBean . reset ( ) ; java . lang . String [ ] array = new java . lang . String [ ] { "hello" } ; org . jboss . as . test . integration . ejb . remote . async . RemoteInterface remote = lookup ( org . jboss... | org . junit . Assert . assertEquals ( "hello" , array [ 0 ] ) |
getSignaturesTest02 ( ) { java . lang . String inPdf = ( com . itextpdf . signatures . SignatureUtilTest . sourceFolder ) + "simpleDocument.pdf" ; com . itextpdf . kernel . pdf . PdfDocument pdfDocument = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfReader ( inPdf ) ) ; com .... | org . junit . Assert . assertEquals ( 0 , signatureNames . size ( ) ) |
testEquals2 ( ) { final ro . isdc . wro . cache . CacheKey key1 = new ro . isdc . wro . cache . CacheKey ( "g1" , ro . isdc . wro . model . resource . ResourceType . JS , false ) ; final ro . isdc . wro . cache . CacheKey key2 = new ro . isdc . wro . cache . CacheKey ( "g1" , ro . isdc . wro . model . resource . Resour... | org . junit . Assert . assertFalse ( key1 . equals ( key2 ) ) |
testValue ( ) { net . ontopia . topicmaps . rest . model . Occurrence occurrence = get ( "2" , net . ontopia . topicmaps . rest . model . Occurrence . class ) ; occurrence . setValue ( "Another<sp>value" ) ; net . ontopia . topicmaps . rest . model . Occurrence changed = post ( "2" , occurrence , net . ontopia . topicm... | org . junit . Assert . assertEquals ( "Another<sp>value" , changed . getValue ( ) ) |
testJackson ( ) { org . batfish . datamodel . FlowDiff fd = new org . batfish . datamodel . FlowDiff ( org . batfish . datamodel . Flow . PROP_DST_IP , "old" , "new" ) ; "<AssertPlaceHolder>" ; } clone ( java . lang . Object , java . lang . Class ) { return org . batfish . common . util . BatfishObjectMapper . MAPPER .... | org . junit . Assert . assertEquals ( org . batfish . common . util . BatfishObjectMapper . clone ( fd , org . batfish . datamodel . FlowDiff . class ) , fd ) |
testSecToken ( ) { org . apache . shiro . subject . SimplePrincipalCollection principals = new org . apache . shiro . subject . SimplePrincipalCollection ( ) ; org . apache . cxf . ws . security . tokenstore . SecurityToken secToken = new org . apache . cxf . ws . security . tokenstore . SecurityToken ( ) ; principals ... | org . junit . Assert . assertNotNull ( subject ) |
testSetInboundPassthruMode ( ) { gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry registry = gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry . getInstance ( ) ; gov . hhs . fha . nhinc . configuration . IConfiguration . serviceEnum serviceName = gov . hhs . fha . nhinc . con... | org . junit . Assert . assertEquals ( true , passthru ) |
get ( ) { com . cloudhopper . commons . util . ByteBuffer buffer = new com . cloudhopper . commons . util . ByteBuffer ( 5 ) ; buffer . add ( ( ( byte ) ( 0 ) ) ) ; byte b = buffer . get ( 0 ) ; "<AssertPlaceHolder>" ; } get ( K ) { return this . futures . get ( key ) ; } | org . junit . Assert . assertEquals ( ( ( byte ) ( 0 ) ) , b ) |
givenMoveToSecondPosition_whenGetProperty1_thenReturnExpectedResult ( ) { beanCursor . moveToFirst ( ) ; beanCursor . moveToNext ( ) ; java . lang . String property1 = beanCursor . getString ( property1ColumnIndex ( ) ) ; "<AssertPlaceHolder>" ; } expectedProperty1OfBean2 ( ) { org . robobinding . itempresentationmodel... | org . junit . Assert . assertEquals ( expectedProperty1OfBean2 ( ) , property1 ) |
tuple_array_2 ( ) { org . apache . jena . atlas . lib . tuple . Tuple < java . lang . Integer > tuple1 = org . apache . jena . atlas . lib . tuple . TupleFactory . tuple ( 9 , 8 , 7 ) ; java . lang . Integer [ ] array = new java . lang . Integer [ 2 ] ; tuple1 . copyInto ( array , 0 , 2 ) ; java . lang . Integer [ ] ar... | org . junit . Assert . assertArrayEquals ( array1 , array ) |
test3 ( ) { this . sentenceSegmentFile ( "src/test/resources/data/sentence/test3.txt" ) ; org . cleartk . token . type . Sentence sentence = org . apache . uima . fit . util . JCasUtil . selectByIndex ( jCas , org . cleartk . token . type . Sentence . class , 0 ) ; "<AssertPlaceHolder>" ; } getCoveredText ( ) { throw n... | org . junit . Assert . assertEquals ( "test" , sentence . getCoveredText ( ) ) |
testNull ( ) { com . arjuna . ats . internal . jta . recovery . arjunacore . XARecoveryModule xarm = new com . arjuna . ats . internal . jta . recovery . arjunacore . XARecoveryModule ( ) ; xarm . periodicWorkFirstPass ( ) ; xarm . periodicWorkSecondPass ( ) ; "<AssertPlaceHolder>" ; } id ( ) { return participantId ; } | org . junit . Assert . assertNotNull ( xarm . id ( ) ) |
test ( ) { java . lang . String dataEspecifica = "2013-02-02" ; java . lang . String sql1 = ( ( ( ( ( "SELECT<sp>tra.tra_id,<sp>etb.etb_nome,<sp>cli.cli_nome,<sp>tra.tra_total,<sp>tra.tra_data_hora<sp>" + ( ( ( "FROM<sp>transacao<sp>tra<sp>" + "JOIN<sp>cliente<sp>cli<sp>ON<sp>(tra.cli_id<sp>=<sp>cli.cli_id)<sp>" ) + "J... | org . junit . Assert . assertTrue ( ( cont1 == 10 ) ) |
testBasicHash ( ) { final java . lang . Integer i = java . lang . Integer . valueOf ( 1234 ) ; final int h1 = org . apache . hc . core5 . util . LangUtils . hashCode ( LangUtils . HASH_SEED , i . hashCode ( ) ) ; final int h2 = org . apache . hc . core5 . util . LangUtils . hashCode ( LangUtils . HASH_SEED , i ) ; "<As... | org . junit . Assert . assertTrue ( ( h1 == h2 ) ) |
shouldScheduleToNow ( ) { testRule . deploy ( PROCESS ) ; runtimeService . startProcessInstanceByKey ( PROCESS_KEY ) ; java . lang . String processInstanceId = runtimeService . createProcessInstanceQuery ( ) . activityIdIn ( "userTask" ) . singleResult ( ) . getId ( ) ; org . camunda . bpm . engine . impl . util . Cloc... | org . junit . Assert . assertThat ( job . getDuedate ( ) , org . hamcrest . core . Is . is ( removalTime ) ) |
getCurrentStatusExceptionTest ( ) { con = new com . cloud . hypervisor . ovm3 . objects . ConnectionTest ( ) ; hypervisor . setConnection ( con ) ; "<AssertPlaceHolder>" ; } getCurrentStatus ( long ) { try { com . cloud . hypervisor . ovm3 . objects . Common test = new com . cloud . hypervisor . ovm3 . objects . Common... | org . junit . Assert . assertNull ( hypervisor . getCurrentStatus ( 1L ) ) |
testStationVarLevels ( ) { java . lang . String file = ( ucar . unidata . util . test . TestDir . cdmLocalTestDataDir ) + "point/stationData2Levels.ncml" ; java . util . Formatter buf = new java . util . Formatter ( ) ; try ( ucar . nc2 . ft . point . FeatureDatasetPoint pods = ( ( ucar . nc2 . ft . point . FeatureData... | org . junit . Assert . assertNotNull ( pods ) |
testGetNewestVersion ( ) { org . hive2hive . core . network . NetworkManager nodeA = org . hive2hive . core . utils . NetworkTestUtil . getRandomNode ( org . hive2hive . core . network . data . futures . FutureGetTest . network ) ; org . hive2hive . core . network . NetworkManager nodeB = org . hive2hive . core . utils... | org . junit . Assert . assertEquals ( content . get ( ( numberOfContent - 1 ) ) , ( ( org . hive2hive . core . H2HTestData ) ( nodeB . getDataManager ( ) . get ( parameters ) ) ) . getTestString ( ) ) |
itShouldReturnMonth ( ) { java . lang . String dateInString = "1986-04-08" ; java . util . Date date = new java . text . SimpleDateFormat ( "yyyy-MM-dd" ) . parse ( dateInString ) ; java . lang . Integer month = hydrograph . engine . transformation . standardfunctions . DateFunctions . getMonth ( date ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( month , new java . lang . Integer ( 4 ) ) |
testCreate ( ) { org . apache . eagle . metadata . model . SiteEntity siteEntity = new org . apache . eagle . metadata . model . SiteEntity ( ) ; siteEntity . setSiteId ( "testsiteid" ) ; siteEntity . setSiteName ( "testsitename" ) ; siteEntity . setDescription ( "testdesc" ) ; org . apache . eagle . metadata . model .... | org . junit . Assert . assertNotNull ( resultEntity ) |
testGetAccessor ( ) { gov . hhs . fha . nhinc . properties . HibernateAccessor hibernateAccessor = gov . hhs . fha . nhinc . properties . HibernateAccessor . getInstance ( ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { return gov . hhs . fha . nhinc . properties . HibernateAccessor . SingletonHolder . INSTANCE ; } | org . junit . Assert . assertNotNull ( hibernateAccessor ) |
isAllowedToWriteReturnsFalseIfTheRolesAreEmpty ( ) { nl . knaw . huygens . timbuctoo . security . dto . VreAuthorization instance = nl . knaw . huygens . timbuctoo . security . dto . VreAuthorization . create ( "" , "" ) ; boolean allowedToWrite = instance . isAllowedToWrite ( ) ; "<AssertPlaceHolder>" ; } create ( jav... | org . junit . Assert . assertThat ( allowedToWrite , org . hamcrest . core . Is . is ( false ) ) |
testGettingSimpleValue ( ) { org . eclipse . reddeer . junit . test . util . ReflectionUtilTest . A a = new org . eclipse . reddeer . junit . test . util . ReflectionUtilTest . A ( ) ; a . setName ( "aaa" ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . Object , java . lang . String ) { if ( obj == null ) { throw... | org . junit . Assert . assertEquals ( "aaa" , getValue ( a , "name" ) ) |
testBackgroundTransparency_inheritForce ( ) { org . eclipse . swt . internal . widgets . IControlAdapter adapter = org . eclipse . swt . internal . widgets . ControlUtil . getControlAdapter ( dateTime ) ; shell . setBackgroundMode ( SWT . INHERIT_FORCE ) ; "<AssertPlaceHolder>" ; } getBackgroundTransparency ( ) { retur... | org . junit . Assert . assertTrue ( adapter . getBackgroundTransparency ( ) ) |
testPutAlreadyExists ( ) { backend . put ( "random<sp>key" , "random<sp>value" ) ; kvStore . put ( "random<sp>key" , "another<sp>random<sp>value" ) ; "<AssertPlaceHolder>" ; } get ( com . dremio . service . job . proto . JobId ) { try { return jobResults . get ( jobId ) ; } catch ( java . util . concurrent . ExecutionE... | org . junit . Assert . assertEquals ( "another<sp>random<sp>value" , backend . get ( "random<sp>key" ) ) |
smokeTest ( ) { when ( someService . thatDoesThings ( ) ) . thenReturn ( com . spotify . apollo . test . helper . ServiceHelperTest . TEST_THING ) ; java . lang . String response = doGet ( ) ; "<AssertPlaceHolder>" ; } doGet ( ) { return doGet ( "/" ) ; } | org . junit . Assert . assertThat ( response , org . hamcrest . Matchers . is ( com . spotify . apollo . test . helper . ServiceHelperTest . TEST_THING ) ) |
getNullCatalogUserDetails ( ) { org . springframework . security . core . context . SecurityContextHolder . getContext ( ) . setAuthentication ( authentication ) ; when ( authentication . getPrincipal ( ) ) . thenReturn ( new org . springframework . security . core . userdetails . UserDetails ( ) { private static final... | org . junit . Assert . assertNull ( service . getCatalogUserDetails ( ) ) |
testGetCurrOffset ( ) { System . out . println ( "getCurrOffset" ) ; com . bixly . pastevid . recorders . AudioCache instance = new com . bixly . pastevid . recorders . AudioCache ( ) ; long expResult = 0L ; long result = instance . getCurrOffset ( ) ; "<AssertPlaceHolder>" ; } getCurrOffset ( ) { return currOffset ; } | org . junit . Assert . assertEquals ( expResult , result ) |
getMonitorLocalSources ( ) { "<AssertPlaceHolder>" ; } getMonitorLocalSources ( ) { return this . monitorLocalSources ; } | org . junit . Assert . assertThat ( plugin . getMonitorLocalSources ( ) , org . hamcrest . Matchers . is ( true ) ) |
testIncludeFileInJarWithSourceFilePresent ( ) { java . lang . String inputClassFileName = "FooBar.class" ; boolean expectedOutput = true ; compilationManager . addSourceFile ( "FooBar.java" ) ; "<AssertPlaceHolder>" ; } includeFileInJar ( java . lang . String ) { if ( ! ( classFileName . endsWith ( org . apache . sqoop... | org . junit . Assert . assertEquals ( expectedOutput , compilationManager . includeFileInJar ( inputClassFileName ) ) |
shouldUnicastMessageFromRecoveredProcess ( ) { broker . BrokerIntegrationTest . DummyProcess dummy1 = new broker . BrokerIntegrationTest . DummyProcess ( "Dummy<sp>1" , 1 , 2 ) ; broker . BrokerIntegrationTest . DummyProcess dummy2 = new broker . BrokerIntegrationTest . DummyProcess ( "Dummy<sp>2" , 2 , 2 ) ; dummy1 . ... | org . junit . Assert . assertNotNull ( dummy2 . getMessage ( ) ) |
shouldMarkPositionWithMultilineContent ( ) { printTest ( "shouldMarkPositionWithMultilineContent()" ) ; java . lang . String content = "CREATE<sp>FOOBAR<sp>with<sp>NO<sp>WORDS;\n" + ( "CREATE<sp>BARFOO<sp>with<sp>lots<sp>of<sp>words<sp>after<sp>it;\n" + "CREATE<sp>TABLE<sp>myTable<sp>(column<sp>definition<sp>data);" ) ... | org . junit . Assert . assertThat ( stringFragment , org . hamcrest . core . Is . is ( fragment ) ) |
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . String abbrName = "abbr<sp>name" ; java . lang . String name = "fgsdfds" ; java . lang . Long departmentId = 2L ; org . lnu . is . domain . department . Department department = new org . lnu . is . domain . department . Department ( ) ; department . setId ... | org . junit . Assert . assertEquals ( expecteds , actual ) |
reg_layout_1 ( ) { for ( java . lang . String s : layoutNames ) "<AssertPlaceHolder>" ; } fetch ( java . lang . String ) { if ( layoutTypeName == null ) throw new java . lang . IllegalArgumentException ( "LayoutType.convert:<sp>null<sp>not<sp>allowed" ) ; org . apache . jena . sdb . store . LayoutType t = org . apache ... | org . junit . Assert . assertNotNull ( org . apache . jena . sdb . store . LayoutType . fetch ( s ) ) |
getYamlDataObjectTest ( ) { java . util . Map < java . lang . String , java . lang . Object > map = org . apache . rocketmq . acl . common . AclUtils . getYamlDataObject ( "src/test/resources/conf/plain_acl.yml" , java . util . Map . class ) ; "<AssertPlaceHolder>" ; } getYamlDataObject ( java . lang . String , java . ... | org . junit . Assert . assertFalse ( map . isEmpty ( ) ) |
objectIsInstantiatedCorrectly_whenValidFactoryMethodAndParametersAreProvided ( ) { ci = new nl . jqno . equalsverifier . internal . reflection . ConditionalInstantiator ( "java.lang.Integer" ) ; int expected = java . lang . Integer . valueOf ( 42 ) ; int actual = ci . callFactory ( "valueOf" , nl . jqno . equalsverifie... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
testTransformationObject ( ) { org . jglue . fluentjson . TestBuilderFactory . A a = new org . jglue . fluentjson . TestBuilderFactory . A ( ) ; com . google . gson . JsonObject jsonObject = org . jglue . fluentjson . JsonBuilderFactory . buildObject ( ) . add ( "value" , new org . jglue . fluentjson . AbstractMapper <... | org . junit . Assert . assertEquals ( test , jsonObject ) |
testIsTrue2 ( ) { org . apache . commons . lang3 . Validate . isTrue ( true , "MSG" ) ; try { org . apache . commons . lang3 . Validate . isTrue ( false , "MSG" ) ; org . junit . Assert . fail ( "Expecting<sp>IllegalArgumentException" ) ; } catch ( final java . lang . IllegalArgumentException ex ) { "<AssertPlaceHolder... | org . junit . Assert . assertEquals ( "MSG" , ex . getMessage ( ) ) |
Rekords_can_be_nested ( ) { com . noodlesandwich . rekord . Rekord < com . noodlesandwich . rekord . Person > hans = Person . rekord . with ( Person . firstName , "Hans" ) . with ( Person . address , Address . rekord . with ( Address . houseNumber , 123 ) . with ( Address . street , "Kaiserstrae" ) . with ( Address . c... | org . junit . Assert . assertThat ( hans , org . hamcrest . Matchers . is ( Person . rekord . with ( Person . firstName , "Hans" ) . with ( Person . address , Address . rekord . with ( Address . houseNumber , 123 ) . with ( Address . street , "Kaiserstrae" ) . with ( Address . city , "Frankfurt" ) . with ( Address . po... |
scaleUp_RestUrlNull ( ) { prepareSlaveClusterSizeAndServerIds ( org . oscm . app . iaas . VSystemProcessorBeanTest . THREE , org . oscm . app . iaas . VSystemProcessorBeanTest . TWO ) ; org . oscm . app . iaas . data . FlowState newState = vSystemProcessor . scaleUp ( paramHandler , FlowState . VSYSTEM_CREATING , org .... | org . junit . Assert . assertEquals ( FlowState . VSYSTEM_SCALE_UP , newState ) |
testInverse ( ) { final int numVals = 10000 ; final java . util . Random random = java . util . concurrent . ThreadLocalRandom . current ( ) ; final int [ ] inverted = new int [ numVals ] ; final int [ ] original = new int [ numVals ] ; final java . util . List < java . lang . Integer > ints = java . util . stream . In... | org . junit . Assert . assertEquals ( i , inverted [ original [ i ] ] ) |
testTrashParentWithBaseModelIsIsNotVisible ( ) { org . junit . Assume . assumeTrue ( ( ( this ) instanceof com . liferay . trash . test . util . WhenHasParent ) ) ; org . junit . Assume . assumeTrue ( ( ( this ) instanceof com . liferay . trash . test . util . WhenIsAssetableBaseModel ) ) ; com . liferay . trash . test... | org . junit . Assert . assertFalse ( whenIsAssetableModel . isAssetEntryVisible ( baseModel , getAssetClassPK ( baseModel ) ) ) |
testStateful ( ) { org . apache . aries . ejb . modelling . impl . ParsedEJBServices pes = new org . apache . aries . ejb . modelling . impl . ParsedEJBServices ( ) ; pes . setAllowedNames ( java . util . Arrays . asList ( "Bar" , "Baz" ) ) ; pes . addEJBView ( "Baz" , "Stateful" , "com.acme.Bar" , true ) ; "<AssertPla... | org . junit . Assert . assertEquals ( 0 , pes . getServices ( ) . size ( ) ) |
testErrorMessageForSummaryFileAndTwoReports ( ) { final java . io . File summaryFile = new java . io . File ( "summary.txt" ) ; final java . lang . String summaryFilePath = summaryFile . getAbsolutePath ( ) ; setField ( checkMojo , "summaryOutputFile" , summaryFile ) ; final java . lang . String expected = ( ( "[LINT]<... | org . junit . Assert . assertEquals ( expected , actual ) |
withExtractedDirectionForDocumentSnapshotCursor ( ) { doAnswer ( com . google . cloud . firestore . LocalFirestoreHelper . queryResponse ( ) ) . when ( firestoreMock ) . streamRequest ( runQuery . capture ( ) , streamObserverCapture . capture ( ) , org . mockito . Matchers . < com . google . api . gax . rpc . ServerStr... | org . junit . Assert . assertEquals ( queryRequest , runQuery . getValue ( ) ) |
return_empty_sorted_set_java8 ( ) { java . util . Set < java . lang . String > emptySortedSet = java . util . Collections . emptySortedSet ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( emptySortedSet . isEmpty ( ) ) |
testShortName ( ) { java . lang . String shortName = "MyLogger" ; java . lang . String fullName = ( ( getClass ( ) . getName ( ) ) + "." ) + shortName ; "<AssertPlaceHolder>" ; } getName ( java . lang . String ) { return org . zeroturnaround . exec . stream . CallerLoggerUtil . getName ( name , 1 ) ; } | org . junit . Assert . assertEquals ( fullName , org . zeroturnaround . exec . stream . CallerLoggerUtil . getName ( shortName ) ) |
testActionTypeCategory ( ) { for ( final com . amazonaws . codepipeline . jenkinsplugin . CodePipelineStateModel . CategoryType categoryType : com . amazonaws . codepipeline . jenkinsplugin . CodePipelineStateModel . CategoryType . values ( ) ) { model . setActionTypeCategory ( categoryType . getName ( ) ) ; "<AssertPl... | org . junit . Assert . assertEquals ( categoryType , model . getActionTypeCategory ( ) ) |
testReturnTypeEnhancementFromThirdPartyLoader ( ) { org . jboss . forge . furnace . addons . AddonRegistry registry = org . jboss . forge . arquillian . services . LocalServices . getFurnace ( getClass ( ) . getClassLoader ( ) ) . getAddonRegistry ( ) ; java . lang . ClassLoader thisLoader = org . jboss . forge . furna... | org . junit . Assert . assertNotNull ( create ) |
testOldConfigsExistFalse ( ) { when ( mockedHistoryDao . hasOldRevision ( mockedProject . getConfigFile ( ) , configDates [ 0 ] ) ) . thenReturn ( true ) ; when ( mockedHistoryDao . hasOldRevision ( mockedProject . getConfigFile ( ) , configDates [ 1 ] ) ) . thenReturn ( false ) ; boolean expResult = false ; sut . onAt... | org . junit . Assert . assertEquals ( expResult , result ) |
focusRemainsInOriginalWindowWhenOpeningNewWindow ( ) { org . junit . Assume . assumeTrue ( org . openqa . selenium . firefox . FirefoxDriverTest . platformHasNativeEvents ( ) ) ; driver . get ( pages . xhtmlTestPage ) ; driver . findElement ( org . openqa . selenium . By . name ( "windowOne" ) ) . click ( ) ; sleepBeca... | org . junit . Assert . assertThat ( keyReporter . getAttribute ( "value" ) , org . hamcrest . Matchers . is ( "ABC<sp>DEF" ) ) |
selectRowIdAndVersionDistinct ( ) { org . sagebionetworks . table . cluster . SqlQuery translator = new org . sagebionetworks . table . cluster . SqlQueryBuilder ( "select<sp>distinct<sp>foo<sp>from<sp>syn123" , tableSchema ) . build ( ) ; "<AssertPlaceHolder>" ; } includesRowIdAndVersion ( ) { return this . includesRo... | org . junit . Assert . assertFalse ( translator . includesRowIdAndVersion ( ) ) |
convertPolygonWithHole_NoRedundantSpaces_ShouldConvert ( ) { java . lang . String wkt = "POLYGON<sp>((35<sp>10,<sp>45<sp>45,<sp>15<sp>40,<sp>10<sp>20,<sp>35<sp>10),(20<sp>30,<sp>35<sp>35,<sp>30<sp>20,<sp>20<sp>30))" ; java . lang . String geoJson = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . toGeoJson ( wk... | org . junit . Assert . assertEquals ( expectedGeoJson , geoJson ) |
updateConfiguration_updatesActive ( ) { int rowsModified ; org . easyrec . model . plugin . NamedConfiguration config ; config = new org . easyrec . model . plugin . NamedConfiguration ( 1 , 1 , waitingGenerator . getId ( ) , "Configuration<sp>2" , org . easyrec . store . dao . plugin . impl . NamedConfigurationDAOMysq... | org . junit . Assert . assertThat ( rowsModified , is ( 1 ) ) |
removeCorrespondingKeys ( ) { java . util . Properties p = new java . util . Properties ( ) ; p . setProperty ( SessionProfile . KEY_PROVIDER , "aaa" ) ; p . setProperty ( ( ( SessionProfile . KEY_PROVIDER ) + "_" ) , "bbb" ) ; p . setProperty ( ( ( SessionProfile . KEY_PREFIX ) + "" ) , "" ) ; p . setProperty ( ( ( Se... | org . junit . Assert . assertThat ( p , is ( answer ) ) |
testObjectMethodReturnsV8Object ( ) { com . eclipsesource . v8 . V8CallbackTest . ICallback callback = mock ( com . eclipsesource . v8 . V8CallbackTest . ICallback . class ) ; doReturn ( new com . eclipsesource . v8 . V8Object ( v8 ) . add ( "foo" , "bar" ) ) . when ( callback ) . objectMethodNoParameter ( ) ; v8 . reg... | org . junit . Assert . assertEquals ( "bar" , result . getString ( "foo" ) ) |
testGetScriptAsString ( ) { org . springframework . data . redis . core . script . DefaultRedisScript < java . lang . String > redisScript = new org . springframework . data . redis . core . script . DefaultRedisScript < java . lang . String > ( ) ; redisScript . setScriptText ( "return<sp>ARGS[1]" ) ; redisScript . se... | org . junit . Assert . assertEquals ( "return<sp>ARGS[1]" , redisScript . getScriptAsString ( ) ) |
testLoadingProperties ( ) { java . lang . String fromAddress = WaitListManager . waitListProperties . getProperty ( "from_address" ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { oscar . OscarProperties proper = oscar . OscarProperties . getInstance ( ) ; return proper . getProperty ( proName , nul... | org . junit . Assert . assertNotNull ( fromAddress ) |
should_deserialize_JSON_to_Object_field ( ) { org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . AClass aDomainObject = new org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . AClass ( ) ; org . springframework . data . simpledb . core . entity . ObjectFiel... | org . junit . Assert . assertEquals ( aJSONObject . getName ( ) , deserializedJSONObject . getName ( ) ) |
testSkipsValue ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; com . splicemachine . orc . stream . TestDecimalStream . writeBigInteger ( baos , java . math . BigInteger . valueOf ( Long . MAX_VALUE ) ) ; com . splicemachine . orc . stream . TestDecimalStream . writeBigInteger... | org . junit . Assert . assertEquals ( stream . nextLong ( ) , Long . MIN_VALUE ) |
createEndpoint_TransportNotExist ( ) { new mockit . Expectations ( ) { { transportManager . findTransport ( anyString ) ; result = null ; } } ; org . apache . servicecomb . loadbalance . ServiceCombServer server = ( ( org . apache . servicecomb . loadbalance . ServiceCombServer ) ( filter . createEndpoint ( Const . RES... | org . junit . Assert . assertNull ( server ) |
testSkipDouble ( ) { long sentinel = Long . MAX_VALUE ; org . apache . trevni . OutputBuffer out = new org . apache . trevni . OutputBuffer ( ) ; out . writeValue ( Double . MAX_VALUE , ValueType . DOUBLE ) ; out . writeLong ( sentinel ) ; org . apache . trevni . InputBuffer in = new org . apache . trevni . InputBuffer... | org . junit . Assert . assertEquals ( sentinel , in . readLong ( ) ) |
testRemoveMultiplePastEmpty ( ) { org . apache . commons . math3 . stat . regression . SimpleRegression regression = new org . apache . commons . math3 . stat . regression . SimpleRegression ( ) ; regression . addData ( removeX , removeY ) ; regression . removeData ( removeMultiple ) ; "<AssertPlaceHolder>" ; } getN ( ... | org . junit . Assert . assertEquals ( regression . getN ( ) , 0 ) |
testBatchSink ( ) { org . apache . hadoop . hbase . regionserver . wal . HLog [ ] entries = new org . apache . hadoop . hbase . regionserver . wal . HLog . Entry [ org . apache . hadoop . hbase . replication . regionserver . TestReplicationSink . BATCH_SIZE ] ; for ( int i = 0 ; i < ( org . apache . hadoop . hbase . re... | org . junit . Assert . assertEquals ( org . apache . hadoop . hbase . replication . regionserver . TestReplicationSink . BATCH_SIZE , scanRes . next ( org . apache . hadoop . hbase . replication . regionserver . TestReplicationSink . BATCH_SIZE ) . length ) |
shouldDeleteFlowCookie ( ) { org . openkilda . model . FlowCookie cookie = org . openkilda . model . FlowCookie . builder ( ) . unmaskedCookie ( org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . TEST_COOKIE ) . flowId ( org . openkilda . persistence . repositories . impl . Neo4jFlowC... | org . junit . Assert . assertEquals ( 0 , org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . flowCookieRepository . findAll ( ) . size ( ) ) |
testGetTransactionOtherThread ( ) { final java . util . concurrent . atomic . AtomicReference < java . lang . RuntimeException > exception = new java . util . concurrent . atomic . AtomicReference < java . lang . RuntimeException > ( null ) ; java . lang . Thread thread = new java . lang . Thread ( ) { public void run ... | org . junit . Assert . assertSame ( null , exception . get ( ) ) |
connection_prepared_statement_batch_01 ( ) { org . apache . jena . jdbc . connections . JenaConnection conn = this . getConnection ( ) ; org . apache . jena . jdbc . connections . PreparedStatement stmt = conn . prepareStatement ( "SELECT<sp>*<sp>WHERE<sp>{<sp>?<sp>?p<sp>?o<sp>}" ) ; for ( int i = 1 ; i <= 5 ; i ++ ) {... | org . junit . Assert . assertEquals ( 5 , batchResults . length ) |
AccessInstanceVariableIndirect_VarVarToString ( ) { java . lang . String fromClass = "Domain.Indirect.ViolatingFrom.AccessInstanceVariableIndirect_VarVarToString" ; java . lang . String toClass = "Domain.Indirect.IndirectTo.ServiceOne" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . A... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , true ) ) |
getFileNameShouldGetFileNameFromParam ( ) { java . util . Map < java . lang . String , java . lang . Object > metaDatas = java . util . Collections . singletonMap ( "multipart.filename" , ( ( java . lang . Object ) ( "expected" ) ) ) ; org . codegist . crest . param . Param param = mock ( org . codegist . crest . param... | org . junit . Assert . assertEquals ( "expected" , org . codegist . crest . util . MultiParts . getFileName ( param ) ) |
shutDownParameterShouldBeReturned ( ) { when ( view . shutdown . getSelectedIndex ( ) ) . thenReturn ( 1 ) ; when ( view . shutdown . getValue ( 1 ) ) . thenReturn ( org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . BY_TIMEOUT_4 . toString ( ) ) ; "<AssertPlaceHolder>" ; } getShutdown ( ) ... | org . junit . Assert . assertThat ( view . getShutdown ( ) , org . hamcrest . CoreMatchers . is ( org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . BY_TIMEOUT_4 ) ) |
testSetMatchNoRewriteLevel2Root ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( "options<sp>{output=AST;}\n" + "a" 4 ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "INT<sp>:<sp>\'0\'..\'9\'+;\n" ) + "a" 0 ) ; java . lang . String treeGrammar = "tree<sp>grammar<sp>TP;\n" + ( "options<sp>{output=AST;<sp>ASTLa... | org . junit . Assert . assertEquals ( "a" 3 , found ) |
testHashEquals ( ) { handleBreak ( new com . eclipsesource . v8 . debug . BreakHandler ( ) { @ com . eclipsesource . v8 . debug . Override public void onBreak ( final com . eclipsesource . v8 . debug . DebugHandler . DebugEvent event , final com . eclipsesource . v8 . debug . ExecutionState state , final com . eclipses... | org . junit . Assert . assertTrue ( ( ( java . lang . Boolean ) ( result ) ) ) |
t00_task_creation ( ) { droidefense . batch . base . IBatchTask task = new droidefense . batch . base . IBatchTask ( ) { @ droidefense . Override public void beforeTask ( ) { } @ droidefense . Override public void onTask ( ) { } @ droidefense . Override public void afterTask ( ) { } @ droidefense . Override public java... | org . junit . Assert . assertNotNull ( task ) |
isNotHeld ( ) { doReturn ( FilePlanComponentKind . RECORD ) . when ( mockedFilePlanService ) . getFilePlanComponentKind ( record ) ; doReturn ( Collections . EMPTY_LIST ) . when ( mockedHoldService ) . heldBy ( record , true ) ; boolean result = evaluator . evaluate ( record ) ; "<AssertPlaceHolder>" ; verify ( mockedH... | org . junit . Assert . assertFalse ( result ) |
testTessVersion ( ) { net . sourceforge . tess4j . TessAPI1Test . logger . info ( "TessVersion" ) ; java . lang . String expResult = "4.1.0" ; java . lang . String result = net . sourceforge . tess4j . TessAPI1 . TessVersion ( ) ; net . sourceforge . tess4j . TessAPI1Test . logger . info ( result ) ; "<AssertPlaceHolde... | org . junit . Assert . assertTrue ( result . startsWith ( expResult ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.