input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testIsTouchUIClassic ( ) { osgiConfig . put ( "isTouch" , "false" ) ; authorUIHelper . activate ( osgiConfig ) ; "<AssertPlaceHolder>" ; } isTouchUI ( ) { return isTouch ; } | org . junit . Assert . assertFalse ( authorUIHelper . isTouchUI ( ) ) |
rasterizeToTemporaryResourceReturnsNullWhenBaseTempDirCannotBeCreated ( ) { this . baseDirectory . getRoot ( ) . mkdirs ( ) ; writeTestFile ( new java . io . File ( this . baseDirectory . getRoot ( ) , "temp" ) ) ; org . xwiki . resource . temporary . TemporaryResourceReference tref = this . mocker . getComponentUnderT... | org . junit . Assert . assertNull ( tref ) |
minimalBuilderTest ( ) { org . appenders . log4j2 . elasticsearch . bulkprocessor . BasicCredentials . Builder builder = org . appenders . log4j2 . elasticsearch . bulkprocessor . BasicCredentialsTest . createTestBuilder ( ) ; org . appenders . log4j2 . elasticsearch . bulkprocessor . BasicCredentials certInfo = builde... | org . junit . Assert . assertNotNull ( certInfo ) |
testUTF8Decode ( ) { byte [ ] expected = new byte [ ] { 1 , 48 , 49 , ( ( byte ) ( 255 ) ) } ; byte [ ] actual = Encoding . UTF8 . decode ( new byte [ ] { 1 , 48 , 49 , ( ( byte ) ( 195 ) ) , ( ( byte ) ( 191 ) ) } ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertArrayEquals ( expected , actual ) |
customerAccountCanBeCreatedWithNoAccountFees ( ) { accountFees = new java . util . ArrayList < org . mifos . accounts . business . AccountFeesEntity > ( ) ; customer = new org . mifos . domain . builders . CenterBuilder ( ) . inActive ( ) . build ( ) ; customerAccount = org . mifos . customers . business . CustomerAcco... | org . junit . Assert . assertThat ( customerAccount . getAccountFees ( ) . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testBuild ( ) { org . lnu . is . domain . street . type . StreetType context = new org . lnu . is . domain . street . type . StreetType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>StreetType<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testSingleRedisRepository ( ) { com . amadeus . session . repository . redis . AbstractRedisSessionRepositoryFactory factory = spy ( new com . amadeus . session . repository . redis . JedisSessionRepositoryFactory ( ) ) ; com . amadeus . session . SessionConfiguration sessionConfig = spy ( new com . amadeus . session .... | org . junit . Assert . assertNotNull ( repo ) |
testDownloadBill ( ) { java . lang . String response = com . riversoft . weixin . pay . payment . Payments . defaultPayments ( ) . downloadAllBill ( new java . util . Date ( ) ) ; "<AssertPlaceHolder>" ; } downloadAllBill ( java . util . Date ) { return downloadBill ( date , "ALL" ) ; } | org . junit . Assert . assertNotNull ( response ) |
testIteratorEmpty ( ) { fr . gouv . vitam . common . client . VitamRequestIteratorTest . startup = true ; try ( fr . gouv . vitam . common . client . VitamRequestIterator iterator = new fr . gouv . vitam . common . client . VitamRequestIterator ( fr . gouv . vitam . common . client . VitamRequestIteratorTest . client ,... | org . junit . Assert . assertFalse ( iterator . hasNext ( ) ) |
testStop ( ) { java . lang . String appName = "example-app" ; try { int result = org . apache . hadoop . yarn . service . client . TestApiServiceClient . asc . actionStop ( appName ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException | org . apache . hadoop . yarn . exceptions . YarnException e ) { org . junit... | org . junit . Assert . assertEquals ( org . apache . hadoop . yarn . service . client . EXIT_SUCCESS , result ) |
writeInvokeMessage ( ) { long session = 1L ; java . lang . String method = "invoke" ; cocaine . message . Message msg = cocaine . message . Messages . invoke ( session , method ) ; byte [ ] bytes = pack . write ( java . util . Arrays . asList ( 3 , session , java . util . Arrays . asList ( method ) ) ) ; byte [ ] resul... | org . junit . Assert . assertArrayEquals ( bytes , result ) |
testInsert ( ) { int savedRow = transactionTemplate . execute ( new org . springframework . transaction . support . TransactionCallback < java . lang . Integer > ( ) { @ com . alipay . zdal . springboot . Override public com . alipay . zdal . springboot . Integer doInTransaction ( org . springframework . transaction . ... | org . junit . Assert . assertTrue ( ( savedRow > 0 ) ) |
testGetOwnedTypeParameter1 ( ) { java . lang . String msg ; msg = "The<sp>adaptation<sp>of<sp>Type.getOwnedTypeParameter()<sp>seems<sp>to<sp>be<sp>wrong." ; msg += "<sp>The<sp>Type<sp>" + ( org . dresdenocl . metamodels . test . tests . TestType . class1 . getQualifiedName ( ) ) ; msg += "<sp>should<sp>not<sp>have<sp>T... | org . junit . Assert . assertEquals ( msg , 0 , org . dresdenocl . metamodels . test . tests . TestType . class1 . getOwnedTypeParameter ( ) . size ( ) ) |
convertBootstrapServerSyncTest ( ) { org . kaaproject . kaa . server . sync . platform . AvroEncDec avroEncDec = new org . kaaproject . kaa . server . sync . platform . AvroEncDec ( ) ; java . lang . reflect . Method method = org . kaaproject . kaa . server . sync . platform . AvroEncDec . class . getDeclaredMethod ( o... | org . junit . Assert . assertNull ( method . invoke ( avroEncDec , serverSync ) ) |
getNonExistentSourceFromDb ( ) { final java . lang . String contextPath = "/db" ; final java . lang . String location = "library.xqm" ; final org . exist . storage . DBBroker mockBroker = createMock ( org . exist . storage . DBBroker . class ) ; expect ( mockBroker . getXMLResource ( anyObject ( ) , anyObject ( ) ) ) .... | org . junit . Assert . assertNull ( libSource ) |
testFindNotificationSchemaByAppIdAndTypeAndVersion ( ) { org . kaaproject . kaa . common . dto . NotificationDto dto = generateNotificationsDto ( null , null , 1 , null ) . get ( 0 ) ; generateNotificationSchemaDto ( dto . getApplicationId ( ) , NotificationTypeDto . SYSTEM ) ; org . kaaproject . kaa . common . dto . N... | org . junit . Assert . assertNotNull ( schema ) |
test ( ) { org . hy . common . thread . ThreadPool . setMaxThread ( 1000 ) ; org . hy . common . thread . ThreadPool . setMinThread ( 10 ) ; org . hy . common . thread . ThreadPool . setMinIdleThread ( 2 ) ; org . hy . common . thread . ThreadPool . setIntervalTime ( 100 ) ; org . hy . common . thread . ThreadPool . se... | org . junit . Assert . assertTrue ( true ) |
testToStrippedURLStr ( ) { System . out . println ( "toStrippedURLStr" ) ; java . net . URI uri = new java . net . URI ( "https://mary@somehost.apache.org:8081/path/to/something?x1=Christmas&user=unknown" ) ; java . lang . String str = org . netbeans . core . network . proxy . pac . PacUtils . toStrippedURLStr ( uri ) ... | org . junit . Assert . assertEquals ( expResult , str ) |
testGetParametersAndDisabledDefaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . Long educationFormTypeId = 3L ; org . lnu . is . domain . education . form . type . EducationFormType eduFormType = new org . lnu . is . domain . education . form . type . EducationFormType ( ) ; eduForm... | org . junit . Assert . assertEquals ( expected , actual ) |
testTransform ( ) { java . lang . String result = org . eclipse . smarthome . core . transform . actions . Transformation . transform ( "UnknownTransformation" , "function" , "test" ) ; "<AssertPlaceHolder>" ; } transform ( java . lang . String , java . lang . String , java . lang . String ) { org . slf4j . Logger logg... | org . junit . Assert . assertEquals ( "test" , result ) |
alleleOriginLabels ( ) { org . opencb . commons . datastore . core . QueryResponse < java . lang . String > queryResponse = cellBaseClient . getClinicalClient ( ) . alleleOriginLabels ( ) ; "<AssertPlaceHolder>" ; } alleleOriginLabels ( ) { org . opencb . commons . datastore . core . QueryResponse < java . lang . Strin... | org . junit . Assert . assertTrue ( ( ( queryResponse . allResults ( ) . size ( ) ) > 0 ) ) |
shouldFindDirectedShortestPathsWithEdgesIncluded ( ) { final org . apache . tinkerpop . gremlin . process . computer . ComputerResult result = graph . compute ( graphProvider . getGraphComputer ( graph ) . getClass ( ) ) . program ( org . apache . tinkerpop . gremlin . process . computer . search . path . ShortestPathV... | org . junit . Assert . assertTrue ( result . memory ( ) . exists ( ShortestPathVertexProgram . SHORTEST_PATHS ) ) |
doesNotReportMissingResponseForTreatmentEndedImmediately ( ) { final java . util . List < com . hartwig . hmftools . common . ecrf . datamodel . ValidationFinding > findings = com . hartwig . hmftools . patientdb . validators . PatientValidator . validateTreatmentResponses ( com . hartwig . hmftools . patientdb . valid... | org . junit . Assert . assertEquals ( 0 , findings . size ( ) ) |
testCardFilter ( ) { java . util . ArrayList < java . lang . String > filter = new java . util . ArrayList ( ) ; filter . add ( "name=Air" ) ; io . magicthegathering . javasdk . resource . Card testCard = new io . magicthegathering . javasdk . resource . Card ( ) ; testCard . setMultiverseid ( 94 ) ; testCard . setName... | org . junit . Assert . assertTrue ( io . magicthegathering . javasdk . api . CardAPI . getAllCards ( filter ) . contains ( testCard ) ) |
requestScopedActiveInNestedInvocation ( ) { try ( org . jboss . weld . environment . se . WeldContainer container = new org . jboss . weld . environment . se . Weld ( ) . initialize ( ) ) { org . jboss . weld . environment . se . test . context . requestScope . Foo foo = container . select ( org . jboss . weld . enviro... | org . junit . Assert . assertEquals ( 3 , foo . pingNested ( ) ) |
findTest ( ) { cn . hutool . db . Db . use ( ) ; java . util . List < cn . hutool . db . Entity > find = cn . hutool . db . Db . use ( ) . find ( cn . hutool . db . Entity . create ( "user" ) . set ( "age" , 18 ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return sessionPool . get ( key ) ; } | org . junit . Assert . assertEquals ( "" , find . get ( 0 ) . get ( "name" ) ) |
testPositionSearchWithVarLengthArrayWithNullValue2 ( ) { java . lang . String [ ] strArr = new java . lang . String [ 5 ] ; strArr [ 0 ] = "abx" ; strArr [ 1 ] = "ereref" ; strArr [ 2 ] = "random" ; strArr [ 3 ] = "random12" ; strArr [ 4 ] = null ; org . apache . phoenix . schema . types . PhoenixArray arr = org . apac... | org . junit . Assert . assertEquals ( "random" , org . apache . hadoop . hbase . util . Bytes . toString ( res ) ) |
deleteKOdoesnotexist ( ) { "<AssertPlaceHolder>" ; testedStore . deleteProperty ( org . ff4j . test . propertystore . PropertyStoreTestSupport . INVALID ) ; } existProperty ( java . lang . String ) { org . ff4j . utils . Util . assertHasLength ( name ) ; return propertySource . containsProperty ( name ) ; } | org . junit . Assert . assertFalse ( testedStore . existProperty ( org . ff4j . test . propertystore . PropertyStoreTestSupport . INVALID ) ) |
testEncodeAndDecodeRandomDataWithoutPadding ( ) { org . kocakosm . pitaya . util . BaseEncoding e = BaseEncoding . BASE_32 . withoutPadding ( ) ; for ( int i = 0 ; i < 100 ; i ++ ) { byte [ ] bytes = new byte [ org . kocakosm . pitaya . util . Base32Test . RND . nextInt ( 2049 ) ] ; org . kocakosm . pitaya . util . Bas... | org . junit . Assert . assertArrayEquals ( bytes , e . decode ( e . encode ( bytes ) ) ) |
equalsReturnsTrueForSameQueries ( ) { io . searchbox . core . Search search1 = new io . searchbox . core . Search . Builder ( "query1" ) . addIndex ( "twitter" ) . addType ( "tweet" ) . build ( ) ; io . searchbox . core . Search search1Duplicate = new io . searchbox . core . Search . Builder ( "query1" ) . addIndex ( "... | org . junit . Assert . assertEquals ( search1 , search1Duplicate ) |
testFactoryMakesFieldAnnotationInjector ( ) { com . picocontainer . ComponentFactory cf = createComponentFactory ( ) ; com . picocontainer . monitors . ConsoleComponentMonitor cm = new com . picocontainer . monitors . ConsoleComponentMonitor ( ) ; com . picocontainer . ComponentAdapter < com . picocontainer . injectors... | org . junit . Assert . assertNotNull ( ca ) |
getOrgainizationData_ResellerManager ( ) { container . login ( resellerManager . getKey ( ) , UserRoleType . RESELLER_MANAGER . toString ( ) ) ; final org . oscm . internal . vo . VOOrganization voOrganization = accountService . getOrganizationData ( ) ; "<AssertPlaceHolder>" ; } getOrganizationData ( ) { throw new jav... | org . junit . Assert . assertNotNull ( voOrganization ) |
testNowiki ( ) { java . lang . String content = "previous<sp>line\n<pre>\nmonospace\nsecond<sp>line\n</pre>\nnext<sp>line" ; java . lang . String expected = "previous<sp>line\n{{{\nmonospace\nsecond<sp>line\n}}}\nnext<sp>line" ; java . lang . String actual = _translate ( content ) ; "<AssertPlaceHolder>" ; } _translate... | org . junit . Assert . assertEquals ( expected , actual ) |
useExistingTsLintOutput_returnsTrueIfPathSet ( ) { com . pablissimo . sonar . TsLintExecutorConfig config = getNewConfig ( ) ; config . setPathToTsLintOutput ( "/path/to/tslint/json/output" ) ; "<AssertPlaceHolder>" ; } useExistingTsLintOutput ( ) { return ( ( this . pathToTsLintOutput ) != null ) && ( ! ( this . pathT... | org . junit . Assert . assertTrue ( config . useExistingTsLintOutput ( ) ) |
shouldAcceptWhenOnlyConditionIsSet ( ) { node . setWeight ( null ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( node , org . openstack . atlas . api . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultLi... | org . junit . Assert . assertTrue ( result . passedValidation ( ) ) |
testBuildWithParameters ( ) { java . lang . String name = "name" ; java . lang . String abbrName = "abbr<sp>name" ; org . lnu . is . domain . studyplan . cycle . StudyPlanCycle context = new org . lnu . is . domain . studyplan . cycle . StudyPlanCycle ( ) ; context . setAbbrName ( abbrName ) ; context . setName ( name ... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
toLittleEndianToStream ( ) { java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; toLittleEndian ( bos , ( ( 2 + ( 3 * 256 ) ) + ( ( 4 * 256 ) * 256 ) ) , 3 ) ; bos . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { final org . apache . commons . compress . utils . BitInputStream inShado... | org . junit . Assert . assertArrayEquals ( new byte [ ] { 2 , 3 , 4 } , bos . toByteArray ( ) ) |
testMetricMissingName ( ) { java . util . Set < java . lang . String > errors = validate ( "monitoring/service_missingMetricName.mdl" ) ; "<AssertPlaceHolder>" ; } validate ( T ) { return com . google . common . collect . Sets . newHashSet ( ) ; } | org . junit . Assert . assertEquals ( 1 , errors . size ( ) ) |
testGetVersionFromInstallDirectory ( ) { System . out . println ( "getVersionFromInstallDirectory" ) ; java . io . File glassfishDir = null ; int expResult = - 1 ; int result = org . netbeans . modules . glassfish . common . ServerDetails . getVersionFromInstallDirectory ( glassfishDir ) ; "<AssertPlaceHolder>" ; } get... | org . junit . Assert . assertEquals ( expResult , result ) |
getAsObject_noLineBreak ( ) { java . lang . String value = "abc" ; java . lang . String expected = "abc" ; java . lang . String actual = ( ( java . lang . String ) ( converter . getAsObject ( context , component , value ) ) ) ; "<AssertPlaceHolder>" ; } getAsObject ( javax . faces . context . FacesContext , javax . fac... | org . junit . Assert . assertEquals ( expected , actual ) |
testSelectAndRespondItem1ThenAgain ( ) { testSessionController . enterTest ( testEntryTimestamp ) ; testSessionController . enterNextAvailableTestPart ( testPartEntryTimestamp ) ; testSessionController . selectItemNonlinear ( operationTimestamp , getTestNodeKey ( "i1" ) ) ; "<AssertPlaceHolder>" ; handleChoiceResponse ... | org . junit . Assert . assertFalse ( testSessionController . maySubmitResponsesToCurrentItem ( ) ) |
testValidTransitive ( ) { com . github . anno4j . Anno4j anno4j = new com . github . anno4j . Anno4j ( ) ; com . github . anno4j . ValidatedTransaction transaction = anno4j . createValidatedTransaction ( ) ; transaction . begin ( ) ; com . github . anno4j . transaction . ValidatedTransactionTest . SpecialTestResource r... | org . junit . Assert . assertFalse ( exceptionThrown ) |
isEvictionRequired_equals ( ) { com . ibm . ws . security . authentication . internal . cache . Cache cache = new com . ibm . ws . security . authentication . internal . cache . Cache ( 10 , 2 , 0 ) ; cache . insert ( "1" , 1 ) ; cache . insert ( "2" , 2 ) ; "<AssertPlaceHolder>" ; } isEvictionRequired ( ) { boolean ev... | org . junit . Assert . assertFalse ( cache . isEvictionRequired ( ) ) |
testProcessActivityFeedBefore ( ) { org . joda . time . DateTime now = new org . joda . time . DateTime ( java . lang . System . currentTimeMillis ( ) ) ; com . google . api . services . youtube . YouTube youtube = buildYouTube ( 5 , 0 , 0 , now , now ) ; java . util . concurrent . BlockingQueue < org . apache . stream... | org . junit . Assert . assertEquals ( collector . getDatumQueue ( ) . size ( ) , 0 ) |
whenSortingEntitiesByAge_thenCorrectlySorted ( ) { final java . util . List < com . baeldung . java8 . entity . Human > humans = com . google . common . collect . Lists . newArrayList ( new com . baeldung . java8 . entity . Human ( "Sarah" , 10 ) , new com . baeldung . java8 . entity . Human ( "Jack" , 12 ) ) ; humans ... | org . junit . Assert . assertThat ( humans . get ( 0 ) , org . hamcrest . Matchers . equalTo ( new com . baeldung . java8 . entity . Human ( "Sarah" , 10 ) ) ) |
acceptSecondFailOk ( ) { java . lang . String script = "#<sp>Accept<sp>script\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "#comment<sp>#5\n" 1 + "\t#comment<sp>#1\n" ) + "accepted\n" ) + "#comment<sp>#5\n" 0 ) + "#comment<sp>#5\n" 2 ) + "#comment<sp>#3\n" ) + "close\n" ) + "#comment<sp>#4\n" ) + "closed\n" ) + "#comment<sp>... | org . junit . Assert . assertEquals ( expectedScript , observedScript ) |
testVerifyWhenUpdatingRole ( ) { com . liferay . portal . kernel . model . Role role = com . liferay . portal . security . membership . policy . test . util . MembershipPolicyTestUtil . addRole ( RoleConstants . TYPE_ORGANIZATION ) ; com . liferay . portal . kernel . service . RoleServiceUtil . updateRole ( role . getR... | org . junit . Assert . assertTrue ( isVerify ( ) ) |
testCompareTo2 ( ) { org . netbeans . modules . gradle . actions . DefaultActionMapping instance1 = new org . netbeans . modules . gradle . actions . DefaultActionMapping ( "run" ) ; org . netbeans . modules . gradle . actions . DefaultActionMapping instance2 = new org . netbeans . modules . gradle . actions . DefaultA... | org . junit . Assert . assertTrue ( ( result < 0 ) ) |
testGetImplementationTitle ( ) { org . openscience . cdk . reaction . ReactionSpecification spec = new org . openscience . cdk . reaction . ReactionSpecification ( org . openscience . cdk . reaction . ReactionSpecificationTest . REAC_REF , org . openscience . cdk . reaction . ReactionSpecificationTest . REAC_IMPL_TITLE... | org . junit . Assert . assertEquals ( org . openscience . cdk . reaction . ReactionSpecificationTest . REAC_IMPL_TITLE , spec . getImplementationTitle ( ) ) |
firstTest ( ) { com . microsoft . azure . management . containerservice . v2017_07_01 . ContainerServiceTest . rgName = com . microsoft . azure . arm . utils . SdkContext . randomResourceName ( "rg" , 20 ) ; com . microsoft . azure . management . resources . ResourceGroup group = com . microsoft . azure . management . ... | org . junit . Assert . assertNotNull ( group ) |
testSubColumnVector ( ) { org . nd4j . linalg . api . ndarray . INDArray vec = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 18 , 18 ) ; org . nd4j . linalg . api . ndarray . INDArray matrix = vec . dup ( ) . reshape ( 3 , 6 ) ; org . nd4j . linalg . api . ndarray . INDArray vector = org . nd4j . linalg . facto... | org . junit . Assert . assertEquals ( assertion , test ) |
testThatPrintingDoesntThrowExceptions ( ) { pm . currentTransaction ( ) . commit ( ) ; pm . currentTransaction ( ) . begin ( ) ; org . zoodb . internal . ZooClassDef def = getDef ( org . zoodb . test . jdo . TestClass . class ) ; org . zoodb . internal . query . QueryParser qp = new org . zoodb . internal . query . Que... | org . junit . Assert . assertNotNull ( qtn . print ( ) ) |
strNumEncryption ( ) { java . lang . String salt = pe . generateSalt ( ) ; java . lang . String encryptedPassword = pe . getEncryptedPassword ( "abc123" , salt ) ; "<AssertPlaceHolder>" ; } authenticate ( java . lang . String , java . lang . String , java . lang . String ) { java . lang . String encryptedAttemptedPassw... | org . junit . Assert . assertTrue ( pe . authenticate ( "abc123" , encryptedPassword , salt ) ) |
max_value_hashmap_java8 ( ) { java . util . Comparator < ? super java . util . Map . Entry < java . lang . Integer , java . lang . Integer > > maxValueComparator = ( entry1 , entry2 ) -> entry1 . getValue ( ) . compareTo ( entry2 . getValue ( ) ) ; java . util . Optional < java . util . Map . Entry < java . lang . Inte... | org . junit . Assert . assertEquals ( new java . lang . Integer ( 7 ) , maxValue . get ( ) . getValue ( ) ) |
builderInShouldSetReportFormat ( ) { com . autentia . tnt . report . ReportInfo . ReportInfoBuilder builder = new com . autentia . tnt . report . ReportInfo . ReportInfoBuilder ( ) ; builder . in ( ReportFormat . PDF ) ; com . autentia . tnt . report . ReportInfo result = builder . build ( ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertEquals ( ReportFormat . PDF , result . format ) |
testAcquiringAndReleasingUpgradeMutex ( ) { org . apache . phoenix . query . ConnectionQueryServices services = null ; try ( java . sql . Connection conn = getConnection ( false , null ) ) { services = conn . unwrap ( org . apache . phoenix . jdbc . PhoenixConnection . class ) . getQueryServices ( ) ; "<AssertPlaceHold... | org . junit . Assert . assertTrue ( ( ( org . apache . phoenix . query . ConnectionQueryServicesImpl ) ( services ) ) . acquireUpgradeMutex ( MetaDataProtocol . MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0 ) ) |
runTest ( ) { boolean result = checkNoError ( "Social_Blogs_Get_Blog" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testSplit_blank ( ) { java . util . List < java . lang . String > str = sut . split ( "" ) ; "<AssertPlaceHolder>" ; } split ( java . lang . String ) { if ( "" . equals ( value ) ) { return newArrayList ( ) ; } else { return newArrayList ( com . google . common . base . Splitter . on ( ",<sp>" ) . trimResults ( ) . spl... | org . junit . Assert . assertThat ( str , org . hamcrest . CoreMatchers . < java . util . List < java . lang . String > > equalTo ( com . google . common . collect . Lists . < java . lang . String > newArrayList ( ) ) ) |
testRemove ( ) { com . liferay . portal . tools . service . builder . test . model . LocalizedEntry newLocalizedEntry = addLocalizedEntry ( ) ; _persistence . remove ( newLocalizedEntry ) ; com . liferay . portal . tools . service . builder . test . model . LocalizedEntry existingLocalizedEntry = _persistence . fetchBy... | org . junit . Assert . assertNull ( existingLocalizedEntry ) |
testGetDLSNNotLessThanTxId ( ) { org . apache . distributedlog . DLSN dlsn = mock ( org . apache . distributedlog . DLSN . class ) ; when ( impl . getDLSNNotLessThanTxId ( anyLong ( ) ) ) . thenReturn ( java . util . concurrent . CompletableFuture . completedFuture ( dlsn ) ) ; "<AssertPlaceHolder>" ; verify ( impl , t... | org . junit . Assert . assertEquals ( dlsn , org . apache . distributedlog . util . FutureUtils . result ( manager . getDLSNNotLessThanTxId ( 1234L ) ) ) |
getStringValueWithoutDefaultValueTest ( ) { mockStorageRead ( org . uberfire . preferences . backend . PreferenceStoreImplTest . VALUE ) ; final java . lang . String value = preferenceStore . get ( org . uberfire . preferences . backend . PreferenceStoreImplTest . KEY ) ; "<AssertPlaceHolder>" ; } get ( java . net . UR... | org . junit . Assert . assertEquals ( org . uberfire . preferences . backend . PreferenceStoreImplTest . VALUE , value ) |
count ( ) { "<AssertPlaceHolder>" ; } count ( ) { org . junit . Assert . assertThat ( addressRepository . count ( ) , org . hamcrest . core . Is . is ( 11L ) ) ; } | org . junit . Assert . assertThat ( addressRepository . count ( ) , org . hamcrest . core . Is . is ( 11L ) ) |
isValid ( ) { javax . validation . Validator validator = javax . validation . Validation . buildDefaultValidatorFactory ( ) . getValidator ( ) ; org . greenbuttonalliance . espi . common . domain . ApplicationInformation applicationInformation = org . greenbuttonalliance . espi . common . test . EspiFactory . newApplic... | org . junit . Assert . assertTrue ( violations . isEmpty ( ) ) |
whenHavingTwoTypesWithTheSameId_theyShouldBeEqual ( ) { jsprit . core . problem . vehicle . VehicleTypeImpl type = VehicleTypeImpl . Builder . newInstance ( "type" ) . setCostPerTime ( 10 ) . build ( ) ; jsprit . core . problem . vehicle . VehicleTypeImpl type2 = VehicleTypeImpl . Builder . newInstance ( "type" ) . set... | org . junit . Assert . assertTrue ( type . equals ( type2 ) ) |
testHasSixteenColumnWidth ( ) { com . eclipsesource . tabris . passepartout . FluidGridConfiguration configuration = new com . eclipsesource . tabris . passepartout . FluidGridConfiguration ( LayoutMode . AUTO , 100 , 200 ) ; int sixteenColumnWidth = configuration . getSixteenColumnWidth ( ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertEquals ( sixteenColumnWidth , 200 ) |
validate_shouldPassValidationIfFieldLengthsAreCorrect ( ) { org . openmrs . ConceptDatatype cd = new org . openmrs . ConceptDatatype ( ) ; cd . setName ( "name" ) ; cd . setDescription ( "some<sp>text" ) ; cd . setHl7Abbreviation ( "hl7" ) ; cd . setRetireReason ( "retireReason" ) ; org . springframework . validation .... | org . junit . Assert . assertFalse ( errors . hasErrors ( ) ) |
testApplyWithNull2 ( ) { com . liferay . dynamic . data . mapping . form . evaluator . internal . function . ContainsFunction containsFunction = new com . liferay . dynamic . data . mapping . form . evaluator . internal . function . ContainsFunction ( ) ; java . lang . Boolean result = containsFunction . apply ( "lifer... | org . junit . Assert . assertFalse ( result ) |
compareTo_shouldReturnPositiveOrNegativeIfTwoStatesHaveTheSameStartDatesEndDatesAndUuids ( ) { uuid1 = "some<sp>uuid<sp>1" ; uuid2 = "some<sp>uuid<sp>2" ; org . openmrs . PatientState patientState = new org . openmrs . PatientState ( ) ; patientState . setStartDate ( leftRange ) ; patientState . setEndDate ( rightRange... | org . junit . Assert . assertTrue ( ( ( result <= ( - 1 ) ) || ( result >= 1 ) ) ) |
given_that_no_all_view_exists_when_calling_getAll_then_get_allIds_should_be_used ( ) { org . ektorp . support . List < java . lang . String > allIds = new org . ektorp . support . ArrayList < java . lang . String > ( ) ; allIds . add ( "id1" ) ; allIds . add ( "id2" ) ; allIds . add ( "id3" ) ; allIds . add ( "_design/... | org . junit . Assert . assertEquals ( 3 , all . size ( ) ) |
setsAlbumOnV1TagOnly ( ) { com . mpatric . mp3agic . ID3v1 id3v1Tag = new com . mpatric . mp3agic . ID3WrapperTest . ID3v1TagForTesting ( ) ; com . mpatric . mp3agic . ID3Wrapper wrapper = new com . mpatric . mp3agic . ID3Wrapper ( id3v1Tag , null ) ; wrapper . setAlbum ( "an<sp>album" ) ; "<AssertPlaceHolder>" ; } get... | org . junit . Assert . assertEquals ( "an<sp>album" , id3v1Tag . getAlbum ( ) ) |
checkGetChainDescriptionMethod ( ) { info . smart_tools . smartactors . message_processing_interfaces . message_processing . IMessageReceiver [ ] receivers = new info . smart_tools . smartactors . message_processing_interfaces . message_processing . IMessageReceiver [ 0 ] ; info . smart_tools . smartactors . iobject . ... | org . junit . Assert . assertSame ( description , chain . getChainDescription ( ) ) |
simplifySkipFalse ( ) { org . batfish . datamodel . routing_policy . expr . Disjunction manyFalse = new org . batfish . datamodel . routing_policy . expr . Disjunction ( com . google . common . collect . ImmutableList . of ( org . batfish . datamodel . routing_policy . expr . BooleanExprs . FALSE , org . batfish . data... | org . junit . Assert . assertThat ( manyFalse . simplify ( ) , org . hamcrest . Matchers . is ( org . batfish . datamodel . routing_policy . expr . BooleanExprs . CALL_EXPR_CONTEXT ) ) |
failedInfoPlistParsingReturnsAbsent ( ) { java . util . Optional < java . lang . String > bundleID ; try ( java . io . InputStream in = getClass ( ) . getResourceAsStream ( "testdata/ios-project/version.plist" ) ) { com . google . common . base . Preconditions . checkState ( ( in != null ) ) ; bundleID = com . facebook... | org . junit . Assert . assertThat ( bundleID , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( java . util . Optional . empty ( ) ) ) ) |
shouldReturnExistingEditRelationIfTheyHaveDifferentIdentifiers ( ) { ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditRelation existingEditRelation = new ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditRelation ( null , null , "Test" , null , null , null , null , null ... | org . junit . Assert . assertThat ( replaced , org . hamcrest . CoreMatchers . is ( existingEditRelation ) ) |
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . employee . Employee context = new org . lnu . is . domain . employee . Employee ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>Employee<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . ln... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
outInjectionsSynchronousCompleteCalled ( ) { final org . jboss . msc . service . StabilityMonitor sm = new org . jboss . msc . service . StabilityMonitor ( ) ; org . jboss . msc . service . MSC163TestCase . DependentService dependentService = new org . jboss . msc . service . MSC163TestCase . DependentService ( ) ; sm ... | org . junit . Assert . assertTrue ( ( ( dependentService . getValue ( ) ) != null ) ) |
one_$parent_array_query_projection_with_match_projection ( ) { com . redhat . lightblue . query . Projection p = com . redhat . lightblue . eval . EvalTestContext . projectionFromJson ( "{'field':'field6.$parent.field7','match':{'field':'elemf3','op':'>','rvalue':4},'projection':{'field':'*'}}" ) ; com . redhat . light... | org . junit . Assert . assertEquals ( expectedNode . toString ( ) , pdoc . toString ( ) ) |
testSerPredict ( ) { double [ ] [ ] longley = new double [ ] [ ] { new double [ ] { 234.289 , 235.6 , 159.0 , 107.608 , 1947 , 60.323 } , new double [ ] { 259.426 , 232.5 , 145.6 , 108.632 , 1948 , 61.122 } , new double [ ] { 258.054 , 368.2 , 161.6 , 109.773 , 1949 , 60.171 } , new double [ ] { 284.599 , 335.1 , 165.0... | org . junit . Assert . assertEquals ( expected , actual , 0.0 ) |
testDecoder ( ) { software . amazon . eventstream . TestUtils utils = new software . amazon . eventstream . TestUtils ( SEED ) ; java . util . Random rand = new java . util . Random ( SEED ) ; java . util . List < software . amazon . eventstream . Message > expected = java . util . stream . IntStream . range ( 0 , 1000... | org . junit . Assert . assertEquals ( expected , actual ) |
testIsEmptyAfterRemoval ( ) { com . sun . sgs . test . app . util . TestScalableDeque . txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) throws com . sun . sgs . test . app . util . Exception { com . sun . sgs . app . util . ScalableDeque < java . lang . ... | org . junit . Assert . assertTrue ( d . isEmpty ( ) ) |
testToJSONWithOnlyIfDefault ( ) { org . apache . metron . common . configuration . profiler . ProfileConfig expected = org . apache . metron . common . configuration . profiler . ProfileConfig . fromJSON ( onlyIfDefault ) ; java . lang . String asJson = expected . toJSON ( ) ; org . apache . metron . common . configura... | org . junit . Assert . assertEquals ( expected , actual ) |
testEmptyChannelResultsInStatusBackoff ( ) { org . apache . flume . sink . hdfs . TestHDFSEventSink . LOG . debug ( "Starting..." ) ; org . apache . flume . Context context = new org . apache . flume . Context ( ) ; org . apache . flume . Channel channel = new org . apache . flume . channel . MemoryChannel ( ) ; contex... | org . junit . Assert . assertEquals ( Status . BACKOFF , sink . process ( ) ) |
testDLExportableRepositoryPublisherIsInvokedWhenPreparingSummary ( ) { java . util . concurrent . atomic . AtomicInteger atomicInteger = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; _registerService ( new com . liferay . document . library . web . exportimport . data . handler . test . DLPortletDataHan... | org . junit . Assert . assertTrue ( ( ( atomicInteger . get ( ) ) >= 1 ) ) |
testUniquifyOrderingRepeatedCaseSensitive ( ) { java . util . List < java . lang . String > nameList = com . google . common . collect . Lists . newArrayList ( "k68s" , "def" , "col1" , "COL1" , "def" , "123" ) ; java . util . List < java . lang . String > resultList = org . apache . calcite . sql . validate . SqlValid... | org . junit . Assert . assertThat ( nameList , org . hamcrest . CoreMatchers . not ( resultList ) ) |
testSetResultOptionsEmptyEntryGroup20 ( ) { nl . surfnet . coin . api . client . domain . AbstractEntry entry = getAbstractEntryGroup20 ( 22 ) ; controller . setResultOptions ( entry , 3 , 20 , "title" ) ; "<AssertPlaceHolder>" ; } getEntryCollection ( ) { java . util . ArrayList < nl . surfnet . coin . api . client . ... | org . junit . Assert . assertEquals ( 2 , entry . getEntryCollection ( ) . size ( ) ) |
testKeepGuestbook ( ) { edu . harvard . iq . dataverse . engine . command . DataverseRequest aRequest = new edu . harvard . iq . dataverse . engine . command . DataverseRequest ( auth , httpRequest ) ; testEngine . submit ( new edu . harvard . iq . dataverse . engine . command . impl . MoveDatasetCommand ( aRequest , m... | org . junit . Assert . assertNotNull ( moved . getGuestbook ( ) ) |
shouldBuildDefaultClassPath ( ) { com . threerings . getdown . data . ClassPath classPath = com . threerings . getdown . data . PathBuilder . buildDefaultClassPath ( _application ) ; java . lang . String expectedClassPath = ( ( _firstJarFile . getAbsolutePath ( ) ) + ( java . io . File . pathSeparator ) ) + ( _secondJa... | org . junit . Assert . assertEquals ( expectedClassPath , classPath . asArgumentString ( ) ) |
checkMessageMethod ( ) { java . lang . String str = "test" ; info . smart_tools . smartactors . base . pool_guard . exception . PoolGuardException exception = new info . smart_tools . smartactors . base . pool_guard . exception . PoolGuardException ( str ) ; "<AssertPlaceHolder>" ; throw exception ; } getMessage ( ) { ... | org . junit . Assert . assertEquals ( exception . getMessage ( ) , str ) |
whenIsNot ( ) { final java . lang . String actual = org . estatio . dnplugins . EstatioIdentifierFactory . stripOidSuffixIfPresent ( "ABC_ID_FOO" ) ; "<AssertPlaceHolder>" ; } stripOidSuffixIfPresent ( java . lang . String ) { if ( columnIdentifierSuffix . endsWith ( "_OID" ) ) { return columnIdentifierSuffix . substri... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( "ABC_ID_FOO" ) ) |
testGetFields ( ) { uk . ac . ebi . ep . ebeye . model . Fields result = instance . getFields ( ) ; "<AssertPlaceHolder>" ; } getFields ( ) { return fields ; } | org . junit . Assert . assertNotNull ( result ) |
constraintMatchTotalsNeverNull ( ) { org . optaplanner . core . impl . score . director . incremental . IncrementalScoreDirector < java . lang . Object > director = new org . optaplanner . core . impl . score . director . incremental . IncrementalScoreDirector ( mockIncrementalScoreDirectorFactory ( ) , false , true , ... | org . junit . Assert . assertNotNull ( director . getConstraintMatchTotals ( ) ) |
testUnknownSpdyWindowUpdateFrameFlags ( ) { short type = 9 ; byte flags = ( ( byte ) ( 255 ) ) ; int length = 8 ; int streamId = ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RANDOM . nextInt ( ) ) & 2147483647 ; int deltaWindowSize = ( ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RAN... | org . junit . Assert . assertFalse ( buf . isReadable ( ) ) |
testPack3fInput ( ) { final float [ ] [ ] [ ] data = new float [ slices ] [ rows ] [ columns ] ; java . lang . String msg = ( java . lang . String . format ( org . jtransforms . fft . RealFFTUtils_3DTest . DEFAULT_MESSAGE , numThreads , slices , rows , columns ) ) + "[%d][%d][%d]" ; for ( int s = 0 ; s < ( slices ) ; s... | org . junit . Assert . assertEquals ( java . lang . String . format ( msg , s , r , c ) , expected , actual , 0.0 ) |
should_return_true_on_validateArchetypeCatalog_for_valid_xml_file_within_jar ( ) { boolean valid = de . dm . intellij . maven . model . ArchetypeCatalogFactoryUtil . validateArchetypeCatalog ( de . dm . intellij . maven . model . AnArchetypeCatalogFactoryUtil . XML_INSIDE_JAR ) ; "<AssertPlaceHolder>" ; } validateArche... | org . junit . Assert . assertThat ( valid , org . hamcrest . CoreMatchers . equalTo ( true ) ) |
testIndexOfInputStreamByteArray ( ) { com . google . common . io . ByteSource bs = com . google . common . io . ByteSource . wrap ( de . nx42 . maps4cim . util . math . KMPMatchTest . data ) ; java . io . InputStream is = bs . openBufferedStream ( ) ; int actual = de . nx42 . maps4cim . util . math . KMPMatch . indexOf... | org . junit . Assert . assertEquals ( de . nx42 . maps4cim . util . math . KMPMatchTest . expected , actual ) |
testANTLRExpandParts ( ) { org . drools . compiler . lang . dsl . DSLTokenizedMappingFile file = new org . drools . compiler . lang . dsl . DSLTokenizedMappingFile ( ) ; java . lang . String dsl = ( "[when]foo=Foo()" + ( org . drools . compiler . lang . dsl . DefaultExpanderTest . NL ) ) + "[then]bar<sp>{num}=baz({num}... | org . junit . Assert . assertEquals ( 0 , file . getErrors ( ) . size ( ) ) |
testDeleteCgroup ( ) { final org . apache . hadoop . yarn . util . ControlledClock clock = new org . apache . hadoop . yarn . util . ControlledClock ( ) ; org . apache . hadoop . yarn . server . nodemanager . util . CgroupsLCEResourcesHandler handler = new org . apache . hadoop . yarn . server . nodemanager . util . Cg... | org . junit . Assert . assertFalse ( handler . deleteCgroup ( org . apache . hadoop . yarn . server . nodemanager . util . TestCgroupsLCEResourcesHandler . cgroupDir . getAbsolutePath ( ) ) ) |
testChunkMightContainQueryValues4 ( ) { io . datakernel . aggregation . PrimaryKey minQueryKey = io . datakernel . aggregation . PrimaryKey . ofArray ( 3 , 5 , 80 , 90 ) ; io . datakernel . aggregation . PrimaryKey maxQueryKey = io . datakernel . aggregation . PrimaryKey . ofArray ( 3 , 5 , 80 , 90 ) ; io . datakernel ... | org . junit . Assert . assertTrue ( io . datakernel . aggregation . AggregationState . chunkMightContainQueryValues ( minQueryKey , maxQueryKey , minChunkKey , maxChunkKey ) ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . UserGroupGroupRole . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( ... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
matchesMatchingRegexKeysAndValuesWithExtraValues ( ) { matcher . withEntry ( "f.*1" , ".*1" ) ; matcher . withEntry ( "f.*2" , ".*2" ) ; org . mockserver . matchers . MultiValueMapMatcher mapMatcher = new org . mockserver . matchers . MultiValueMapMatcher ( new org . mockserver . logging . MockServerLogger ( ) , matche... | org . junit . Assert . assertTrue ( mapMatcher . matches ( null , matched ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.