input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testSigning ( ) { com . microsoft . azure . storage . blob . CloudBlobContainer container = binaryManager . container ; org . nuxeo . ecm . core . blob . binary . Binary binary = binaryManager . getBinary ( org . nuxeo . ecm . core . api . Blobs . createBlob ( org . nuxeo . ecm . blob . azure . CONTENT ) ) ; "<AssertPl... | org . junit . Assert . assertNotNull ( binary ) |
isWebSubjectInRole ( ) { final java . lang . String appName = "applicationName" ; final java . lang . String moduleName = "moduleName" ; final java . lang . String servletName = "servlet.class" ; final java . lang . String role = "UserRole" ; final javax . security . auth . Subject subject = new javax . security . auth... | org . junit . Assert . assertFalse ( jaccService . isSubjectInRole ( appName , moduleName , servletName , role , req , subject ) ) |
getNoRemindersOfAUserHavingSetNoReminders ( ) { java . util . List < org . silverpeas . core . reminder . Reminder > reminders = org . silverpeas . core . reminder . Reminder . getByUser ( org . silverpeas . core . admin . user . model . User . getById ( "1" ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { if ( ( ( entrie... | org . junit . Assert . assertThat ( reminders . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testUnnestNSM ( ) { fr . inria . corese . core . Graph g = fr . inria . corese . core . GraphStore . create ( ) ; fr . inria . corese . core . query . QueryProcess exec = fr . inria . corese . core . query . QueryProcess . create ( g ) ; java . lang . String q = "prefix<sp>ex:<sp><htp://example.org/>" + ( ( ( ( ( ( ( "... | org . junit . Assert . assertEquals ( 2 , map . size ( ) ) |
testTriggerForgotPassword ( ) { java . lang . String passwordOld = simpleUser . getPasswordHash ( ) ; anonUserService . triggerForgotPassword ( simpleUser . getUserName ( ) ) ; com . sap . pto . dao . entities . User user2 = com . sap . pto . dao . UserDAO . getUserByUserName ( simpleUser . getUserName ( ) ) ; java . l... | org . junit . Assert . assertFalse ( passwordNew . equals ( passwordOld ) ) |
testPersonLinking ( ) { org . apache . stanbol . enhancer . servicesapi . ContentItem ci = initContentItem ( ) ; org . apache . stanbol . enhancer . engines . entitytagging . impl . NamedEntityTaggingEngine entityLinkingEngine = initEngine ( true , false , false ) ; entityLinkingEngine . computeEnhancements ( ci ) ; in... | org . junit . Assert . assertEquals ( 1 , entityAnnotationCount ) |
testEvaluateEquals ( ) { java . lang . Object someGuy = new java . lang . Object ( ) ; com . twitter . nodes . Node < java . lang . Object > firstNode = com . twitter . nodes . Node . value ( someGuy ) ; com . twitter . nodes . Node < java . lang . Object > secondNode = com . twitter . nodes . Node . value ( someGuy ) ... | org . junit . Assert . assertTrue ( resultFromNode ( equalsNode ) ) |
testConvert ( ) { java . lang . Long id = 1L ; java . lang . String name = "name" ; java . lang . String abbrName = "abbrName" ; org . lnu . is . domain . department . type . DepartmentType source = new org . lnu . is . domain . department . type . DepartmentType ( ) ; source . setAbbrName ( abbrName ) ; source . setNa... | org . junit . Assert . assertEquals ( expected , actual ) |
testImportClassLoad ( ) { final java . lang . Module testModule = moduleLoader . loadModule ( org . jboss . modules . ModuleClassLoaderTest . MODULE_WITH_CONTENT_ID ) ; final org . jboss . modules . ModuleClassLoader classLoader = testModule . getClassLoader ( ) ; try { java . lang . Class < ? > testClass = classLoader... | org . junit . Assert . assertNotNull ( testClass ) |
testVirtEdges ( ) { initGraph ( g ) ; com . graphhopper . routing . EdgeIterator iter = g . createEdgeExplorer ( ) . setBaseNode ( 0 ) ; iter . next ( ) ; com . graphhopper . routing . VirtualEdgeIterator vi = new com . graphhopper . routing . VirtualEdgeIterator ( 2 ) ; vi . add ( iter . detach ( false ) ) ; "<AssertP... | org . junit . Assert . assertTrue ( vi . next ( ) ) |
available_onPartiallyReadStream ( ) { final java . lang . String testString = "helloWorld" ; final byte [ ] testData = testString . getBytes ( ) ; final java . io . InputStream is = new org . exist . util . io . FastByteArrayInputStream ( testData ) ; final org . exist . util . io . CachingFilterInputStream cfis = new ... | org . junit . Assert . assertEquals ( ( ( testData . length ) - 2 ) , cfis . available ( ) ) |
testSessionInteger ( ) { java . util . Properties props = new java . util . Properties ( ) ; props . put ( "test" , 2 ) ; javax . mail . Session sess = javax . mail . Session . getInstance ( props , null ) ; "<AssertPlaceHolder>" ; } getIntSessionProperty ( javax . mail . Session , java . lang . String , int ) { return... | org . junit . Assert . assertEquals ( com . sun . mail . util . PropUtil . getIntSessionProperty ( sess , "test" , 1 ) , 2 ) |
getIfAbsentPutWithKey ( ) { org . eclipse . collections . api . block . function . primitive . BooleanFunction < java . lang . Integer > function = ( anObject ) -> ( anObject == null ) || ( ( anObject & 1 ) == 0 ) ; "<AssertPlaceHolder>" ; } newWithKeysValues ( K , V ) { return new org . eclipse . collections . impl . ... | org . junit . Assert . assertTrue ( this . newWithKeysValues ( 0 , true ) . getIfAbsentPutWithKey ( 0 , function ) ) |
validate_shouldPopulateErrorsIfObjectInvalid ( ) { org . openmrs . Location loc = new org . openmrs . Location ( ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( loc , "" ) ; org . openmrs . validator . ValidateUtil . validate ( loc , errors ) ; "<AssertP... | org . junit . Assert . assertTrue ( errors . hasErrors ( ) ) |
testInsert ( ) { org . joice . common . dao . domain . BizPayOrder record = new org . joice . common . dao . domain . BizPayOrder ( ) ; record . setBuyerUserId ( "6" ) ; record . setMerchantId ( "006" ) ; record . setTradeNo ( ( "tradeNo" + ( geneRandomId ( ) ) ) ) ; record . setTradeAmount ( new org . joice . common .... | org . junit . Assert . assertTrue ( ( ret == 1 ) ) |
switchIndexesTest ( ) { fr . gouv . vitam . common . model . RequestResponse < fr . gouv . vitam . common . database . index . model . IndexationResult > resp = client . switchIndexes ( fr . gouv . vitam . common . json . JsonHandler . createObjectNode ( ) ) ; "<AssertPlaceHolder>" ; } isOk ( ) { return ( this ) instan... | org . junit . Assert . assertTrue ( resp . isOk ( ) ) |
withTenEveryWhere ( ) { "<AssertPlaceHolder>" ; } swap ( int ) { return ( ( - 1431655766 & n ) > > > 1 ) | ( ( 1431655765 & n ) << 1 ) ; } | org . junit . Assert . assertEquals ( 1431655765 , s . swap ( - 1431655766 ) ) |
isMultipleLeftJoinFetch1LevelWorking ( ) { final com . uaihebert . model . EasyCriteria < com . uaihebert . model . test . Person > easyCriteria = com . uaihebert . uaicriteria . base . element . EasyCriteriaFactory . createQueryCriteria ( getEntityManager ( ) , com . uaihebert . model . test . Person . class ) ; easyC... | org . junit . Assert . assertTrue ( ( ( result . size ( ) ) > 0 ) ) |
testParensInConditonal2 ( ) { java . lang . String template = "<if((!a||b)&&!(c||d))>broken<else>works<endif>" ; org . stringtemplate . v4 . ST st = new org . stringtemplate . v4 . ST ( template ) ; st . add ( "a" , true ) ; st . add ( "b" , true ) ; st . add ( "c" , true ) ; st . add ( "d" , true ) ; java . lang . Str... | org . junit . Assert . assertEquals ( expected , result ) |
concurrentCreateJournal ( ) { for ( int i = 0 ; i < 5 ; i ++ ) { alluxio . client . fs . FileSystemMasterIntegrationTest . ConcurrentCreator concurrentCreator = new alluxio . client . fs . FileSystemMasterIntegrationTest . ConcurrentCreator ( alluxio . client . fs . FileSystemMasterIntegrationTest . DEPTH , alluxio . c... | org . junit . Assert . assertEquals ( mFsMaster . getFileId ( path ) , fsMaster . getFileId ( path ) ) |
testShouldDeleteImplicitlyTrashedChildFolder ( ) { int initialFoldersCount = com . liferay . document . library . kernel . service . DLAppServiceUtil . getFoldersCount ( group . getGroupId ( ) , parentFolder . getFolderId ( ) ) ; com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay ... | org . junit . Assert . assertEquals ( initialFoldersCount , foldersCount ) |
getAccountsIncludesOnlySigner ( ) { final org . nem . core . model . Account signer = org . nem . core . model . Utils . generateRandomAccount ( ) ; final org . nem . core . model . Transaction transaction = new org . nem . core . model . MultisigSignatureTransaction ( org . nem . core . time . TimeInstant . ZERO , sig... | org . junit . Assert . assertThat ( accounts , org . nem . core . model . IsEquivalent . equivalentTo ( signer ) ) |
evaluateRetourneertFalseBijAttribuutInOnderzoekMaarMagNietLeveren ( ) { when ( groep . getAttributen ( ) ) . thenReturn ( singletonList ( attribuut ) ) ; when ( attribuut . isInOnderzoek ( ) ) . thenReturn ( true ) ; when ( attribuut . isMagGeleverdWorden ( ) ) . thenReturn ( false ) ; final boolean result = predikaat ... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( false ) ) |
testSetEqualFontTwice ( ) { org . eclipse . swt . graphics . Font font = createFont ( ) ; gc . setFont ( font ) ; font = createFont ( ) ; gc . setFont ( font ) ; "<AssertPlaceHolder>" ; } getFont ( ) { checkWidget ( ) ; handleVirtual ( ) ; org . eclipse . swt . graphics . Font defaultFont = getItemData ( ) . defaultFon... | org . junit . Assert . assertSame ( font , gc . getFont ( ) ) |
testSearchForExtensionTwoDeepReference ( ) { ca . uhn . fhir . jpa . dao . r4 . SearchParameter siblingSp = new ca . uhn . fhir . jpa . dao . r4 . SearchParameter ( ) ; siblingSp . addBase ( "Patient" ) ; siblingSp . setCode ( "foobar" ) ; siblingSp . setType ( org . hl7 . fhir . r4 . model . Enumerations . SearchParam... | org . junit . Assert . assertThat ( foundResources , contains ( p2id . getValue ( ) ) ) |
testSortedArrayMerge ( ) { mjson . Json a1 = array ( 1 , 2 , 20 , 30 , 50 ) ; mjson . Json a2 = array ( 0 , 2 , 20 , 30 , 35 , 40 , 51 ) ; a1 . with ( a2 , "sort" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( array ( 0 , 1 , 2 , 20 , 30 , 35 , 40 , 50 , 51 ) , a1 ) |
testSetLeader ( ) { java . lang . String timestamp = java . lang . String . valueOf ( java . lang . System . nanoTime ( ) ) ; net . floodlightcontroller . hasupport . HAServerTest . tc . send ( ( "IWON<sp>2<sp>" + timestamp ) ) ; net . floodlightcontroller . hasupport . HAServerTest . tc . send ( ( "LEADER<sp>2<sp>" + ... | org . junit . Assert . assertEquals ( net . floodlightcontroller . hasupport . HAServerTest . ae . getLeader ( ) , "2" ) |
test34countServices ( ) { javax . servlet . http . HttpServletRequest request = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletRequest . class ) ; org . apache . ranger . plugin . store . PList < org . apache . ranger . plugin . model . RangerService > ret = org . mockito . Mockito . mock ( org . ... | org . junit . Assert . assertNotNull ( data ) |
getUsersFromEmptyLDAPGroup ( ) { java . util . List < java . lang . String > bioUsers = org . opencb . opencga . catalog . auth . authentication . LDAPUtils . getUsersFromLDAPGroup ( "ldap://localhost:9000" , "cipapi-ldp-rxn" , "ou=groups,dc=ge,dc=co,dc=uk" ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; } | org . junit . Assert . assertEquals ( 0 , bioUsers . size ( ) ) |
testMustBlockCallBackRequestWhenActiveAndRunnablesPending ( ) { manager . activateServerPushFor ( org . eclipse . rap . rwt . internal . serverpush . ServerPushManager_Test . HANDLE_1 ) ; manager . setHasRunnables ( true ) ; "<AssertPlaceHolder>" ; } mustBlockCallBackRequest ( ) { return ( isServerPushActive ( ) ) && (... | org . junit . Assert . assertFalse ( manager . mustBlockCallBackRequest ( ) ) |
testBuildTableNameNonRootServicePathDataModelByEntityOldEncoding ( ) { System . out . println ( ( ( ( ( getTestTraceHead ( "[NGSIPostgisSink.buildTableName]" ) ) + "--------<sp>When<sp>a<sp>non<sp>root<sp>service-path<sp>is<sp>notified/defaulted<sp>and<sp>data_model<sp>is<sp>" ) + "'dm-by-service-path'<sp>the<sp>MySQL<... | org . junit . Assert . assertEquals ( expecetedTableName , builtTableName ) |
mirrorWebServerTest ( ) { base . CaseConfig cfg = mock ( base . CaseConfig . class ) ; when ( cfg . getStartWaitPeriod ( ) ) . thenReturn ( 10000 ) ; when ( cfg . getHost ( ) ) . thenReturn ( "localhost" ) ; when ( cfg . getPort ( ) ) . thenReturn ( "8080" ) ; when ( cfg . getServerStartCommand ( ) ) . thenReturn ( "ja... | org . junit . Assert . assertTrue ( result ) |
nextShortWithIdenticalMinAndMax ( ) { "<AssertPlaceHolder>" ; } nextShort ( short , short ) { return ( ( short ) ( nextLong ( min , max ) ) ) ; } | org . junit . Assert . assertEquals ( ( ( short ) ( - 2 ) ) , source . nextShort ( ( ( short ) ( - 2 ) ) , ( ( short ) ( - 2 ) ) ) ) |
aNewValueFullfillingTheConstraintIsReturned ( ) { org . zkoss . ganttz . data . constraint . Constraint < java . lang . Integer > biggerThanFive = new org . zkoss . ganttz . data . constraint . Constraint < java . lang . Integer > ( ) { @ org . zkoss . ganttz . data . constraint . Override protected org . zkoss . gantt... | org . junit . Assert . assertThat ( biggerThanFive . applyTo ( 5 ) , org . hamcrest . CoreMatchers . equalTo ( 6 ) ) |
encrypThenDecrypt ( ) { char [ ] password = "qwert" . toCharArray ( ) ; byte [ ] plainText = org . xipki . util . StringUtil . toUtf8Bytes ( "123456" ) ; int iterationCount = 1000 ; byte [ ] encrypted = org . xipki . password . PasswordBasedEncryption . encrypt ( org . xipki . password . test . PBEWithHmacSHA256AndAES2... | org . junit . Assert . assertArrayEquals ( plainText , decrypted ) |
testSetMaxIterations_Int ( ) { org . openscience . cdk . charges . Electronegativity pe = new org . openscience . cdk . charges . Electronegativity ( ) ; int maxIter = 10 ; pe . setMaxIterations ( maxIter ) ; "<AssertPlaceHolder>" ; } getMaxIterations ( ) { return maxI ; } | org . junit . Assert . assertSame ( maxIter , pe . getMaxIterations ( ) ) |
testCreate ( ) { org . oscarehr . common . model . ReportLetters entity = new org . oscarehr . common . model . ReportLetters ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ;... | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
testInsertUnknownFeatureType ( ) { java . lang . String insert = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<gml:Point>" 1 + ( "<gml:Point>" 7 http : org . springframework . mock . web . MockHttpServletResponse response = postAsServletResponse ( "wfs" , insert ) ; "<AssertPlaceHolder>" ; org . w3c . dom . Document dom = dom ( ne... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
createAndSendMailForDeplyoments_oneDeployment_noAddress_sending_nok ( ) { java . util . ArrayList < ch . puzzle . itc . mobiliar . business . deploy . entity . DeploymentEntity > deployments = new java . util . ArrayList < ch . puzzle . itc . mobiliar . business . deploy . entity . DeploymentEntity > ( ) ; ch . puzzle ... | org . junit . Assert . assertNull ( result ) |
verifyStreamManifest ( ) { when ( this . skipperStreamDeployer . manifest ( eq ( "myManifest" ) , eq ( 666 ) ) ) . thenReturn ( "MANIFEST666" ) ; java . lang . String manifest = this . defaultStreamService . manifest ( "myManifest" , 666 ) ; verify ( this . skipperStreamDeployer , times ( 1 ) ) . manifest ( anyString (... | org . junit . Assert . assertEquals ( "MANIFEST666" , manifest ) |
testDuringAlteredModifiedDateMapping ( ) { org . joda . time . DateTime startDate = new org . joda . time . DateTime ( 2013 , 5 , 1 , 0 , 0 , 0 , 0 ) ; org . joda . time . DateTime endDate = new org . joda . time . DateTime ( 2013 , 12 , 31 , 0 , 0 , 0 , 0 ) ; java . lang . String replacedTemporalProperty = "myModified... | org . junit . Assert . assertEquals ( testResponse , cqlText ) |
shouldSerializeAllBasicFieldsIndented ( ) { java . lang . String expectedResult = "{\n<sp>\"order\":<sp>{\n<sp>\"price\":<sp>15.0,\n<sp>\"comments\":<sp>\"pack<sp>it<sp>nicely,<sp>please\"\n<sp>}\n}" ; br . com . caelum . vraptor . serialization . gson . GsonJSONSerializationTest . Order order = new br . com . caelum .... | org . junit . Assert . assertThat ( result ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expectedResult ) ) ) |
testIdentifiableSearch7 ( ) { org . hisp . dhis . query . Query query = org . hisp . dhis . query . Query . from ( schemaService . getDynamicSchema ( org . hisp . dhis . dataelement . DataElement . class ) , Junction . Type . OR ) ; org . hisp . dhis . query . Restriction nameRestriction = org . hisp . dhis . query . R... | org . junit . Assert . assertEquals ( 6 , objects . size ( ) ) |
launchRuleAuditWithCorrectJsonReturnAccepted ( ) { fr . gouv . vitam . common . thread . VitamThreadUtils . getVitamSession ( ) . setTenantId ( fr . gouv . vitam . functional . administration . client . AdminManagementClientRestTest . TENANT_ID ) ; when ( fr . gouv . vitam . functional . administration . client . Admin... | org . junit . Assert . assertEquals ( resp . getStatus ( ) , Status . ACCEPTED . getStatusCode ( ) ) |
searchOverLimit_True ( ) { doReturn ( new java . lang . Integer ( 1 ) ) . when ( bean ) . getSearchLimit ( ) ; initAttribute ( org . oscm . identityservice . ldap . LdapAccessServiceBeanTest . SEARCH_ATTRIBUTES [ 0 ] , aMock ) ; initAttribute ( org . oscm . identityservice . ldap . LdapAccessServiceBeanTest . SEARCH_AT... | org . junit . Assert . assertTrue ( flag ) |
shouldDecodeRawJson ( ) { com . couchbase . client . deps . io . netty . buffer . ByteBuf content = com . couchbase . client . deps . io . netty . buffer . Unpooled . copiedBuffer ( "{\"test:\":true}" , CharsetUtil . UTF_8 ) ; com . couchbase . client . java . document . RawJsonDocument decoded = converter . decode ( "... | org . junit . Assert . assertEquals ( "{\"test:\":true}" , decoded . content ( ) ) |
testSetReadonlyTrue ( ) { annotationListEditor . loadAnnotations ( annotations , annotationSourcesMap ) ; annotationListEditor . setReadonly ( true ) ; verify ( view , times ( 1 ) ) . setReadonly ( true ) ; "<AssertPlaceHolder>" ; verifyItemsReadonlyStatus ( 1 , false ) ; verifyItemsReadonlyStatus ( 1 , true ) ; } isRe... | org . junit . Assert . assertEquals ( true , annotationListEditor . isReadonly ( ) ) |
testCount ( ) { com . mashape . galileo . agent . filter . AnalyticsFilterIntegrationTest . globalQueue . clear ( ) ; java . lang . Thread . sleep ( 2000 ) ; com . mashape . galileo . agent . filter . AnalyticsFilterIntegrationTest . startJettyServer ( ) ; java . lang . Thread . sleep ( 2000 ) ; org . apache . http . c... | org . junit . Assert . assertEquals ( 10 , com . mashape . galileo . agent . filter . AnalyticsFilterIntegrationTest . globalQueue . size ( ) ) |
testMatchCompatibleNone ( ) { org . eclipse . pde . ui . tests . project . IPluginModelBase model = org . eclipse . pde . ui . tests . project . PluginRegistry . findModel ( "org.eclipse.pde.core" , "2.6.0" , IMatchRules . COMPATIBLE , null ) ; "<AssertPlaceHolder>" ; } findModel ( java . lang . String , java . lang . ... | org . junit . Assert . assertNull ( model ) |
testGetTemplateModel ( ) { java . lang . String url = getClass ( ) . getClassLoader ( ) . getResource ( org . guvnor . ala . ui . openshift . backend . service . OpenShiftClientServiceImplTest . TEMPLATE ) . toString ( ) ; org . guvnor . ala . ui . openshift . model . TemplateDescriptorModel model = service . getTempla... | org . junit . Assert . assertEquals ( expectedParams , model . getParams ( ) ) |
testGetLocale_worksInBackgroundThread ( ) { fakeClient ( mock ( org . eclipse . rap . rwt . client . Client . class ) ) ; final java . util . concurrent . atomic . AtomicReference < java . util . Locale > localeCaptor = new java . util . concurrent . atomic . AtomicReference < java . util . Locale > ( ) ; runInThread (... | org . junit . Assert . assertNotNull ( localeCaptor . get ( ) ) |
writeBitsWithFlush ( ) { final byte [ ] data = new byte [ ] { 0 , 1 , - 128 } ; final java . io . ByteArrayOutputStream stream = new java . io . ByteArrayOutputStream ( ) ; final com . flagstone . transform . coder . SWFEncoder encoder = new com . flagstone . transform . coder . SWFEncoder ( stream , 2 ) ; encoder . wr... | org . junit . Assert . assertArrayEquals ( data , stream . toByteArray ( ) ) |
testCanDump ( ) { org . nuxeo . runtime . management . jvm . HeapDumper dumper = new org . nuxeo . runtime . management . jvm . HeapDumper ( ) ; java . io . File file = dumper . dumpHeap ( ) ; "<AssertPlaceHolder>" ; } dumpHeap ( ) { java . io . File file = org . nuxeo . runtime . api . Framework . createTempFile ( "he... | org . junit . Assert . assertTrue ( file . exists ( ) ) |
convert_when_objectMessage_has_jmsExpiration ( ) { long jmsExpiration = 3600L ; javax . jms . ObjectMessage message = new org . apache . activemq . command . ActiveMQObjectMessage ( ) ; message . setJMSExpiration ( jmsExpiration ) ; javax . jms . ObjectMessage result = uut . convert ( message ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertEquals ( jmsExpiration , result . getJMSExpiration ( ) ) |
testFindById ( ) { prepareForQuery ( ) ; in . cubestack . apps . android . storm . entitites . TestEntity response = baseService . findById ( in . cubestack . apps . android . storm . entitites . TestEntity . class , 2 ) ; "<AssertPlaceHolder>" ; } findById ( java . lang . Class , long ) { in . cubestack . android . li... | org . junit . Assert . assertNotNull ( response ) |
testAnonymousOff ( ) { org . apache . hadoop . security . authentication . server . PseudoAuthenticationHandler handler = new org . apache . hadoop . security . authentication . server . PseudoAuthenticationHandler ( ) ; try { java . util . Properties props = new java . util . Properties ( ) ; props . setProperty ( Pse... | org . junit . Assert . assertNull ( token ) |
scrambleString ( ) { nl . jqno . equalsverifier . internal . reflection . ObjectAccessorScramblingTest . StringContainer foo = new nl . jqno . equalsverifier . internal . reflection . ObjectAccessorScramblingTest . StringContainer ( ) ; java . lang . String before = foo . s ; doScramble ( foo ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertFalse ( before . equals ( foo . s ) ) |
testConcatNull1 ( ) { java . lang . String result = ch . lambdaj . collection . LambdaCollections . with ( asList ( null , "a" ) ) . join ( ) ; "<AssertPlaceHolder>" ; } join ( ) { return ch . lambdaj . collection . Lambda . join ( getInner ( ) ) ; } | org . junit . Assert . assertEquals ( result , "a" ) |
getCategoriesUnrelatedToProcessDefinition ( ) { final java . util . List < org . bonitasoft . engine . core . category . model . SCategory > sCategories = new java . util . ArrayList < org . bonitasoft . engine . core . category . model . SCategory > ( ) ; final long processDefinitionId = 54894L ; final int fromIndex =... | org . junit . Assert . assertEquals ( sCategories , categoriesUnrelatedToProcessDefinition ) |
testBuildURIInvalueURL ( ) { try { org . hl7 . fhir . instance . client . ResourceAddress . buildAbsoluteURI ( "I<sp>am<sp>an<sp>invalid<sp>URI" ) ; org . junit . Assert . fail ( "Assertion:<sp>Should<sp>not<sp>get<sp>to<sp>this<sp>point" ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } buildAbso... | org . junit . Assert . assertTrue ( true ) |
testConsumerLargerThanProducer ( ) { com . questdb . store . FixedColumn col1 = new com . questdb . store . FixedColumn ( file , 4 ) ; com . questdb . store . FixedColumn col2 = new com . questdb . store . FixedColumn ( file2 , 4 ) ; com . questdb . net . ha . producer . FixedColumnDeltaProducer producer = new com . qu... | org . junit . Assert . assertFalse ( producer . hasContent ( ) ) |
testCTLFail ( ) { driver . run ( "drop<sp>table<sp>junit_sem_analysis" ) ; driver . run ( "drop<sp>table<sp>like_table" ) ; query = "create<sp>table<sp>junit_sem_analysis<sp>(a<sp>int)<sp>partitioned<sp>by<sp>(b<sp>string)<sp>stored<sp>as<sp>RCFILE" ; driver . run ( query ) ; query = "create<sp>table<sp>like_table<sp>l... | org . junit . Assert . assertEquals ( 0 , response . getResponseCode ( ) ) |
testIsRunSequentiallyParentTrueChildFalse ( ) { hudson . matrix . MatrixProject parentProject = new hudson . matrix . MatrixProjectTest . MatrixProjectMock ( "parent" ) ; parentProject . setRunSequentially ( Boolean . TRUE ) ; hudson . matrix . MatrixProject childProject1 = new hudson . matrix . MatrixProjectTest . Mat... | org . junit . Assert . assertFalse ( childProject1 . isRunSequentially ( ) ) |
decodeStreamWeird ( ) { java . io . InputStream rleStream = getClass ( ) . getResourceAsStream ( "/bmp/blauesglas_4.rle" ) ; long rleOffset = 118 ; java . io . InputStream plainSream = getClass ( ) . getResourceAsStream ( "/bmp/blauesglas_4.bmp" ) ; long plainOffset = 118 ; skipFully ( rleStream , rleOffset ) ; skipFul... | org . junit . Assert . assertEquals ( size , pos ) |
testParseAllElements ( ) { com . google . api . client . xml . XmlTest . AllType xml = new com . google . api . client . xml . XmlTest . AllType ( ) ; org . xmlpull . v1 . XmlPullParser parser = com . google . api . client . xml . Xml . createParser ( ) ; parser . setInput ( new java . io . StringReader ( com . google ... | org . junit . Assert . assertEquals ( com . google . api . client . xml . XmlTest . ALL_TYPE_WITH_DATA , out . toString ( ) ) |
testEmissionSubscriptionRace ( ) { io . reactivex . Scheduler s = io . reactivex . schedulers . Schedulers . io ( ) ; io . reactivex . Scheduler . Worker worker = io . reactivex . schedulers . Schedulers . io ( ) . createWorker ( ) ; try { for ( int i = 0 ; i < 50000 ; i ++ ) { if ( ( i % 1000 ) == 0 ) { System . out .... | org . junit . Assert . assertEquals ( 1 , o . get ( ) ) |
diffMetWerkelijkeVoorbeelden ( ) { java . nio . file . Path xml1 = geefInput ( "BRLV0018-TC00-3-expected.xml" ) ; java . nio . file . Path xml2 = geefInput ( "BRLV0018-TC00-3-actual.xml" ) ; java . nio . file . Path out = geefOutput ( "BRLV0018-TC00-2.diff" ) ; diffHandler . schrijfDiff ( xml1 , xml2 , out , true ) ; "... | org . junit . Assert . assertTrue ( out . toFile ( ) . exists ( ) ) |
testGetValue03 ( ) { javax . el . ELProcessor processor = new javax . el . ELProcessor ( ) ; java . lang . Object result = processor . getValue ( "1;2<sp>+<sp>3" , org . apache . el . parser . Integer . class ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . String , java . lang . Class ) { javax . el . ValueExpre... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 5 ) , result ) |
testAlternativeGroup2 ( ) { final de . ovgu . featureide . fm . core . base . IFeatureModel fm = loadXML ( "<alt<sp>mandatory=\"true\"<sp>name=\"S\"><feature<sp>mandatory=\"true\"<sp>name=\"A\"/><feature<sp>mandatory=\"true\"<sp>name=\"B\"/><feature<sp>mandatory=\"true\"<sp>name=\"C\"/></alt>" ) ; final de . ovgu . fea... | org . junit . Assert . assertEquals ( 3 , c . number ( ) ) |
shouldBeFalseIfPropertyExistsButisFalse ( ) { java . lang . System . setProperty ( "foo.bar" , "false" ) ; "<AssertPlaceHolder>" ; } isActive ( org . togglz . core . repository . FeatureState , org . togglz . core . user . FeatureUser ) { return true ; } | org . junit . Assert . assertFalse ( strategy . isActive ( state , user ) ) |
testCustomInstallLink ( ) { it . com . atlassian . labs . speakeasy . TestUserProfile . product . getPageBinder ( ) . bind ( it . com . atlassian . labs . speakeasy . SpeakeasyUserPage . class ) . enablePlugin ( "plugin-tests" ) ; it . com . atlassian . labs . speakeasy . SpeakeasyUserPage page = it . com . atlassian .... | org . junit . Assert . assertTrue ( ( ! ( page . getSuccessMessages ( ) . isEmpty ( ) ) ) ) |
testNullPath ( ) { org . jdto . entities . ComplexEntity testIt = new org . jdto . entities . ComplexEntity ( ) ; org . jdto . spring . BeanWrapperBeanModifier modifier = new org . jdto . spring . BeanWrapperBeanModifier ( ) ; java . lang . Object value = modifier . readPropertyValue ( "association.related" , testIt ) ... | org . junit . Assert . assertNull ( value ) |
testUnresolvedAddress ( ) { java . net . InetSocketAddress address = new java . net . InetSocketAddress ( "test" , 0 ) ; boolean expected = false ; org . apache . tajo . rpc . RpcConnectionKey rpcConnectionKey = new org . apache . tajo . rpc . RpcConnectionKey ( address , org . apache . tajo . rpc . test . DummyProtoco... | org . junit . Assert . assertTrue ( expected ) |
defaultNullStringGivesNull ( ) { com . google . devtools . common . options . OptionsParserTest . NullTestOptions options = com . google . devtools . common . options . Options . parse ( com . google . devtools . common . options . OptionsParserTest . NullTestOptions . class ) . getOptions ( ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertNull ( options . simple ) |
testFill ( ) { com . liveramp . cascading_ext . FixedSizeBitSet s = new com . liveramp . cascading_ext . FixedSizeBitSet ( 1099 ) ; s . fill ( ) ; s . unset ( 100 ) ; for ( int i = 0 ; i < 1099 ; i ++ ) { boolean expectedVal = true ; if ( i == 100 ) { expectedVal = false ; } "<AssertPlaceHolder>" ; } } get ( long ) { r... | org . junit . Assert . assertTrue ( ( ( s . get ( i ) ) == expectedVal ) ) |
offsetBeforeStartEL ( ) { org . eclipse . angularjs . core . utils . AngularELRegion region = org . eclipse . angularjs . core . utils . AngularRegionUtils . getAngularELRegion ( DOMRegionContext . XML_CONTENT , "{{todo.text<sp>+<sp>to}}" , 588 , 588 , "{{" , "}}" ) ; "<AssertPlaceHolder>" ; } getAngularELRegion ( java... | org . junit . Assert . assertNull ( region ) |
injectIntoWith ( ) { com . gs . collections . api . list . MutableList < java . lang . Integer > objects = com . gs . collections . impl . list . mutable . FastList . newListWith ( 1 , 2 , 3 ) ; java . lang . Integer result = objects . injectIntoWith ( 1 , ( injectedValued , item , parameter ) -> ( injectedValued + ite... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 7 ) , result ) |
testBuildNoTimeout ( ) { final java . nio . file . Path dockerDirectory = com . spotify . docker . client . DefaultDockerClientTest . getResource ( "dockerDirectorySleeping" ) ; final java . lang . String returnedImageId = sut . build ( dockerDirectory , "test" , ( message ) -> com . spotify . docker . client . Default... | org . junit . Assert . assertNotNull ( returnedImageId ) |
shouldEncodeAndDecodeVersion4 ( ) { final org . apache . kafka . streams . processor . internals . assignment . SubscriptionInfo info = new org . apache . kafka . streams . processor . internals . assignment . SubscriptionInfo ( 4 , processId , activeTasks , standbyTasks , "localhost:80" ) ; final org . apache . kafka ... | org . junit . Assert . assertEquals ( expectedInfo , org . apache . kafka . streams . processor . internals . assignment . SubscriptionInfo . decode ( info . encode ( ) ) ) |
testDefaultFormattedSerializationIsISO ( ) { com . owlike . genson . Genson genson = createFormatterGenson ( ) ; java . time . ZonedDateTime dt = java . time . ZonedDateTime . now ( ) ; java . lang . String formattedValue = DateTimeFormatter . ISO_ZONED_DATE_TIME . format ( dt ) ; "<AssertPlaceHolder>" ; } toJsonQuoted... | org . junit . Assert . assertEquals ( toJsonQuotedString ( formattedValue ) , genson . serialize ( dt ) ) |
setBrokerRevenueShare_NotNull ( ) { org . oscm . ui . model . Marketplace m = new org . oscm . ui . model . Marketplace ( ) ; m . setBrokerRevenueShare ( BigDecimal . TEN ) ; "<AssertPlaceHolder>" ; } getBrokerRevenueShare ( ) { org . oscm . ui . model . Marketplace m = new org . oscm . ui . model . Marketplace ( ) ; o... | org . junit . Assert . assertEquals ( BigDecimal . TEN , m . getBrokerRevenueShare ( ) ) |
testGetTitle ( ) { final java . lang . String errorKey = org . drools . workbench . screens . guided . dtable . client . resources . i18n . GuidedDecisionTableErraiConstants . ActionWorkItemPlugin_ExecuteWorkItem ; final java . lang . String errorMessage = "Title" ; when ( translationService . format ( errorKey ) ) . t... | org . junit . Assert . assertEquals ( errorMessage , title ) |
ofTest ( ) { tec . units . ri . AbstractQuantity < javax . measure . quantity . Length > l = tec . units . ri . quantity . NumberQuantity . of ( java . lang . Short . valueOf ( "10" ) . shortValue ( ) , Units . METRE ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( java . lang . Short . valueOf ( "10" ) , l . getValue ( ) ) |
testFindByNameLike ( ) { securityContextManager . setBar ( ) ; org . springframework . data . domain . Page < com . github . emailtohl . building . site . entities . flow . ApplicationForm > page = applicationFormService . findByNameLike ( ( ( title . substring ( 0 , ( ( title . length ( ) ) - 1 ) ) ) + '%' ) , pageabl... | org . junit . Assert . assertTrue ( ( ( page . getTotalElements ( ) ) > 0 ) ) |
testClosePipelineNotOpen ( ) { getResults ( ) ; java . util . List < java . lang . Object > results = connection . closePipeline ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return delegate . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( results . isEmpty ( ) ) |
testAdding ( ) { java . lang . String id = co . jirm . spring . JirmDaoIntegrationTest . randomId ( ) ; co . jirm . spring . TestBean t = new co . jirm . spring . TestBean ( id , 2L , java . util . Calendar . getInstance ( ) ) ; dao . insert ( t ) ; int i = dao . update ( ) . plus ( "longProp" , 100 ) . where ( ) . pro... | org . junit . Assert . assertTrue ( ( i > 0 ) ) |
givenUsersInDB_WhenFindAllSortWithFunction_ThenThrowException ( ) { userRepository . save ( new com . baeldung . domain . user . User ( USER_NAME_ADAM , java . time . LocalDate . now ( ) , USER_EMAIL , ACTIVE_STATUS ) ) ; userRepository . save ( new com . baeldung . domain . user . User ( USER_NAME_PETER , java . time ... | org . junit . Assert . assertThat ( usersSortByNameLength . get ( 0 ) . getName ( ) ) |
testGetDBsqlSession ( ) { org . apache . ibatis . session . SqlSession sqlSession = null ; System . out . println ( "test<sp>mybatis<sp>GetDBsqlSessoin<sp>=======================" ) ; try { sqlSession = new com . mybatis . db . DBAccess ( ) . getSqlSession ( ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException... | org . junit . Assert . assertNotNull ( sqlSession ) |
testEquals ( ) { org . gbif . api . model . checklistbank . NameUsageMediaObject i1 = new org . gbif . api . model . checklistbank . NameUsageMediaObject ( ) ; i1 . setIdentifier ( java . net . URI . create ( "http://www.example.org/image.png" ) ) ; i1 . setTitle ( "Puma<sp>concolor" ) ; org . gbif . api . model . chec... | org . junit . Assert . assertEquals ( i1 , i2 ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . fragment . model . FragmentEntryLink > fragmentEntryLinks = _persistence . fetchByPrimary... | org . junit . Assert . assertTrue ( fragmentEntryLinks . isEmpty ( ) ) |
createCommandResolver_WithTimeoutAndOldRequestTime ( ) { when ( request . getInputStream ( ) ) . thenReturn ( new com . betfair . cougar . transport . impl . protocol . http . soap . TestServletInputStream ( buildSoapMessage ( null , com . betfair . cougar . transport . impl . protocol . http . soap . SoapTransportComm... | org . junit . Assert . assertTrue ( ( ( constraints . getExpiryTime ( ) ) < ( java . lang . System . currentTimeMillis ( ) ) ) ) |
getTimestampFromResultSetWithCustomFormat ( ) { au . com . bytecode . opencsv . Timestamp date = new au . com . bytecode . opencsv . Timestamp ( 109 , 11 , 15 , 12 , 0 , 0 , 0 ) ; long dateInMilliSeconds = date . getTime ( ) ; java . lang . String customFormat = "mm/dd/yy<sp>HH:mm:ss" ; java . text . SimpleDateFormat t... | org . junit . Assert . assertArrayEquals ( expectedValues , columnValues ) |
testShouldCallToJsonMethodIfPresent ( ) { java . lang . String json = new org . openqa . selenium . remote . BeanToJsonConverter ( ) . convert ( new org . openqa . selenium . remote . BeanToJsonConverterTest . JsonAware ( "converted" ) ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { java . lang . Strin... | org . junit . Assert . assertEquals ( "converted" , json ) |
findAll ( ) { java . util . List < com . querydsl . example . dto . Customer > customers = customerDao . findAll ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( values . isEmpty ( ) ) && ( batches . isEmpty ( ) ) ; } | org . junit . Assert . assertFalse ( customers . isEmpty ( ) ) |
testAfter_same ( ) { final org . apache . rya . api . function . temporal . AfterTemporalInstant function = new org . apache . rya . api . function . temporal . AfterTemporalInstant ( ) ; final org . eclipse . rdf4j . model . Value [ ] args = new org . eclipse . rdf4j . model . Value [ 2 ] ; args [ 0 ] = org . apache .... | org . junit . Assert . assertEquals ( org . apache . rya . api . function . temporal . AfterTemporalFunctionsTest . VF . createLiteral ( false ) , rez ) |
testRetrieveValueNull ( ) { org . terasoluna . gfw . common . codelist . JdbcCodeList jdbcCodeList = new org . terasoluna . gfw . common . codelist . JdbcCodeList ( ) ; jdbcCodeList . setDataSource ( dataSource ) ; jdbcCodeList . setLabelColumn ( "code_name" ) ; jdbcCodeList . setValueColumn ( "labelColumn" ) ; jdbcCod... | org . junit . Assert . assertThat ( mapOutput . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testSelectTutorWithCoursesById ( ) { com . mybatis3 . domain . Tutor tutor = tutorService . selectTutorWithCoursesById ( 1 ) ; "<AssertPlaceHolder>" ; System . err . println ( tutor ) ; } | org . junit . Assert . assertNotNull ( tutor ) |
testStartAndQuery ( ) { databaseServer . start ( ) ; java . sql . Connection connection = java . sql . DriverManager . getConnection ( databaseServer . getConnectionUrl ( ) ) ; java . lang . String query = "select<sp>*<sp>from<sp>INFORMATION_SCHEMA.CATALOGS" ; java . sql . PreparedStatement statement = connection . pre... | org . junit . Assert . assertTrue ( resultSet . first ( ) ) |
testShouldBeAbleToUseArrowKeys ( ) { driver . get ( pages . javascriptPage ) ; org . openqa . selenium . WebElement keyReporter = driver . findElement ( org . openqa . selenium . By . id ( "keyReporter" ) ) ; keyReporter . sendKeys ( "tet" , Keys . ARROW_LEFT , "s" ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . la... | org . junit . Assert . assertThat ( keyReporter . getAttribute ( "value" ) , org . hamcrest . Matchers . is ( "test" ) ) |
shouldGetEmptyPropertiesFromTimestampWhenNoTimestampPropertyInGroup ( ) { final uk . gov . gchq . gaffer . store . schema . Schema schema = new uk . gov . gchq . gaffer . store . schema . Schema . Builder ( ) . json ( uk . gov . gchq . gaffer . commonutil . StreamUtil . schemas ( uk . gov . gchq . gaffer . accumulostor... | org . junit . Assert . assertEquals ( 0 , properties . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.