input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
isDaemonUser_shouldReturnFalseIFTheUserIsNotADaemon ( ) { org . openmrs . User user = new org . openmrs . User ( ) ; user . setUuid ( "any<sp>other<sp>value" ) ; "<AssertPlaceHolder>" ; } isDaemonUser ( org . openmrs . User ) { return org . openmrs . api . context . Daemon . DAEMON_USER_UUID . equals ( user . getUuid (... | org . junit . Assert . assertFalse ( org . openmrs . api . context . Daemon . isDaemonUser ( user ) ) |
testComplexSchema ( ) { final java . net . URL url = getClass ( ) . getClassLoader ( ) . getResource ( "url" 2 ) ; java . util . Objects . requireNonNull ( url ) ; final java . lang . String schema = org . apache . flink . util . FileUtils . readFileUtf8 ( new java . io . File ( url . getFile ( ) ) ) ; final org . apac... | org . junit . Assert . assertEquals ( expected , result ) |
shouldMatchSearchTerm ( ) { java . lang . String title = "My<sp>Title" ; entry . setTitle ( title ) ; boolean match = entry . matches ( "My" ) ; "<AssertPlaceHolder>" ; } matches ( java . lang . String ) { java . lang . String title = getTitle ( ) ; if ( title != null ) { return title . toLowerCase ( ) . contains ( sea... | org . junit . Assert . assertThat ( match , org . hamcrest . Matchers . is ( true ) ) |
shouldBeAbleToiChange ( ) { System . out . println ( injectableArtifact ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( injectableArtifact ) |
testModify ( ) { final org . geotools . data . Query queryAll = new org . geotools . data . Query ( org . geoserver . feature . retype . RetypingDataStoreTest . RENAMED ) ; org . geotools . data . simple . SimpleFeatureStore store ; store = ( ( org . geotools . data . simple . SimpleFeatureStore ) ( rts . getFeatureSou... | org . junit . Assert . assertEquals ( newAddress , modified . getAttribute ( "ADDRESS" ) ) |
W_planWithNoEntries_T_correctDeserialization ( ) { com . codepine . api . testrail . model . Plan actualPlan = com . codepine . api . testrail . internal . PlanModuleTest . objectMapper . readValue ( this . getClass ( ) . getResourceAsStream ( "/plan_with_no_entries.json" ) , com . codepine . api . testrail . model . P... | org . junit . Assert . assertEquals ( expectedPlan , actualPlan ) |
testSquareBrace ( ) { java . lang . String source = "(NP<sp>(DT<sp>an)<sp>(-LRB-<sp>-LSB-)<sp>(VBG<sp>offending)<sp>(-RRB-<sp>-RSB-)<sp>(NN<sp>country))" ; java . lang . String expected = "an<sp>[offending]<sp>country" ; edu . nyu . jet . format . PTBReader parser = new edu . nyu . jet . format . PTBReader ( ) ; edu . ... | org . junit . Assert . assertEquals ( ( expected + "\n" ) , doc . text ( ) ) |
isNotEmpty ( ) { mandatorySubject . setValue ( SpdConstants . NotificationType . NON_RECEIPT ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; } | org . junit . Assert . assertEquals ( false , mandatorySubject . isEmpty ( ) ) |
testProcedureRequestResources ( ) { ca . uhn . fhir . rest . client . api . IGenericClient client = ourClient ; int initialSize = client . search ( ) . forResource ( ca . uhn . fhir . jpa . provider . r4 . ServiceRequest . class ) . returnBundle ( ca . uhn . fhir . jpa . provider . r4 . Bundle . class ) . execute ( ) .... | org . junit . Assert . assertEquals ( 1 , ( newSize - initialSize ) ) |
canUseQueryParametersWhenListingNotificationEndPoints ( ) { java . lang . String [ ] notificationEndPointNames = new java . lang . String [ ] { ( testNotificationEndPointPrefix ) + "ListThree" , ( testNotificationEndPointPrefix ) + "ListFour" , ( testNotificationEndPointPrefix ) + "ListFive" , ( testNotificationEndPoin... | org . junit . Assert . assertEquals ( 2 , actualNotificationEndPointInfos . size ( ) ) |
shouldReturnTrueForUpperCaseCharFollowingSingleQuoteAtIndexZero ( ) { boolean start = edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . isWordStart ( "'A" , 1 ) ; "<AssertPlaceHolder>" ; } isWordStart ( java . lang . String , int ) { checkNotNull ( entityName ) ; int length = entityName . leng... | org . junit . Assert . assertEquals ( true , start ) |
testGetCurrentCrl ( ) { java . lang . Object response = this . resource . getCurrentCrl ( null ) ; "<AssertPlaceHolder>" ; verify ( crlFileUtil ) . syncCRLWithDB ( any ( java . io . File . class ) ) ; } getCurrentCrl ( org . candlepin . auth . Principal ) { java . lang . String filePath = getCrlFilePath ( ) ; java . io... | org . junit . Assert . assertTrue ( ( response != null ) ) |
deveObterProtocoloAutorizacaoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFInfoCancelamento infoCancelamento = new com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFInfoCancelamento ( ) ; final java . lang . String protocoloAutori... | org . junit . Assert . assertEquals ( protocoloAutorizacao , infoCancelamento . getProtocoloAutorizacao ( ) ) |
testClose ( ) { lldpLinkAger . close ( ) ; "<AssertPlaceHolder>" ; } isLinkToDateEmpty ( ) { return linkToDate . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( lldpLinkAger . isLinkToDateEmpty ( ) ) |
testRollbackSimulatedCrash ( ) { int numEvents = 50 ; java . util . List < java . lang . String > in = org . apache . flume . channel . file . TestFileChannel . putEvents ( channel , "rollback" , 1 , numEvents ) ; org . apache . flume . Transaction transaction ; transaction = channel . getTransaction ( ) ; transaction ... | org . junit . Assert . assertEquals ( in , out ) |
testZeroMin ( ) { final net . imglib2 . Interval interval = net . imglib2 . util . Intervals . createMinMax ( 1 , 2 , 3 , 5 , 7 , 9 ) ; final net . imglib2 . transform . integer . Mixed transform = net . imglib2 . view . ViewTransforms . zeroMin ( interval ) ; final long [ ] result = apply ( transform , new long [ ] { ... | org . junit . Assert . assertArrayEquals ( new long [ ] { 1 , 2 , 3 } , result ) |
testPushParser ( ) { java . io . File configFile = new java . io . File ( parsersDir , "myparser.json" ) ; org . apache . metron . integration . utils . TestUtils . write ( configFile , org . apache . metron . common . cli . ConfigurationManagerIntegrationTest . squidParserConfig ) ; pushConfigs ( org . apache . metron... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . equalTo ( expected ) ) |
convertsToStringWithEncoding ( ) { final java . nio . charset . Charset encoding = forName ( "EUC-JP" ) ; final java . lang . String encodedText = "こ" ; java . io . InputStream in = new java . io . ByteArrayInputStream ( encodedText . getBytes ( encoding ) ) ; java . lang . String converted = org . mule . runtime . cor... | org . junit . Assert . assertThat ( converted , org . hamcrest . Matchers . equalTo ( encodedText ) ) |
setsArtistOnV2TagOnly ( ) { com . mpatric . mp3agic . ID3v2 id3v2Tag = new com . mpatric . mp3agic . ID3WrapperTest . ID3v2TagForTesting ( ) ; com . mpatric . mp3agic . ID3Wrapper wrapper = new com . mpatric . mp3agic . ID3Wrapper ( null , id3v2Tag ) ; wrapper . setArtist ( "an<sp>artist" ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( "an<sp>artist" , id3v2Tag . getArtist ( ) ) |
multiMasterMountUnmountJournal ( ) { alluxio . master . MultiMasterLocalAlluxioCluster cluster = setupMultiMasterCluster ( ) ; alluxio . underfs . UnderFileSystemFactory factory = mountUnmount ( cluster . getClient ( ) ) ; for ( int kills = 0 ; kills < ( alluxio . server . ft . journal . JournalShutdownIntegrationTest ... | org . junit . Assert . assertTrue ( cluster . stopLeader ( ) ) |
no_exception_should_be_thrown_if_sortset_contains_same_elements_in_order ( ) { redis . clients . jedis . Jedis jedis = new redis . clients . jedis . Jedis ( "localhost" , 6379 ) ; com . lordofthejars . nosqlunit . redis . RedisOperation redisOperation = new com . lordofthejars . nosqlunit . redis . RedisOperation ( jed... | org . junit . Assert . assertThat ( isExpectedData , org . hamcrest . CoreMatchers . is ( true ) ) |
testToNoQueryUri_UpperCase ( ) { final java . lang . String suri = "HTTP://localhost/jenkins" ; final java . net . URI uri = com . offbytwo . jenkins . client . util . UrlUtils . toNoApiUri ( new java . net . URI ( suri ) , "jenkins" , "job/somejob" ) ; final java . lang . String expected = "HTTP://localhost/jenkins/jo... | org . junit . Assert . assertEquals ( expected , uri . toString ( ) ) |
test_one ( ) { java . lang . String sql = "CREATE<sp>DATABASE<sp>testRep<sp>CHARACTER<sp>SET<sp>utf8<sp>COLLATE<sp>utf8_general_ci" ; com . alibaba . druid . sql . dialect . mysql . parser . MySqlStatementParser parser = new com . alibaba . druid . sql . dialect . mysql . parser . MySqlStatementParser ( sql ) ; com . a... | org . junit . Assert . assertEquals ( "CREATE<sp>DATABASE<sp>testRep<sp>CHARACTER<sp>SET<sp>utf8<sp>COLLATE<sp>utf8_general_ci" , output ) |
testStopFail ( ) { org . apache . hadoop . fs . shell . find . And and = new org . apache . hadoop . fs . shell . find . And ( ) ; org . apache . hadoop . fs . shell . PathData pathData = mock ( org . apache . hadoop . fs . shell . PathData . class ) ; org . apache . hadoop . fs . shell . find . Expression first = mock... | org . junit . Assert . assertEquals ( Result . STOP . combine ( Result . FAIL ) , and . apply ( pathData , ( - 1 ) ) ) |
testDummy ( ) { java . lang . Thread . sleep ( 500 ) ; "<AssertPlaceHolder>" ; System . out . println ( "Some<sp>text<sp>for<sp>test<sp>purpose" ) ; } | org . junit . Assert . assertTrue ( true ) |
testIsBlockingEqualsFalseProperty ( ) { task . setIsBlocking ( false ) ; org . camunda . bpm . engine . impl . cmmn . model . CmmnActivity activity = handler . handleElement ( planItem , context ) ; java . lang . Boolean isBlocking = ( ( java . lang . Boolean ) ( activity . getProperty ( org . camunda . bpm . engine . ... | org . junit . Assert . assertFalse ( isBlocking ) |
shouldCreatePartitionKey ( ) { final java . lang . Object [ ] key = new java . lang . Object [ ] { true , 1L , 5 , "ABC" , 10.0F , ( ( short ) ( 1 ) ) , ( ( byte ) ( 64 ) ) , new byte [ ] { ( ( byte ) ( 1 ) ) , ( ( byte ) ( 2 ) ) , ( ( byte ) ( 3 ) ) } } ; final uk . gov . gchq . gaffer . parquetstore . partitioner . P... | org . junit . Assert . assertArrayEquals ( key , readPartitionKey . getPartitionKey ( ) ) |
testPutGetAll ( ) { final java . util . concurrent . atomic . AtomicBoolean running = new java . util . concurrent . atomic . AtomicBoolean ( true ) ; net . tomp2p . dht . PeerDHT master = null ; try { final net . tomp2p . dht . PeerDHT [ ] peers = net . tomp2p . dht . UtilsDHT2 . createNodes ( 100 , net . tomp2p . dht... | org . junit . Assert . assertEquals ( 2 , fget . dataMap ( ) . size ( ) ) |
testParseNoRoute ( ) { java . lang . String s = "stuff" ; org . apache . james . mime4j . util . ByteSequence raw = org . apache . james . mime4j . util . ContentUtil . encode ( s ) ; org . apache . james . mime4j . stream . ParserCursor cursor = new org . apache . james . mime4j . stream . ParserCursor ( 0 , s . lengt... | org . junit . Assert . assertNull ( route ) |
notNull ( ) { javax . sql . DataSource ds = org . dayatang . domain . InstanceFactory . getInstance ( javax . sql . DataSource . class ) ; "<AssertPlaceHolder>" ; } getInstance ( java . lang . Class ) { for ( org . dayatang . domain . InstanceLocator locator : org . dayatang . domain . InstanceFactory . instanceLocator... | org . junit . Assert . assertNotNull ( ds ) |
test ( ) { java . lang . String testFile = "../data/skwiki_test_suffixes_sample.txt" ; mergingInflectedFormNE . Main m = new mergingInflectedFormNE . Main ( ) ; mergingInflectedFormNE . FileReader fr = new mergingInflectedFormNE . FileReader ( ) ; testAndTools . StringTools st = new testAndTools . StringTools ( ) ; jav... | org . junit . Assert . assertEquals ( outputData , testData . substring ( 1 ) ) |
testCreateUpgradeInfosWithNoSteps ( ) { com . liferay . portal . upgrade . internal . registry . UpgradeStepRegistry upgradeStepRegistry = new com . liferay . portal . upgrade . internal . registry . UpgradeStepRegistry ( 0 ) ; upgradeStepRegistry . register ( "0.0.0" , "1.0.0" ) ; java . util . List < com . liferay . ... | org . junit . Assert . assertTrue ( upgradeInfos . toString ( ) , upgradeInfos . isEmpty ( ) ) |
testSingleLevelTree ( ) { org . antlr . runtime . tree . TreeWizard wiz = new org . antlr . runtime . tree . TreeWizard ( org . antlr . test . TestTreeWizard . adaptor , org . antlr . test . TestTreeWizard . tokens ) ; org . antlr . runtime . tree . CommonTree t = ( ( org . antlr . runtime . tree . CommonTree ) ( wiz .... | org . junit . Assert . assertEquals ( expecting , found ) |
getEmployeeTest ( ) { when ( mockDao . getEmployee ( 1 ) ) . thenReturn ( employee ) ; com . spring . hibernate . model . Employee emp1 = employeeController . getEmployee ( 1 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( employee , emp1 ) |
testImportIris ( ) { org . nd4j . autodiff . samediff . SameDiff graph = org . nd4j . imports . graphmapper . tf . TFGraphMapper . getInstance ( ) . importGraph ( new org . nd4j . linalg . io . ClassPathResource ( "tf_graphs/train_iris.pb" ) . getInputStream ( ) ) ; "<AssertPlaceHolder>" ; } getInputStream ( ) { java .... | org . junit . Assert . assertNotNull ( graph ) |
testGetJmsReplyToWithNullAddressAndNullConsumerDestReturnsNull ( ) { org . apache . qpid . jms . provider . amqp . message . AmqpJmsMessageFacade message = org . mockito . Mockito . mock ( org . apache . qpid . jms . provider . amqp . message . AmqpJmsMessageFacade . class ) ; org . mockito . Mockito . when ( message .... | org . junit . Assert . assertNull ( org . apache . qpid . jms . provider . amqp . message . AmqpDestinationHelper . getJmsDestination ( message , null ) ) |
testElement ( ) { "<AssertPlaceHolder>" ; } element ( ) { return e ; } | org . junit . Assert . assertEquals ( v , person . element ( ) ) |
testPeekLast ( ) { 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 . Integer > d... | org . junit . Assert . assertEquals ( 3 , ( ( int ) ( d . peekLast ( ) ) ) ) |
non_string_type_request_returns_no_specimen ( ) { java . lang . Object result = this . stringGenerator . create ( com . flextrade . jfixture . builders . Integer . class , null ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Object , com . flextrade . jfixture . SpecimenContext ) { if ( ! ( request instanceof com ... | org . junit . Assert . assertEquals ( new com . flextrade . jfixture . NoSpecimen ( ) , result ) |
testGetFirstTime ( ) { System . out . println ( "getFirstTime" ) ; kg . apc . charting . AbstractGraphRow instance = new kg . apc . charting . AbstractGraphRowTest . AbstractGraphRowImpl ( ) ; long expResult = Long . MIN_VALUE ; long result = instance . getFirstTime ( ) ; "<AssertPlaceHolder>" ; } println ( java . lang... | org . junit . Assert . assertEquals ( expResult , result ) |
testUpgradeDLDateFieldsValuesWithEmptyValue ( ) { com . liferay . dynamic . data . mapping . model . DDMStructure ddmStructure = addDDMStructure ( com . liferay . document . library . kernel . model . DLFileEntryMetadata . class . getName ( ) ) ; com . liferay . portal . kernel . service . ServiceContext serviceContext... | org . junit . Assert . assertEquals ( StringPool . BLANK , ddmStructureFieldValue ) |
emptyROIContainsRect ( ) { org . jaitools . imageutils . ROIGeometry empty = createEmptyROI ( ) ; "<AssertPlaceHolder>" ; } contains ( double , double , double , double ) { org . locationtech . jts . geom . Geometry rect = createRectangle ( x , y , w , h ) ; return geometry . contains ( rect ) ; } | org . junit . Assert . assertFalse ( empty . contains ( 0 , 0 , 1 , 1 ) ) |
traceIdentifierTest ( ) { io . opentracing . SpanContext ctx = NoopSpanContextImpl . INSTANCE ; "<AssertPlaceHolder>" ; } toTraceId ( ) { return java . lang . String . valueOf ( traceId ) ; } | org . junit . Assert . assertEquals ( "" , ctx . toTraceId ( ) ) |
publishOneMessageWithNoTimestampOrIdAttribute ( ) { client = new org . apache . beam . sdk . io . gcp . pubsub . PubsubJsonClient ( null , null , mockPubsub ) ; java . lang . String expectedTopic = org . apache . beam . sdk . io . gcp . pubsub . PubsubJsonClientTest . TOPIC . getPath ( ) ; com . google . api . services... | org . junit . Assert . assertEquals ( 1 , n ) |
isServiceForSubscription_SubscriptionManager ( ) { org . oscm . ui . model . Service service = new org . oscm . ui . model . Service ( new org . oscm . ui . dialog . mp . wizards . VOService ( ) ) ; service . setSubscribable ( true ) ; org . oscm . ui . dialog . mp . wizards . VOUserDetails subscriptionManager = mockUs... | org . junit . Assert . assertTrue ( result ) |
testBootstrap ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . yarn . conf . YarnConfiguration ( ) ; java . util . List < org . apache . hadoop . yarn . server . nodemanager . containermanager . linux . privileged . PrivilegedOperation > ret = cGroupsBlkioResourceHandlerImpl . boots... | org . junit . Assert . assertNull ( ret ) |
shouldRemoveRelationshipProperty ( ) { long relId = org . neo4j . server . rest . web . DatabaseActionsTest . graphdbHelper . createRelationship ( "PAIR-PROGRAMS_WITH" ) ; java . util . Map < java . lang . String , java . lang . Object > map = new java . util . HashMap ( ) ; map . put ( "foo" , "bar" ) ; map . put ( "b... | org . junit . Assert . assertEquals ( 1 , org . neo4j . server . rest . web . DatabaseActionsTest . graphdbHelper . getRelationshipProperties ( relId ) . size ( ) ) |
testPostFlushListenerInvokedInAddOrder ( ) { java . util . List < java . lang . Integer > order = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { final int iFinal = i ; com . vaadin . client . flow . reactive . Reactive . addPostFlushListener ( ( ) -> order . add ( java . lang . Integer . valueOf ... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( i ) , order . get ( i ) ) |
testGradientMLP2LayerIrisSimple ( ) { org . nd4j . linalg . activations . Activation [ ] activFns = new org . nd4j . linalg . activations . Activation [ ] { org . nd4j . linalg . activations . Activation . SIGMOID , org . nd4j . linalg . activations . Activation . TANH } ; boolean [ ] characteristic = new boolean [ ] {... | org . junit . Assert . assertTrue ( msg , gradOK ) |
toPOUserGroups_onlyListingFields ( ) { java . util . List < org . oscm . domobjects . UserGroup > userGroups = prepareUserGroups ( 2 ) ; java . util . List < org . oscm . internal . usergroupmgmt . POUserGroup > poUserGroups = org . oscm . internal . assembler . POUserGroupAssembler . toPOUserGroups ( userGroups , Perf... | org . junit . Assert . assertEquals ( 2 , poUserGroups . size ( ) ) |
testKeyword ( ) { com . ctrip . platform . dal . dao . sqlbuilder . AbstractFreeSqlBuilder test = create ( ) ; test . append ( keyword ( com . ctrip . platform . dal . dao . sqlbuilder . AbstractFreeSqlBuilderTest . template ) ) ; "<AssertPlaceHolder>" ; } build ( ) { java . lang . StringBuilder sb = new java . lang . ... | org . junit . Assert . assertEquals ( com . ctrip . platform . dal . dao . sqlbuilder . AbstractFreeSqlBuilderTest . template , test . build ( ) ) |
testGetFunctionStyle ( ) { classUnderTest . setFunctionStyle ( testStyle ) ; "<AssertPlaceHolder>" ; } getFunctionStyle ( ) { return _functionStyle ; } | org . junit . Assert . assertEquals ( testStyle , classUnderTest . getFunctionStyle ( ) ) |
get ( ) { com . gs . collections . api . multimap . list . MutableListMultimap < java . lang . String , java . lang . String > multimap = com . gs . collections . impl . multimap . list . FastListMultimap . newMultimap ( ) ; multimap . putAll ( "One" , com . gs . collections . impl . list . mutable . FastList . newList... | org . junit . Assert . assertEquals ( com . gs . collections . impl . list . mutable . FastList . newListWith ( com . gs . collections . impl . list . mutable . FastList . newListWith ( "O" , "N" , "E" ) , com . gs . collections . impl . list . mutable . FastList . newListWith ( "T" , "W" , "O" ) , com . gs . collectio... |
shouldAcceptValidEnum ( ) { org . openstack . atlas . api . validation . verifiers . VerifierResult result = verifier . verify ( org . openstack . atlas . api . validation . verifiers . MustBeInArrayTest . SampleTypes1 . S1 ) ; "<AssertPlaceHolder>" ; } passed ( ) { return passed ; } | org . junit . Assert . assertTrue ( result . passed ( ) ) |
testNoMatch04 ( ) { boolean matchResult = resultNamePatternMatcher . matchesEndToEnd ( "a<sp>b" ) ; "<AssertPlaceHolder>" ; } matchesEndToEnd ( java . lang . String ) { return pattern . matcher ( input ) . matches ( ) ; } | org . junit . Assert . assertFalse ( matchResult ) |
testStandaloneSystemProperties ( ) { final java . util . Map < java . lang . String , java . lang . String > setProperties = java . util . Collections . singletonMap ( "jboss.server.log.dir" , Environment . LOG_DIR . toString ( ) ) ; org . wildfly . core . test . embedded . SystemPropertyResetTestCase . setSystemProper... | org . junit . Assert . assertEquals ( "configuration" 0 , result . asString ( ) ) |
testTransformReturnsNullIfMonitoringInfoWithUnknownPTransformLabelPresent ( ) { java . util . Map < java . lang . String , org . apache . beam . runners . dataflow . worker . DataflowExecutionContext . DataflowStepContext > stepContextMapping = new java . util . HashMap ( ) ; org . apache . beam . model . pipeline . v1... | org . junit . Assert . assertEquals ( null , testObject . transform ( monitoringInfo ) ) |
testEmptySerialization ( ) { final com . logsniffer . model . LogEntry entry = new com . logsniffer . model . LogEntry ( ) ; final java . lang . String entryStr = mapper . writeValueAsString ( entry ) ; LOGGER . debug ( "JSON:<sp>{}" , entryStr ) ; final com . logsniffer . model . LogEntry check = mapper . readValue ( ... | org . junit . Assert . assertTrue ( check . isEmpty ( ) ) |
testEquals ( ) { org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionSetIpTtl obj = target ; boolean result = target . equals ( obj ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . o3project . odenos ... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) ) |
shouldGetCorrectInstantWithPositiveOffset ( java . lang . String , java . lang . String , java . lang . String ) { "<AssertPlaceHolder>" ; } offsetInstant ( java . time . Instant , com . spotify . styx . model . Schedule , int ) { com . google . common . base . Preconditions . checkArgument ( com . spotify . styx . uti... | org . junit . Assert . assertThat ( com . spotify . styx . util . TimeUtil . offsetInstant ( parse ( origin ) , com . spotify . styx . model . Schedule . parse ( schedule ) , 2 ) , org . hamcrest . Matchers . is ( parse ( expected ) ) ) |
testFindProduceProcessorNullContentType ( org . apache . servicecomb . common . rest . definition . RestOperationMeta , org . apache . servicecomb . foundation . vertx . http . HttpServletResponseEx ) { new mockit . Expectations ( ) { { responseEx . getHeader ( HttpHeaders . CONTENT_TYPE ) ; result = null ; } } ; "<Ass... | org . junit . Assert . assertNull ( filter . findProduceProcessor ( restOperation , responseEx ) ) |
should_return_this ( ) { org . fest . assertions . api . BigDecimalAssert returned = assertions . isNotEqualTo ( expected ) ; "<AssertPlaceHolder>" ; } isNotEqualTo ( byte ) { bytes . assertNotEqualTo ( description , actual , expected ) ; return this ; } | org . junit . Assert . assertSame ( returned , assertions ) |
testGetElementsAtCollectionOfInteger ( ) { org . geotools . swing . control . DnDListModel < java . lang . String > model = new org . geotools . swing . control . DnDListModel < java . lang . String > ( ) ; model . addItem ( "one" ) ; model . addItem ( "two" ) ; java . util . List < java . lang . Integer > indexs = new... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( new java . lang . String [ ] { "one" , "two" , "one" } ) , model . getElementsAt ( indexs ) ) |
testName ( ) { org . apache . olingo . odata2 . ref . model . Building build1 = new org . apache . olingo . odata2 . ref . model . Building ( 1 , org . apache . olingo . odata2 . ref . model . BuildingTest . VALUE_NAME ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( org . apache . olingo . odata2 . ref . model . BuildingTest . VALUE_NAME , build1 . getName ( ) ) |
shouldRaiseConstraintsViolation ( ) { org . agoncal . training . javaee . model . Book book = new org . agoncal . training . javaee . model . Book ( ) ; java . util . Set < javax . validation . ConstraintViolation < org . agoncal . training . javaee . model . Book > > constraints = org . agoncal . training . javaee . m... | org . junit . Assert . assertEquals ( 1 , constraints . size ( ) ) |
testSetYPosition_withValidParam ( ) { final com . valkryst . VTerminal . TileGrid grid = StaticGrid . TILE_GRID ; grid . setYPosition ( 5 ) ; "<AssertPlaceHolder>" ; grid . setYPosition ( 0 ) ; } getYPosition ( ) { return position . y ; } | org . junit . Assert . assertEquals ( 5 , grid . getYPosition ( ) ) |
testGetById_Test1 ( ) { org . mockito . Mockito . doReturn ( null ) . when ( mockStoryMapper ) . selectByPrimaryKey ( ModuleHelper . storyId ) ; com . onboard . domain . model . Story story = testedStoryServiceImpl . getById ( ModuleHelper . storyId ) ; org . mockito . Mockito . verify ( mockStoryMapper , times ( 1 ) )... | org . junit . Assert . assertNull ( "" , story ) |
getSecureTransformer ( ) { "<AssertPlaceHolder>" ; } getSecureTransformer ( ) { org . junit . Assert . assertNotNull ( eu . europa . esig . dss . DomUtils . getSecureTransformer ( ) ) ; } | org . junit . Assert . assertNotNull ( eu . europa . esig . dss . DomUtils . getSecureTransformer ( ) ) |
getMembers ( ) { java . util . List < org . infinispan . remoting . transport . Address > expected = java . util . Collections . singletonList ( mock ( org . infinispan . remoting . transport . Address . class ) ) ; when ( this . manager . getMembers ( ) ) . thenReturn ( expected ) ; java . util . List < org . infinisp... | org . junit . Assert . assertSame ( expected , result ) |
shouldStoreAndReadBackfill ( java . lang . String , boolean ) { final com . spotify . styx . model . BackfillBuilder builder = com . spotify . styx . model . Backfill . newBuilder ( ) . id ( "backfill-2" ) . start ( java . time . Instant . parse ( "2017-01-01T00:00:00Z" ) ) . end ( java . time . Instant . parse ( "2017... | org . junit . Assert . assertThat ( storage . getBackfill ( backfill . id ( ) ) , org . hamcrest . Matchers . equalTo ( java . util . Optional . of ( backfill ) ) ) |
testGetNextVisibleColumn_AllNextNotVisible ( ) { org . eclipse . nebula . widgets . grid . GridColumn [ ] columns = org . eclipse . nebula . widgets . grid . GridTestUtil . createGridColumns ( grid , 5 , SWT . NONE ) ; columns [ 3 ] . setVisible ( false ) ; columns [ 4 ] . setVisible ( false ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertNull ( grid . getNextVisibleColumn ( columns [ 2 ] ) ) |
testDistanceNullChild ( ) { "<AssertPlaceHolder>" ; } distance ( java . lang . Class , java . lang . Class ) { if ( ( child == null ) || ( parent == null ) ) { return - 1 ; } if ( child . equals ( parent ) ) { return 0 ; } final java . lang . Class < ? > cParent = child . getSuperclass ( ) ; int d = org . apache . comm... | org . junit . Assert . assertEquals ( ( - 1 ) , org . apache . commons . lang3 . reflect . InheritanceUtils . distance ( null , java . lang . Object . class ) ) |
testClear ( ) { try ( net . openhft . chronicle . map . ChronicleMap < java . lang . Integer , java . lang . CharSequence > map = net . openhft . chronicle . map . jsr166 . map . ChronicleMapTest . map5 ( ) ) { map . clear ( ) ; "<AssertPlaceHolder>" ; } } size ( ) { return check ( new net . openhft . chronicle . map .... | org . junit . Assert . assertEquals ( 0 , map . size ( ) ) |
listClear ( ) { attachmentList . clear ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { if ( ( empty ) == ( - 1 ) ) { for ( org . openqa . selenium . WebElement row : table . findElements ( org . openqa . selenium . By . tagName ( "tr" ) ) ) { if ( ! ( row . findElements ( org . openqa . selenium . By . tagName ( "td" ) )... | org . junit . Assert . assertTrue ( attachmentList . isEmpty ( ) ) |
issue_1267 ( ) { resp = post ( "/adaptor/issue1267" , new org . nutz . lang . util . NutMap ( "time" , "Thu<sp>May<sp>25<sp>2017<sp>07:16:32<sp>GMT+0800<sp>(CST)" ) ) ; "<AssertPlaceHolder>" ; System . out . println ( resp . getContent ( ) ) ; } getStatus ( ) { return status ; } | org . junit . Assert . assertEquals ( 200 , resp . getStatus ( ) ) |
testPojo ( ) { org . camunda . bpm . engine . variable . VariableMap variables = org . camunda . bpm . engine . variable . Variables . createVariables ( ) . putValue ( "pojo" , new org . camunda . bpm . engine . test . dmn . businessruletask . TestPojo ( "okay" , 13.37 ) ) ; org . camunda . bpm . engine . runtime . Pro... | org . junit . Assert . assertEquals ( "okay" , getDecisionResult ( processInstance ) ) |
testToByteArray_LongString ( ) { java . lang . String s = "" ; byte [ ] exp = new byte [ 10000 ] ; for ( int i = 0 ; i < 10000 ; i ++ ) { s = s + "FF" ; exp [ i ] = ( ( byte ) ( 255 ) ) ; } byte [ ] recv = de . persosim . simulator . utils . HexString . toByteArray ( s ) ; "<AssertPlaceHolder>" ; } toByteArray ( java .... | org . junit . Assert . assertArrayEquals ( exp , recv ) |
registerCommandWithKey ( ) { final long key = java . lang . System . currentTimeMillis ( ) ; final org . jrebirth . af . core . command . basic . SwitchFullScreenCommand command = new org . jrebirth . af . core . command . basic . SwitchFullScreenCommand ( ) ; this . commandFacade . register ( command , key ) ; "<Asser... | org . junit . Assert . assertTrue ( this . commandFacade . exists ( org . jrebirth . af . core . command . basic . SwitchFullScreenCommand . class , key ) ) |
testNullLicense ( ) { com . ibm . ws . microprofile . openapi . impl . validation . LicenseValidator validator = com . ibm . ws . microprofile . openapi . impl . validation . LicenseValidator . getInstance ( ) ; com . ibm . ws . microprofile . openapi . test . utils . TestValidationHelper vh = new com . ibm . ws . micr... | org . junit . Assert . assertEquals ( 0 , vh . getEventsSize ( ) ) |
testRenderEntryAndMakeSureMapIsCreated ( ) { java . lang . String stringy = new java . lang . String ( "stringy" ) ; ninja . Result result = new ninja . Result ( 200 ) ; result . render ( "stringy" , stringy ) ; java . util . Map < java . lang . String , java . lang . Object > resultMap = ( ( java . util . Map ) ( resu... | org . junit . Assert . assertEquals ( stringy , resultMap . get ( "stringy" ) ) |
testCase35 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase35 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; } | org . junit . Assert . assertEquals ( 3 , branch_conditions . size ( ) ) |
test_constants_ioc ( ) { java . lang . String s = "@Ioc.get(null,<sp>'xyz')" ; org . nutz . ioc . java . ChainNode cn = org . nutz . ioc . java . ChainParsingTest . N ( s ) ; "<AssertPlaceHolder>" ; } toString ( ) { return toSql ( null ) ; } | org . junit . Assert . assertEquals ( s , cn . toString ( ) ) |
testbuildHttpClientOptions_sslKey_noFactory ( ) { io . vertx . core . http . HttpClientOptions clientOptions = new io . vertx . core . http . HttpClientOptions ( ) ; org . apache . servicecomb . foundation . vertx . VertxTLSBuilder . buildHttpClientOptions ( "notExist" , clientOptions ) ; "<AssertPlaceHolder>" ; } isSs... | org . junit . Assert . assertTrue ( clientOptions . isSsl ( ) ) |
testPerformCheckSitemapPageDoNotFollow ( ) { net . sf . sitemonitoring . entity . Check check = new net . sf . sitemonitoring . entity . Check ( ) ; check . setType ( CheckType . SITEMAP ) ; check . setReturnHttpCode ( 200 ) ; check . setConditionType ( CheckCondition . CONTAINS ) ; check . setCondition ( "</html>" ) ;... | org . junit . Assert . assertNull ( sitemapCheckThread . output ) |
removingElementUsingCopyAndListAPI ( ) { com . baeldung . java . collections . List < java . lang . String > originalList = new com . baeldung . java . collections . ArrayList ( asList ( "zero" , "one" , "two" , "three" ) ) ; com . baeldung . java . collections . List < java . lang . String > listCopy = new com . baeld... | org . junit . Assert . assertEquals ( originalList , asList ( "one" , "two" , "three" ) ) |
test2 ( ) { org . w3c . wai . accessdb . om . product . UAgent u1 = new org . w3c . wai . accessdb . om . product . UAgent ( "Chrome" , "1.0.1.1" ) ; org . w3c . wai . accessdb . om . product . UAgent u2 = new org . w3c . wai . accessdb . om . product . UAgent ( "Chrome" , "1.2.1" ) ; "<AssertPlaceHolder>" ; } equals (... | org . junit . Assert . assertEquals ( u1 . equals ( u2 ) , ( - 1 ) ) |
testVertexTypeUniqueConstraintViolationSetProperty ( ) { "<AssertPlaceHolder>" ; com . puresoltechnologies . ductiledb . core . graph . schema . PropertyDefinition < java . lang . String > definition = new com . puresoltechnologies . ductiledb . core . graph . schema . PropertyDefinition ( com . puresoltechnologies . d... | org . junit . Assert . assertNull ( com . puresoltechnologies . ductiledb . core . graph . schema . DuctileDBSchemaManagerIT . schemaManager . getPropertyDefinition ( ElementType . VERTEX , "property" ) ) |
testLoadSecretsDoesNotExist ( ) { setupSecretInputStream ( ) ; when ( mockS3Client . doesObjectExist ( secretsBucket , secretsKey ) ) . thenReturn ( false ) ; java . util . Properties propSecrets = configuration . loadSecrets ( secretsBucket , secretsKey ) ; "<AssertPlaceHolder>" ; verify ( mockS3Client , times ( 2 ) )... | org . junit . Assert . assertEquals ( null , propSecrets ) |
testSimpleBooleanScript ( ) { boolean result = v8 . executeBooleanScript ( "true" ) ; "<AssertPlaceHolder>" ; } executeBooleanScript ( java . lang . String ) { return executeBooleanScript ( script , null , 0 ) ; } | org . junit . Assert . assertTrue ( result ) |
testExecuteInTransactionReadOnly ( ) { final com . jmethods . catatumbo . entities . StringField entity = new com . jmethods . catatumbo . entities . StringField ( ) ; entity . setName ( "Run<sp>in<sp>read-only<sp>transaction<sp>test" ) ; com . jmethods . catatumbo . entities . StringField entity2 = com . jmethods . ca... | org . junit . Assert . assertEquals ( entity2 , entity3 ) |
testNoError ( ) { setAuthType ( AuthType . AUTO_DETECT ) ; boolean result = checkNoError ( "Authentication_Basic_Connections_Get_My_Communities" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testGetCurrentRenderer ( ) { com . eclipsesource . tabris . internal . ui . RemotePage rootPage = mock ( com . eclipsesource . tabris . internal . ui . RemotePage . class ) ; com . eclipsesource . tabris . internal . ui . PageFlow flow = new com . eclipsesource . tabris . internal . ui . PageFlow ( rootPage ) ; com . e... | org . junit . Assert . assertSame ( currentPage , flow . getCurrentRenderer ( ) ) |
testMatopZonderSpaties ( ) { final java . lang . String voorwaardeRegel = "01.03.10<sp>KD1<sp>(19.89.30-0063)" ; final java . lang . String expressieVerwacht = "Persoon.Geboorte.Datum<sp>E<<sp>VANDAAG()<sp>-<sp>^63/?/?" ; final java . lang . String expressie = converteerNaarExpressieService . converteerVoorwaardeRegel ... | org . junit . Assert . assertEquals ( expressieVerwacht , expressie ) |
testNotEmptyCharSequenceEmptyWithParameter ( ) { try { com . twelvemonkeys . lang . Validate . notEmpty ( "" , "xyzzy" ) ; } catch ( java . lang . IllegalArgumentException e ) { "<AssertPlaceHolder>" ; throw e ; } } contains ( int ) { for ( int i = 0 ; i < ( size ) ; i ++ ) { if ( ( values [ i ] ) == value ) { return t... | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( "xyzzy" ) ) |
hasColumnDefinitionsWithMetadataColumn ( ) { final org . drools . workbench . models . guided . dtable . shared . model . MetadataCol52 metadataCol52 = new org . drools . workbench . models . guided . dtable . shared . model . MetadataCol52 ( ) ; dtPresenter . getModel ( ) . getMetadataCols ( ) . add ( metadataCol52 ) ... | org . junit . Assert . assertTrue ( dtPresenter . hasColumnDefinitions ( ) ) |
testFindByFacilityIdDemogprahicId ( ) { int demographicId1 = 100 ; int demographicId2 = 200 ; int facilityId1 = 111 ; org . oscarehr . common . model . RemoteReferral remoteReferral1 = new org . oscarehr . common . model . RemoteReferral ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDa... | org . junit . Assert . assertTrue ( true ) |
testClass$_String ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
testOverlapRollout ( ) { final com . spotify . helios . common . descriptors . DeploymentGroup deploymentGroup = com . spotify . helios . common . descriptors . DeploymentGroup . newBuilder ( ) . setRolloutOptions ( com . spotify . helios . common . descriptors . RolloutOptions . newBuilder ( ) . setOverlap ( true ) . ... | org . junit . Assert . assertEquals ( expected , tasks ) |
testMatchingForManyToManyEntity ( ) { org . apache . cayenne . map . ObjEntity manyToManyEntity = map . getObjEntity ( "Table1Table2" ) ; "<AssertPlaceHolder>" ; } build ( org . apache . cayenne . map . ObjEntity ) { java . util . ArrayList < org . apache . cayenne . map . ObjRelationship > relationships = new java . u... | org . junit . Assert . assertNotNull ( org . apache . cayenne . dbsync . reverse . dbimport . ManyToManyCandidateEntity . build ( manyToManyEntity ) ) |
asFunction2Function ( ) { com . gs . collections . api . block . function . Function2 < java . lang . Integer , java . lang . Object , java . lang . String > block = com . gs . collections . impl . block . factory . Functions2 . fromFunction ( String :: valueOf ) ; "<AssertPlaceHolder>" ; } value ( java . lang . Intege... | org . junit . Assert . assertEquals ( "1" , block . value ( 1 , null ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.