input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testCallBatchTasksAutoCommitTrue ( ) { com . j256 . ormlite . table . TableInfo < com . j256 . ormlite . stmt . Foo , java . lang . String > tableInfo = new com . j256 . ormlite . table . TableInfo < com . j256 . ormlite . stmt . Foo , java . lang . String > ( databaseType , com . j256 . ormlite . stmt . Foo . class ) ... | org . junit . Assert . assertTrue ( called . get ( ) ) |
hasAssociatedControls ( ) { java . lang . String html = "<form<sp>id=1><button<sp>id=1><fieldset<sp>id=2<sp>/><input<sp>id=3><keygen<sp>id=4><object<sp>id=5><output<sp>id=6>" + "<select<sp>id=7><option></select><textarea<sp>id=8><p<sp>id=9>" ; leap . lang . jsoup . nodes . Document doc = leap . lang . jsoup . Jsoup . p... | org . junit . Assert . assertEquals ( 8 , form . elements ( ) . size ( ) ) |
get_last_element_in_iterable ( ) { java . util . List < java . lang . String > strings = com . google . common . collect . Lists . newArrayList ( "one" , "two" , "three" ) ; java . lang . String firstElement = com . google . common . collect . Iterables . getLast ( strings , null ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "three" , firstElement ) |
setKeyboardShortcut ( ) { java . lang . Object acceleratorKey = redoAction . getValue ( Action . ACCELERATOR_KEY ) ; pipe . actions . edit . KeyStroke stroke = pipe . actions . edit . KeyStroke . getKeyStroke ( KeyEvent . VK_Y , java . awt . Toolkit . getDefaultToolkit ( ) . getMenuShortcutKeyMask ( ) ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( stroke , acceleratorKey ) |
test_getBuildKey ( ) { java . lang . String key = "someKey" ; java . io . PrintStream logger = mock ( java . io . PrintStream . class ) ; when ( buildListener . getLogger ( ) ) . thenReturn ( logger ) ; org . powermock . api . mockito . PowerMockito . mockStatic ( org . jenkinsci . plugins . tokenmacro . TokenMacro . c... | org . junit . Assert . assertThat ( buildKey , org . hamcrest . CoreMatchers . is ( key ) ) |
testMessageCount ( ) { java . lang . String topicName = "myTopic" ; java . lang . String groupId = "groupId" ; io . github . tcdl . msb . adapters . amqp . AmqpConsumerAdapter adapter = createAdapterWithNonDurableConf ( topicName , groupId , false ) ; when ( mockChannel . messageCount ( anyString ( ) ) ) . thenReturn (... | org . junit . Assert . assertEquals ( answer , result ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = ne... | org . junit . Assert . assertTrue ( ddmFormInstanceRecords . isEmpty ( ) ) |
testEncodeWithFunc2 ( ) { java . lang . String toEncode = "ò" + "123" ; "2" "3" check digit 56 java . lang . String expected = ( ( ( ( ( ( ( ( com . google . zxing . oned . Code128WriterTestCase . QUIET_SPACE ) + ( com . google . zxing . oned . Code128WriterTestCase . START_CODE_B ) ) + ( com . google . zxing . oned . ... | org . junit . Assert . assertEquals ( expected , actual ) |
testExcludeTableIncludeColumns ( ) { java . util . List < com . zendesk . maxwell . row . RowMap > list ; com . zendesk . maxwell . filtering . Filter filter = new com . zendesk . maxwell . filtering . Filter ( ) ; filter . addRule ( "exclude:<sp>foo.bars,<sp>include:<sp>foo.bars.something=accept" ) ; list = getRowsFor... | org . junit . Assert . assertThat ( list . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
whenGettingConceptById_ReturnTheConcept ( ) { grakn . core . concept . type . EntityType entityType = tx . putEntityType ( "test-name" ) ; "<AssertPlaceHolder>" ; } getConcept ( grakn . core . concept . ConceptId ) { return operateOnOpenGraph ( ( ) -> { if ( transactionCache . isConceptCached ( id ) ) { return transact... | org . junit . Assert . assertEquals ( entityType , tx . getConcept ( entityType . id ( ) ) ) |
testGetAttribute_Override ( ) { java . lang . String actual = eTable . getHEAD ( ) ; java . lang . String expected = "exthd" ; "<AssertPlaceHolder>" ; } getHEAD ( ) { return "hd" ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testDeleteAccessConfig ( ) { initializeExpectedInstance ( 2 ) ; expect ( compute . getOptions ( ) ) . andReturn ( mockOptions ) ; com . google . cloud . compute . deprecated . Operation operation = new com . google . cloud . compute . deprecated . Operation . Builder ( serviceMockReturnsOptions ) . setOperationId ( com... | org . junit . Assert . assertSame ( operation , instance . deleteAccessConfig ( "nic0" , "NAT" ) ) |
testJoinNoMatch ( ) { com . huawei . streaming . common . Pair < com . huawei . streaming . event . IEvent [ ] [ ] , com . huawei . streaming . event . IEvent [ ] [ ] > prepare1 = com . huawei . streaming . process . join . SupportDataPrepare . dataPrepare ( SupportConst . I_TWO , SupportConst . I_THREE ) ; com . huawe... | org . junit . Assert . assertEquals ( 0L , ( ( long ) ( result . getFirst ( ) . size ( ) ) ) ) |
givenAFieldWithoutGetter_whenCreatingAGetter_thenCorrectlyInvoked ( ) { java . lang . invoke . MethodHandles . Lookup lookup = java . lang . invoke . MethodHandles . lookup ( ) ; java . lang . invoke . MethodHandle getTitleMH = lookup . findGetter ( com . baeldung . java9 . methodhandles . Book . class , "title" , java... | org . junit . Assert . assertEquals ( "Effective<sp>Java" , getTitleMH . invoke ( book ) ) |
userNameValidDollarSign ( ) { org . apache . hadoop . hdfs . web . resources . UserParam userParam = new org . apache . hadoop . hdfs . web . resources . UserParam ( "a$" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertNotNull ( userParam . getValue ( ) ) |
hasColumnDefinitionsWithAttributeColumn ( ) { final org . drools . workbench . models . guided . dtable . shared . model . AttributeCol52 attribute = new org . drools . workbench . models . guided . dtable . shared . model . AttributeCol52 ( ) ; attribute . setAttribute ( "attribute" ) ; dtPresenter . getModel ( ) . ge... | org . junit . Assert . assertTrue ( dtPresenter . hasColumnDefinitions ( ) ) |
testConverteerBijhoudingVerhuizingNaOpschorting ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3InschrijvingInhoud > lo3InschrijvingStapel = buildInschrijving ( Lo3RedenOpschortingBijhoudingCodeEnum . FOUT , new nl . bzk . migr... | org . junit . Assert . assertEquals ( 4 , migratieBijhoudingStapel . size ( ) ) |
shouldNotReceiveDuplicateMessages ( ) { final java . io . File location = net . openhft . chronicle . queue . impl . single . DirectoryUtils . tempDir ( net . openhft . chronicle . queue . impl . single . DuplicateMessageReadTest . class . getSimpleName ( ) ) ; final net . openhft . chronicle . queue . impl . single . ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
eatPealed ( ) { org . mule . tck . testmodels . fruit . Banana banana = ( ( org . mule . tck . testmodels . fruit . Banana ) ( flowRunner ( "eatPealedBanana" ) . run ( ) . getMessage ( ) . getPayload ( ) . getValue ( ) ) ) ; "<AssertPlaceHolder>" ; } isBitten ( ) { return bitten ; } | org . junit . Assert . assertThat ( banana . isBitten ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testGetXResourceFile ( ) { java . io . File file = new java . io . File ( "testGetXResource" ) ; javax . ws . rs . core . Response expectedResponse = javax . ws . rs . core . Response . ok ( file , MediaType . APPLICATION_OCTET_STREAM ) . header ( "Content-Disposition" , ( "attachment;filename=" + ( file . getName ( ) ... | org . junit . Assert . assertEquals ( expectedResponse . getStatus ( ) , reponse . getStatus ( ) ) |
testFacetOrigin ( ) { test . org . jboss . forge . addon . facets . factory . MockFaceted faceted = new test . org . jboss . forge . addon . facets . factory . MockFaceted ( ) ; test . org . jboss . forge . addon . facets . factory . MockFacet facet = facetFactory . create ( faceted , test . org . jboss . forge . addon... | org . junit . Assert . assertEquals ( faceted , facet . getFaceted ( ) ) |
testGetID ( ) { com . aliyun . odps . Table a = odps . tables ( ) . get ( com . aliyun . odps . TableTest . TABLE_NAME ) ; "<AssertPlaceHolder>" ; } getTableID ( ) { if ( ( model . ID ) == null ) { lazyLoad ( ) ; } return model . ID ; } | org . junit . Assert . assertNotNull ( a . getTableID ( ) ) |
testReadChunked ( ) { com . predic8 . membrane . core . http . RequestTest . reqChunked . read ( inChunked , true ) ; "<AssertPlaceHolder>" ; } getBodyAsStream ( ) { try { return body . getContentAsStream ( ) ; } catch ( java . io . IOException e ) { com . predic8 . membrane . core . http . Message . log . error ( "Cou... | org . junit . Assert . assertNotNull ( com . predic8 . membrane . core . http . RequestTest . reqChunked . getBodyAsStream ( ) ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . document . library . kernel . model . DLFileEntry . class , _dynamicQueryClassLoader ) ; dynamicQuery . a... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
instanciateShouldDelegateToComponentFactory ( ) { mockStatic ( org . codegist . crest . util . ComponentFactory . class ) ; when ( org . codegist . crest . util . ComponentFactory . instantiate ( java . lang . String . class , mockCRestConfig ) ) . thenReturn ( "a" ) ; java . lang . String actual = toTest . instantiate... | org . junit . Assert . assertEquals ( "a" , actual ) |
testAgentStatus ( ) { agentControllerServerDaemon . shutdown ( ) ; agentControllerServerDaemon = new net . grinder . AgentControllerServerDaemon ( agentControllerServerDaemon . getPort ( ) ) ; agentControllerServerDaemon . start ( ) ; sleep ( 3000 ) ; allAvailableAgents = agentControllerServerDaemon . getAllAvailableAg... | org . junit . Assert . assertThat ( allAvailableAgents . size ( ) , org . hamcrest . Matchers . is ( 2 ) ) |
testId ( ) { com . bazaarvoice . ostrich . ServiceEndPoint endPoint = new com . bazaarvoice . ostrich . ServiceEndPointBuilder ( ) . withServiceName ( "service" ) . withId ( "id" ) . build ( ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertEquals ( "id" , endPoint . getId ( ) ) |
testGetNodeAsSource ( ) { java . io . InputStream is = new java . io . ByteArrayInputStream ( "<foo><bar/></foo>" . getBytes ( ) ) ; org . apache . cxf . jaxrs . ext . xml . XMLSource xp = new org . apache . cxf . jaxrs . ext . xml . XMLSource ( is ) ; xp . setBuffering ( ) ; javax . xml . transform . Source element = ... | org . junit . Assert . assertNotNull ( element ) |
getPersonAddress_shouldGetVoidedPersonAddressIfPersonIsVoidedAndNotvoidedAddressDoesNotExist ( ) { org . openmrs . PersonAddress voidedAddress1 = org . openmrs . PersonTest . PersonAddressBuilder . newBuilder ( ) . withVoided ( true ) . build ( ) ; org . openmrs . PersonAddress voidedAddress2 = org . openmrs . PersonTe... | org . junit . Assert . assertTrue ( actualPersonAddress . getVoided ( ) ) |
testAddPortPresent ( ) { java . lang . String normalized = org . apache . ambari . view . utils . hdfs . ConfigurationBuilder . addPortIfMissing ( "webhdfs://namenode.example.com:50070" ) ; "<AssertPlaceHolder>" ; } addPortIfMissing ( java . lang . String ) { if ( ! ( org . apache . ambari . view . utils . hdfs . Confi... | org . junit . Assert . assertEquals ( normalized , "webhdfs://namenode.example.com:50070" ) |
createsProducerForTypeThatHasStringValueOfMethod ( ) { org . everrest . core . method . TypeProducer typeProducer = typeProducerFactory . createTypeProducer ( org . everrest . core . impl . method . TypeProducerFactoryTest . ValueOfStringClass . class , null ) ; "<AssertPlaceHolder>" ; } createTypeProducer ( java . lan... | org . junit . Assert . assertEquals ( org . everrest . core . impl . method . StringValueOfProducer . class , typeProducer . getClass ( ) ) |
testGetRowNumber ( ) { wd . open ( org . finra . jtaf . ewd . widget . element . html . TableTest . url ) ; org . finra . jtaf . ewd . widget . ITable table = new org . finra . jtaf . ewd . widget . element . html . Table ( tableLocator ) ; java . util . Map < java . lang . String , java . lang . String > map = new jav... | org . junit . Assert . assertEquals ( rowNumber , 1 ) |
testDetectTypeFromTextWithIrodsSpacey ( ) { org . irods . jargon . core . rule . RuleTypeEvaluator detector = new org . irods . jargon . core . rule . RuleTypeEvaluator ( ) ; java . lang . String ruleText = "#<sp>@RuleEngine=\"<sp>IRODS<sp>\"<sp>" ; org . irods . jargon . core . rule . IrodsRuleInvocationTypeEnum actua... | org . junit . Assert . assertEquals ( IrodsRuleInvocationTypeEnum . IRODS , actual ) |
noArgs ( ) { org . springframework . retry . annotation . RecoverAnnotationRecoveryHandlerTests . NoArgs target = new org . springframework . retry . annotation . RecoverAnnotationRecoveryHandlerTests . NoArgs ( ) ; org . springframework . retry . annotation . RecoverAnnotationRecoveryHandler < ? > handler = new org . ... | org . junit . Assert . assertEquals ( "Planned" , target . getCause ( ) . getMessage ( ) ) |
testDecodeMultiClass ( ) { java . util . List < java . lang . String > encoded = java . util . Arrays . asList ( opennlp . tools . namefind . BilouCodecTest . OTHER , opennlp . tools . namefind . BilouCodecTest . A_START , opennlp . tools . namefind . BilouCodecTest . A_CONTINUE , opennlp . tools . namefind . BilouCode... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
equalsTestRight2 ( ) { de . vksi . c4j . acceptancetest . point . ColoredPoint x = classUnderTest ; de . vksi . c4j . acceptancetest . point . Point y = new de . vksi . c4j . acceptancetest . point . Point ( x . getX ( ) , x . getY ( ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return set . equals ... | org . junit . Assert . assertFalse ( x . equals ( y ) ) |
testAggOverInlineView ( ) { java . lang . String sql = "SELECT<sp>SUM(x)<sp>FROM<sp>(SELECT<sp>(e2<sp>+<sp>1)<sp>AS<sp>x<sp>FROM<sp>pm1.g1)<sp>AS<sp>g" ; org . teiid . query . sql . lang . Command c = helpResolve ( sql ) ; "<AssertPlaceHolder>" ; verifyProjectedTypes ( c , new java . lang . Class [ ] { org . teiid . qu... | org . junit . Assert . assertEquals ( sql , c . toString ( ) ) |
checkScrolledPropertiesBlock ( ) { org . eclipse . ice . datastructures . form . MasterDetailsComponent masterDetailsComponent = new org . eclipse . ice . datastructures . form . MasterDetailsComponent ( ) ; org . eclipse . ice . client . widgets . ICEDetailsPageProvider pageProvider = new org . eclipse . ice . client ... | org . junit . Assert . assertTrue ( pageProvider . equals ( otherPageProvider ) ) |
notEarlierThan3 ( ) { org . apache . jackrabbit . oak . plugins . document . util . TimeInterval t = ti . notEarlierThan ( ( ( start ) - 1 ) ) ; "<AssertPlaceHolder>" ; } notEarlierThan ( long ) { if ( ( fromMs ) < timestampMs ) { return new org . apache . jackrabbit . oak . plugins . document . util . TimeInterval ( t... | org . junit . Assert . assertEquals ( t , ti ) |
testAliasNoValue ( ) { org . teiid . adminapi . impl . ModelMetaData mmd = new org . teiid . adminapi . impl . ModelMetaData ( ) ; mmd . setName ( "vw" ) ; mmd . addSourceMetadata ( "ddl" , ( "create<sp>view<sp>x<sp>(a<sp>string<sp>primary<sp>key,<sp>b<sp>integer)<sp>" + "as<sp>select<sp>'xyz',<sp>123<sp>union<sp>all<s... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
getPreparedOrderTest ( ) { final org . nohope . cassandra . mapservice . CMapSync map = mapService . getMap ( org . nohope . cassandra . mapservice . PreparedStatementsIT . RING_OF_POWER_TABLE ) ; final java . lang . String quote = org . nohope . cassandra . mapservice . QuoteTestGenerator . newQuote ( ) ; final org . ... | org . junit . Assert . assertEquals ( valueToPut , value ) |
shouldUseProvidedSalt ( ) { edu . stanford . bmir . protege . web . shared . auth . ChapSession session = factory . create ( salt ) ; "<AssertPlaceHolder>" ; } getSalt ( ) { return salt ; } | org . junit . Assert . assertThat ( session . getSalt ( ) , org . hamcrest . core . Is . is ( salt ) ) |
testGetServletContextName ( ) { expect ( servletContext . getServletContextName ( ) ) . andReturn ( "value" ) ; replay ( servletContext , config ) ; org . apache . tiles . web . util . ServletContextAdapter adapter = new org . apache . tiles . web . util . ServletContextAdapter ( config ) ; "<AssertPlaceHolder>" ; } ge... | org . junit . Assert . assertEquals ( "value" , adapter . getServletContextName ( ) ) |
testKeyGeneratorAndRawKey ( ) { this . interceptor . setKeyGenerator ( new org . springframework . retry . interceptor . MethodArgumentsKeyGenerator ( ) { @ org . springframework . retry . interceptor . Override public java . lang . Object getKey ( java . lang . Object [ ] item ) { return "bar" ; } } ) ; this . interce... | org . junit . Assert . assertEquals ( "bar" , captor . getValue ( ) . getKey ( ) ) |
deletePropertyDescriptorByOwnerIncludingPropertyValuesWhenDeletingOwnerIsOwnerOfDescriptorDefinedOnResourceTypeWithPropertiesOnResourceRelationShouldSucceed ( ) { ch . puzzle . itc . mobiliar . business . foreignable . entity . ForeignableOwner deletingOwner = ch . puzzle . itc . mobiliar . business . foreignable . ent... | org . junit . Assert . assertEquals ( deletingOwner , descriptor . getOwner ( ) ) |
computeFactor_TwoMonthsOfLeapYear ( ) { long startTimeUsage = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-02-01<sp>00:00:00" ) ; long endTimeUsage = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-03-01<sp>23:59:59" ) ; org . oscm . billingservice . service . model . BillingInput billi... | org . junit . Assert . assertEquals ( 1 , factor , 0 ) |
shouldReturnTrueGivenDocumentWithIdExists ( ) { java . lang . Integer documentId = org . apache . commons . lang . math . RandomUtils . nextInt ( ) ; org . springframework . data . elasticsearch . IntegerIDEntity sampleEntity = new org . springframework . data . elasticsearch . IntegerIDEntity ( ) ; sampleEntity . setI... | org . junit . Assert . assertEquals ( exist , true ) |
testCryptoAuth ( ) { byte [ ] challenge = new byte [ ] { - 69 , 107 , - 66 , 1 , 28 , - 57 , 84 , - 68 , - 26 , 25 , - 51 , 76 , - 62 , 107 , 117 , - 114 , - 60 , 15 , - 112 , 39 , - 97 , 2 , 54 , 111 , 15 , - 64 , 67 , - 41 , - 43 , 44 , - 44 , 107 } ; byte [ ] data = new byte [ 257 ] ; eu . abc4trust . smartcard . RS... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( data , extracted ) ) |
testValidationForDefaultValue ( ) { java . util . List < com . streamsets . pipeline . lib . jdbc . JdbcFieldColumnMapping > columnMappings = com . google . common . collect . ImmutableList . of ( new com . streamsets . pipeline . lib . jdbc . JdbcFieldColumnMapping ( "P_ID" , "[2]" , "100" , com . streamsets . pipelin... | org . junit . Assert . assertEquals ( 1 , issues . size ( ) ) |
testGetPrefix ( ) { final org . apache . commons . configuration2 . Configuration conf = new org . apache . commons . configuration2 . BaseConfiguration ( ) ; final org . apache . commons . configuration2 . SubsetConfiguration subset = new org . apache . commons . configuration2 . SubsetConfiguration ( conf , "prefix" ... | org . junit . Assert . assertEquals ( "prefix" , "prefix" , subset . getPrefix ( ) ) |
test_classify_nullClassifier3 ( ) { org . springframework . retry . RetryContext context = org . mockito . Mockito . mock ( org . springframework . retry . RetryContext . class ) ; org . fishwife . jrugged . spring . retry . ClassifierSimpleRetryPolicy policy = new org . fishwife . jrugged . spring . retry . Classifier... | org . junit . Assert . assertFalse ( policy . canRetry ( context ) ) |
checkRelativeImageUrlInContextRelativeCssResource ( ) { final java . lang . String actual = victim . rewrite ( ro . isdc . wro . model . resource . processor . support . TestImageUrlRewriter . DEFAULT_CSS_URI , ro . isdc . wro . model . resource . processor . support . TestImageUrlRewriter . RELATIVE_IMAGE_URL ) ; fina... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetTrustBundlesByDomain_noEntityManager_assertException ( ) { final org . nhindirect . config . store . dao . impl . TrustBundleDaoImpl dao = new org . nhindirect . config . store . dao . impl . TrustBundleDaoImpl ( ) ; boolean exceptionOccured = false ; try { dao . getTrustBundlesByDomain ( 1234 ) ; } catch ( java... | org . junit . Assert . assertTrue ( exceptionOccured ) |
testFloatObjNull ( ) { java . lang . Class < com . j256 . ormlite . field . types . FloatObjectTypeTest . LocalFloatObj > clazz = com . j256 . ormlite . field . types . FloatObjectTypeTest . LocalFloatObj . class ; com . j256 . ormlite . dao . Dao < com . j256 . ormlite . field . types . FloatObjectTypeTest . LocalFloa... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
testRoundTripSorted ( ) { java . util . List < java . lang . String [ ] > input = createTable ( ) ; java . lang . String sql = "select<sp>*<sp>from<sp>" + ( tableId ) ; org . sagebionetworks . repo . model . table . RowSet result = waitForConsistentQuery ( adminUserInfo , sql ) ; "<AssertPlaceHolder>" ; org . sagebione... | org . junit . Assert . assertNotNull ( result ) |
testEstimate ( ) { org . qcri . rheem . core . optimizer . OptimizationContext optimizationContext = mock ( org . qcri . rheem . core . optimizer . OptimizationContext . class ) ; when ( optimizationContext . getConfiguration ( ) ) . thenReturn ( new org . qcri . rheem . core . api . Configuration ( ) ) ; org . qcri . ... | org . junit . Assert . assertEquals ( expectedEstimate , outputEstimate ) |
testRestartProperties ( ) { com . dremio . provision . Cluster storedCluster = clusterCreateHelper ( ) ; com . dremio . provision . ClusterModifyRequest request = new com . dremio . provision . ClusterModifyRequest ( ) ; request . setId ( storedCluster . getId ( ) . getId ( ) ) ; request . setTag ( "12" ) ; storedClust... | org . junit . Assert . assertEquals ( ProvisioningServiceImpl . Action . RESTART , action ) |
testAppendArgOrValueInteger ( ) { int value = 23213 ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; cmpInt . appendArgOrValue ( null , numberFieldType , sb , new java . util . ArrayList < com . j256 . ormlite . stmt . ArgumentHolder > ( ) , value ) ; "<AssertPlaceHolder>" ; } toString ( ) { ret... | org . junit . Assert . assertEquals ( ( ( java . lang . Integer . toString ( value ) ) + "<sp>" ) , sb . toString ( ) ) |
testIgnoredCommentsAndWhitespace ( ) { org . apache . shindig . gadgets . GadgetBlacklist bl = createBlacklist ( ( ( "#<sp>comment\n<sp>\t" + ( someUri ) ) + "<sp>\n<sp>#<sp>comment\n\n" ) ) ; "<AssertPlaceHolder>" ; } isBlacklisted ( org . apache . shindig . common . uri . Uri ) { java . lang . String uriString = gadg... | org . junit . Assert . assertTrue ( bl . isBlacklisted ( someUri ) ) |
getProtocolHandlerTest ( ) { com . github . knightliao . hermesjsonrpc . server . handler . HandlerFactory handlerFactory = new com . github . knightliao . hermesjsonrpc . server . handler . HandlerFactory ( ) ; com . github . knightliao . hermesjsonrpc . server . handler . RpcHandler rpcHandler = handlerFactory . getP... | org . junit . Assert . assertTrue ( ( rpcHandler instanceof com . github . knightliao . hermesjsonrpc . server . handler . RpcHandler ) ) |
testGetOp ( ) { java . util . concurrent . Future < java . lang . String > future = contentLengthFuture ( org . apache . hadoop . hdfs . web . TestWebHdfsContentLength . errResponse ) ; try { org . apache . hadoop . hdfs . web . TestWebHdfsContentLength . fs . getFileStatus ( org . apache . hadoop . hdfs . web . TestWe... | org . junit . Assert . assertEquals ( null , getContentLength ( future ) ) |
testGetSiteNavigationMenus ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( _group . getGroupId ( ) , com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) ) ; java . u... | org . junit . Assert . assertEquals ( ( siteNavigationMenusOriginalSize + 2 ) , siteNavigationMenusAfterSize ) |
matrixPostTest ( ) { java . lang . String key = com . graphhopper . directions . api . client . api . MatrixApiTest . KEY ; com . graphhopper . directions . api . client . model . MatrixRequest body = new com . graphhopper . directions . api . client . model . MatrixRequest ( ) ; com . graphhopper . directions . api . ... | org . junit . Assert . assertEquals ( 3 , response . getDistances ( ) . size ( ) ) |
zipTypeTest ( ) { java . lang . String name = "Showcase" ; java . lang . String path = ( ( ( this . path ) + ( java . io . File . separator ) ) + name ) + ".csar" ; java . io . InputStream fis = new java . io . FileInputStream ( path ) ; org . eclipse . winery . repository . backend . IRepository repository = org . ecl... | org . junit . Assert . assertTrue ( zipFile . exists ( ) ) |
testCheckConditionsEqualsIgnoreCase ( ) { java . lang . String expected = "abc" ; java . lang . String actual = "Abc" ; com . github . noraui . gherkin . GherkinConditionedLoopedStep gherkinConditionedLoopedStep = new com . github . noraui . gherkin . GherkinConditionedLoopedStep ( "1" , "I<sp>wait<sp>'4'<sp>seconds." ... | org . junit . Assert . assertTrue ( gherkinConditionedLoopedStep . checkCondition ( ) ) |
canOnlyGenerateNull ( ) { com . pholser . junit . quickcheck . generator . VoidGenerator generator = new com . pholser . junit . quickcheck . generator . VoidGenerator ( ) ; java . lang . Void value = generator . generate ( null , null ) ; "<AssertPlaceHolder>" ; } generate ( com . pholser . junit . quickcheck . random... | org . junit . Assert . assertNull ( value ) |
testAddConflict ( ) { com . vladsch . flexmark . util . collection . OrderedMultiMap < java . lang . String , java . lang . Integer > orderedMap = new com . vladsch . flexmark . util . collection . OrderedMultiMap < java . lang . String , java . lang . Integer > ( ) ; orderedMap . put ( "0" , 0 ) ; orderedMap . put ( "... | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 1 ) ) , orderedMap . putKeyValue ( "1" , 0 ) ) |
testContentTransformedFromHeader ( ) { com . google . common . collect . Multimap < java . lang . String , java . lang . String > map = com . google . common . collect . LinkedHashMultimap . create ( ) ; map . put ( "Content-Type" , "text/plain" ) ; when ( response . getHeaders ( ) ) . thenReturn ( map ) ; when ( respo... | org . junit . Assert . assertEquals ( "hello<sp>world" , v ) |
shouldNotEqualNull ( ) { eu . printingin3d . javascad . vrl . Vertex v = new eu . printingin3d . javascad . vrl . Vertex ( eu . printingin3d . javascad . testutils . RandomUtils . getRandomCoords ( ) , java . awt . Color . BLACK ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { re... | org . junit . Assert . assertFalse ( v . equals ( null ) ) |
testDCEligible ( ) { java . lang . String localhostname = java . net . InetAddress . getLocalHost ( ) . getHostName ( ) ; java . lang . String scope = "dc:" + localhostname ; "<AssertPlaceHolder>" ; } isDCEligible ( java . lang . String ) { boolean eligible = false ; try { java . util . List < java . lang . String > da... | org . junit . Assert . assertFalse ( com . ebay . jetstream . config . mongo . MongoScopesUtil . isDCEligible ( scope ) ) |
testShouldNotConsumeAnythingIfNoOptionIsDefined ( ) { java . lang . String [ ] remaining = cli . parse ( "1" , "2" , "3" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "1" , "2" , "3" } , remaining ) |
testCreateValue_null ( ) { "<AssertPlaceHolder>" ; } createValue ( java . lang . Object ) { if ( value instanceof com . google . api . ads . admanager . axis . v201808 . Value ) { return ( ( com . google . api . ads . admanager . axis . v201808 . Value ) ( value ) ) ; } else if ( value == null ) { return new com . goog... | org . junit . Assert . assertEquals ( null , ( ( com . google . api . ads . admanager . axis . v201808 . TextValue ) ( com . google . api . ads . admanager . axis . utils . v201808 . Pql . createValue ( null ) ) ) . getValue ( ) ) |
testGenerateCode_CannotWriteFolder ( ) { thrown . expect ( com . btc . redg . generator . exceptions . RedGGenerationException . class ) ; thrown . expectMessage ( "Creation<sp>of<sp>package<sp>folder<sp>structure<sp>failed" ) ; java . sql . Connection connection = com . btc . redg . generator . extractor . DatabaseMan... | org . junit . Assert . assertNotNull ( tempFile ) |
testGetBlobProviders ( ) { java . util . Map < java . lang . String , org . nuxeo . ecm . core . blob . BlobProvider > providers = blobManager . getBlobProviders ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return getCollectedDocumentIds ( ) . size ( ) ; } | org . junit . Assert . assertEquals ( 3 , providers . size ( ) ) |
testSetGrayed_marksItemCached ( ) { grid = new org . eclipse . nebula . widgets . grid . Grid ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; org . eclipse . nebula . widgets . grid . GridItem item = new org . eclipse . nebula . widgets . grid . GridItem ( grid , org . eclipse . swt . SWT . NONE ) ; item . setGrayed ... | org . junit . Assert . assertTrue ( item . isCached ( ) ) |
testGetGroupMissing ( ) { org . freedesktop . IniStyleFile file = new org . freedesktop . IniStyleFile ( "default-group" ) ; java . util . Map < java . lang . String , java . lang . String > group = file . getGroup ( "some-random-group" ) ; "<AssertPlaceHolder>" ; } getGroup ( java . lang . String ) { if ( ! ( data . c... | org . junit . Assert . assertEquals ( null , group ) |
testSizeBoundedBatching ( ) { final java . util . concurrent . LinkedBlockingQueue < com . spotify . google . cloud . pubsub . client . PublisherTest . Request > t = new java . util . concurrent . LinkedBlockingQueue ( ) ; topics . put ( "t" , t ) ; publisher = com . spotify . google . cloud . pubsub . client . Publish... | org . junit . Assert . assertThat ( request . messages . size ( ) , org . hamcrest . Matchers . is ( 2 ) ) |
initializeName ( ) { gov . uspto . patent . model . entity . NamePerson name = new gov . uspto . patent . model . entity . NamePerson ( "John" , "Smith" , "DOE" ) ; java . lang . String abbrev = name . getInitials ( ) ; java . lang . String expect = "JSD" ; "<AssertPlaceHolder>" ; } getInitials ( ) { java . lang . Stri... | org . junit . Assert . assertEquals ( expect , abbrev ) |
testGetPrefixedOsPropertiesWindowsAndShimConfigTrumpsWindowsConfig ( ) { when ( windowsChecker . isWindows ( ) ) . thenReturn ( true ) ; shimProperties . setProperty ( "java.system.flatclass" , "false" ) ; shimProperties . setProperty ( "windows.java.system.flatclass" , "false" ) ; shimProperties . setProperty ( "mr1.j... | org . junit . Assert . assertEquals ( "true" , shimProperties . getProperty ( "java.system.flatclass" ) ) |
testDeleteService ( ) { java . lang . String clusterName = "c1" ; java . lang . String serviceName = "HDFS" ; org . apache . ambari . funtest . server . ConnectionParams params = new org . apache . ambari . funtest . server . ConnectionParams ( ) ; params . setServerName ( "localhost" ) ; params . setServerApiPort ( se... | org . junit . Assert . assertEquals ( hostComponentDesiredStateEntities . size ( ) , 0 ) |
shouldBroadcastMessageToRecoveredProcess ( ) { 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 ( ) ) |
testEquals1481087 ( ) { org . jfree . chart . labels . StandardCategoryItemLabelGenerator g1 = new org . jfree . chart . labels . StandardCategoryItemLabelGenerator ( "{0}" , new java . text . DecimalFormat ( "0.00" ) ) ; org . jfree . chart . labels . StandardCategoryToolTipGenerator g2 = new org . jfree . chart . lab... | org . junit . Assert . assertFalse ( g1 . equals ( g2 ) ) |
testGetClientProperties ( ) { try { org . geotools . data . complex . config . XMLConfigDigester reader = new org . geotools . data . complex . config . XMLConfigDigester ( ) ; java . net . URL url = getClass ( ) . getResource ( "/test-data/MappedFeatureMissingNamespaceXlink.xml" ) ; org . geotools . data . complex . c... | org . junit . Assert . assertSame ( java . lang . IllegalArgumentException . class , ex . getClass ( ) ) |
testReadSubsamplingBounds1028 ( ) { com . twelvemonkeys . imageio . plugins . jpeg . JPEGImageReader reader = createReader ( ) ; reader . setInput ( com . twelvemonkeys . imageio . plugins . jpeg . ImageIO . createImageInputStream ( getClassLoaderResource ( "/jpeg/read-error1028.jpg" ) ) ) ; com . twelvemonkeys . image... | org . junit . Assert . assertNotNull ( image ) |
testIncludeMetadata ( ) { java . util . ArrayList < com . nextdoor . bender . operation . substitution . Substitution > substitutions = new java . util . ArrayList < com . nextdoor . bender . operation . substitution . Substitution > ( ) ; substitutions . add ( new com . nextdoor . bender . operation . substitution . m... | org . junit . Assert . assertEquals ( expected , devent . getField ( "foo" ) ) |
testDefaultTTLWith10MaxAgeAndExpires ( ) { final java . time . LocalDateTime expires = now . plusYears ( 1 ) ; final org . codehaus . httpcache4j . cache . Headers headers = createDefaultHeaders ( ) . add ( HeaderConstants . CACHE_CONTROL , "max-age=10" ) . add ( org . codehaus . httpcache4j . cache . HeaderUtils . toH... | org . junit . Assert . assertEquals ( DEFAULT_TTL , ttl ) |
testGemeenteVanInschrijvingNietGevuld ( ) { final boolean gevuld = new nl . bzk . migratiebrp . conversie . model . lo3 . Lo3PersoonslijstBuilder ( ) . build ( ) . isGemeenteVanInschrijvingGevuld ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return built ; } | org . junit . Assert . assertFalse ( gevuld ) |
testEmptyIntArray ( ) { org . eclipse . microprofile . config . spi . ConfigBuilder builder = org . eclipse . microprofile . config . spi . ConfigProviderResolver . instance ( ) . getBuilder ( ) ; java . lang . System . setProperty ( ConfigConstants . DYNAMIC_REFRESH_INTERVAL_PROP_NAME , ( "" + 0 ) ) ; com . ibm . ws .... | org . junit . Assert . assertEquals ( 0 , key1 . length ) |
shouldRejectNullName ( ) { cluster . setName ( null ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = cTest . validate ( cluster , org . openstack . atlas . api . mgmt . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validat... | org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . mgmt . validation . validators . POST ) , result . passedValidation ( ) ) |
testSetStatus ( ) { rot . setStatus ( DataStatus . VOID ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return net . sf . marineapi . nmea . util . DataStatus . valueOf ( getCharValue ( net . sf . marineapi . nmea . parser . APBParser . SIGNAL_STATUS ) ) ; } | org . junit . Assert . assertEquals ( DataStatus . VOID , rot . getStatus ( ) ) |
testNoKeyStoreFile ( ) { org . apache . wss4j . common . crypto . Crypto crypto = org . apache . wss4j . common . crypto . CryptoFactory . getInstance ( "nofile.properties" ) ; "<AssertPlaceHolder>" ; } getInstance ( java . util . Properties ) { if ( properties == null ) { org . apache . wss4j . common . crypto . Crypt... | org . junit . Assert . assertNotNull ( crypto ) |
testIsClosed ( ) { org . bff . javampd . server . MPD mpd = mpdBuilder . build ( ) ; "<AssertPlaceHolder>" ; } isClosed ( ) { return this . closed ; } | org . junit . Assert . assertFalse ( mpd . isClosed ( ) ) |
testConstuctor_Failed ( ) { com . dp . nebula . wormhole . engine . core . WriterThread writer = createWriterThread ( "com.dp.nebula.wormhole.engine.common.NotExistWriter" ) ; "<AssertPlaceHolder>" ; } createWriterThread ( com . dp . nebula . wormhole . common . interfaces . IWriter ) { try { java . lang . Class clazz ... | org . junit . Assert . assertNull ( writer ) |
testJavaSerialization ( ) { org . apache . eagle . alert . engine . model . PartitionedEvent partitionedEvent = new org . apache . eagle . alert . engine . model . PartitionedEvent ( ) ; partitionedEvent . setPartitionKey ( partitionedEvent . hashCode ( ) ) ; partitionedEvent . setPartition ( org . apache . eagle . ale... | org . junit . Assert . assertTrue ( ( ( compactLength * 20 ) < javaSerializationLength ) ) |
clinicallyMeasuredObservationsNullFlavorTest ( ) { org . oscarehr . e2e . populator . body . ClinicallyMeasuredObservationsPopulator cmoPopulator = new org . oscarehr . e2e . populator . body . ClinicallyMeasuredObservationsPopulator ( new org . oscarehr . e2e . model . PatientExport ( Constants . Runtime . INVALID_VAL... | org . junit . Assert . assertNull ( cmoPopulator . populateNullFlavorClinicalStatement ( ) ) |
testText ( ) { com . eviware . soapui . support . xml . XPathData data = new com . eviware . soapui . support . xml . XPathData ( "//in/name/text()" , false ) ; "<AssertPlaceHolder>" ; } getFullPath ( ) { return buildXPath ( null ) ; } | org . junit . Assert . assertEquals ( "//in/name/text()" , data . getFullPath ( ) ) |
testGetApplicationName ( ) { final java . lang . String testApplicationName = "MY_TEST_APP" ; org . finra . herd . core . ArgumentParser argParser = new org . finra . herd . core . ArgumentParser ( testApplicationName ) ; "<AssertPlaceHolder>" ; } getApplicationName ( ) { return applicationName ; } | org . junit . Assert . assertEquals ( testApplicationName , argParser . getApplicationName ( ) ) |
whenAllResourcesAreRetrieved_thenTheResultIsNotNull ( ) { final java . util . List < com . baeldung . domain . Foo > resources = getApi ( ) . findAll ( ) ; "<AssertPlaceHolder>" ; } findAll ( ) { return meals ; } | org . junit . Assert . assertNotNull ( resources ) |
testSingleElementIteration ( ) { org . petitparser . parser . Parser parser = lowerCase ( ) ; org . petitparser . utils . Mirror mirror = org . petitparser . utils . Mirror . of ( parser ) ; java . util . List < org . petitparser . parser . Parser > parsers = mirror . stream ( ) . collect ( java . util . stream . Colle... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( parser ) , parsers ) |
testIntersectionWithSet ( ) { org . dresdenocl . tools . codegen . ocl2java . types . OclSet < java . lang . String > set1 ; org . dresdenocl . tools . codegen . ocl2java . types . OclSet < java . lang . String > set2 ; org . dresdenocl . tools . codegen . ocl2java . types . OclSet < java . lang . String > set3 ; org .... | org . junit . Assert . assertTrue ( set3 . equals ( set2 ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.