input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testVelocityIsUnderMax ( ) { com . badlogic . gdx . math . Vector2 velocity = new com . badlogic . gdx . math . Vector2 ( 1.0F , 0.0F ) ; com . rubentxu . juegos . core . modelo . HeroTest . r . setVelocity ( velocity ) ; com . rubentxu . juegos . core . modelo . HeroTest . r . velocityLimit ( ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertEquals ( velocity , com . rubentxu . juegos . core . modelo . HeroTest . r . getVelocity ( ) ) |
testSetUserAgent ( ) { org . wikidata . wdtk . util . WebResourceFetcherImpl . setUserAgent ( "My<sp>user<sp>agent" ) ; "<AssertPlaceHolder>" ; } getUserAgent ( ) { return org . wikidata . wdtk . util . WebResourceFetcherImpl . userAgent ; } | org . junit . Assert . assertEquals ( "My<sp>user<sp>agent" , org . wikidata . wdtk . util . WebResourceFetcherImpl . getUserAgent ( ) ) |
testLoad_ByKeys ( ) { java . util . List < com . jmethods . catatumbo . entities . ParentEntity > entities = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 2 ; i ++ ) { com . jmethods . catatumbo . entities . ParentEntity entity = new com . jmethods . catatumbo . entities . ParentEntity ( ) ; entity . setField... | org . junit . Assert . assertEquals ( entities , loadedEntities ) |
testGetIconFileNameMatrixProject ( ) { hudson . matrix . MatrixProject project = mock ( hudson . matrix . MatrixProject . class ) ; when ( project . hasPermission ( AbstractProject . CONFIGURE ) ) . thenReturn ( true ) ; hudson . plugins . jobConfigHistory . JobConfigHistoryProjectActionTest . JobConfigHistoryProjectAc... | org . junit . Assert . assertEquals ( JobConfigHistoryConsts . ICONFILENAME , action . getIconFileName ( ) ) |
testConverteerDatumTijdWaarde ( ) { final nl . bzk . brp . domain . element . AttribuutElement attribuutElement = getAttribuutElement ( Element . PERSOON_INSCHRIJVING_DATUMTIJDSTEMPEL ) ; final java . lang . String datumTijdStr = "2011-12-03T10:15:30+01:00" ; final java . util . Date datum = nl . bzk . algemeenbrp . ut... | org . junit . Assert . assertEquals ( datum , waardeGeconverteerd ) |
testBBoxFilter ( ) { java . lang . String typeName = org . geotools . arcsde . data . ArcSDEFeatureSourceTest . testData . getTempTableName ( ) ; org . geotools . data . simple . SimpleFeatureSource fs = org . geotools . arcsde . data . ArcSDEFeatureSourceTest . store . getFeatureSource ( typeName ) ; org . opengis . f... | org . junit . Assert . assertTrue ( ( expected > 0 ) ) |
testNotAndDifferentIncludedCriteria ( ) { org . jboss . dmr . ModelNode op = new org . jboss . dmr . ModelNode ( ) ; op . get ( Element . LOOPBACK . getLocalName ( ) ) . set ( true ) ; op . get ( Element . NOT . getLocalName ( ) , Element . INET_ADDRESS . getLocalName ( ) ) . set ( "127.0.0.1" ) ; org . jboss . as . co... | org . junit . Assert . assertNull ( criteria . getFailureMessage ( ) ) |
shouldSupportPrefixedPropertiesThatAreNotPartOfConsumerConfig ( ) { final org . apache . kafka . streams . StreamsConfig streamsConfig = new org . apache . kafka . streams . StreamsConfig ( props ) ; props . put ( org . apache . kafka . streams . StreamsConfig . consumerPrefix ( "interceptor.statsd.host" ) , "host" ) ;... | org . junit . Assert . assertEquals ( "host" , consumerConfigs . get ( "interceptor.statsd.host" ) ) |
testElementaryTypes ( ) { System . out . println ( "testElementaryTypes" ) ; java . lang . String [ ] strings = new java . lang . String [ ] { "aString" , "some-object" , "1243" , "12432141231256" , "12.6" , "12.6" , "true" } ; java . lang . Class < ? > [ ] classes = new java . lang . Class < ? > [ ] { java . lang . St... | org . junit . Assert . assertEquals ( results [ i ] , converter . convertInput ( strings [ i ] , classes [ i ] ) ) |
notStartingWithZero ( ) { java . util . List < de . hu . berlin . wbi . objects . MutationMention > mutationMentions = seth . findMutations ( "This<sp>is<sp>most<sp>likely<sp>correct:<sp>rs1001<sp>" ) ; "<AssertPlaceHolder>" ; } findMutations ( java . lang . String ) { seth . Set < seth . MutationMention > mutations = ... | org . junit . Assert . assertEquals ( mutationMentions . size ( ) , 1 ) |
testBytesToInt ( ) { try { com . bah . culvert . util . Bytes . toInt ( new byte [ ] { 54 } ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException iae ) { } byte [ ] bytes = new byte [ ] { 0 , 0 , 0 , 6 } ; java . lang . Integer i = com . bah . culvert . util . Bytes . toInt ( bytes ) ; ... | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 6 ) ) , i ) |
shouldClearOldInfoWhenSetNew ( ) { snakeEatApple ( ) ; snakeEatApple ( ) ; collector . setInfo ( "qwe" ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; } | org . junit . Assert . assertEquals ( "qwe" , collector . getMessage ( ) ) |
testExceptionMapped ( ) { javax . ws . rs . core . Response response = org . jboss . resteasy . test . providers . custom . ProviderContextInjectionTest . client . target ( generateURL ( "/resource/isRegisteredRuntimeExceptionMapper" ) ) . request ( ) . get ( ) ; "<AssertPlaceHolder>" ; response . close ( ) ; } getStat... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testUnBindAuthenticationConfiguration ( ) { org . apache . jackrabbit . oak . spi . security . authentication . AuthenticationConfiguration ac = org . mockito . Mockito . mock ( org . apache . jackrabbit . oak . spi . security . authentication . AuthenticationConfiguration . class ) ; securityProvider . bindAuthenticat... | org . junit . Assert . assertNull ( securityProvider . getConfiguration ( org . apache . jackrabbit . oak . spi . security . authentication . AuthenticationConfiguration . class ) ) |
testDefer ( ) { java . util . List < java . lang . Integer > list = new java . util . ArrayList ( ) ; org . apache . aries . component . dsl . internal . UpdateSupport . runUpdate ( ( ) -> { list . add ( 1 ) ; org . apache . aries . component . dsl . internal . UpdateSupport . defer ( ( ) -> list . add ( 3 ) ) ; list .... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 1 , 2 , 3 ) , list ) |
testDeleteAllIfThereAreMoreThanMaxChildren ( ) { com . github . davidmoten . rtree . Entry < java . lang . Object , com . github . davidmoten . rtree . geometry . Rectangle > e1 = com . github . davidmoten . rtree . RTreeTest . e ( 1 ) ; int count = com . github . davidmoten . rtree . RTree . maxChildren ( 4 ) . create... | org . junit . Assert . assertEquals ( 0 , count ) |
testGetByIdWhenNoneFound ( ) { kewTypeBoService . setDataObjectService ( mockDataObjectService ) ; when ( mockDataObjectService . find ( any ( java . lang . Class . class ) , any ( java . lang . String . class ) ) ) . thenReturn ( org . kuali . rice . kew . impl . repository . KewTypeBoServiceImplTest . TEST_KEW_TYPE_A... | org . junit . Assert . assertNull ( testDefn ) |
testAddForTeamIdClusterPathStatus ( ) { long teamId = 5 ; com . xiaomi . shepher . common . Status status = com . xiaomi . shepher . common . Status . AGREE ; java . lang . String cluster = "local_test" ; java . lang . String path = "/test" ; boolean addResult = permissionService . add ( teamId , cluster , path , statu... | org . junit . Assert . assertEquals ( true , addResult ) |
shouldWaitUntilReturnValueOfConditionIsNotNull ( ) { when ( mockClock . laterBy ( 0L ) ) . thenReturn ( 2L ) ; when ( mockClock . isNowBefore ( 2L ) ) . thenReturn ( true ) ; when ( mockCondition . apply ( mockDriver ) ) . thenReturn ( null , org . openqa . selenium . support . ui . FluentWaitTest . ARBITRARY_VALUE ) ;... | org . junit . Assert . assertEquals ( org . openqa . selenium . support . ui . FluentWaitTest . ARBITRARY_VALUE , wait . until ( mockCondition ) ) |
testFunctions ( ) { final org . apache . flink . table . client . gateway . local . ExecutionContext < ? > context = createDefaultExecutionContext ( ) ; final org . apache . flink . table . api . TableEnvironment tableEnv = context . createEnvironmentInstance ( ) . getTableEnvironment ( ) ; final java . lang . String [... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
downloadSegmentedObject ( ) { org . javaswift . joss . model . Container container = account . getContainer ( "segment_container" ) . create ( ) ; org . javaswift . joss . model . StoredObject someOtherObject = container . getObject ( "ignore-this" ) ; someOtherObject . uploadObject ( uploadBytes ) ; org . javaswift . ... | org . junit . Assert . assertArrayEquals ( uploadBytes , object . downloadObject ( ) ) |
invertTwiceShouldNotModifyTheDirection ( ) { for ( org . mafagafogigante . dungeon . game . Direction direction : org . mafagafogigante . dungeon . game . Direction . values ( ) ) { "<AssertPlaceHolder>" ; } } invert ( ) { return org . mafagafogigante . dungeon . game . Direction . values ( ) [ ( ( ( ordinal ( ) ) + ( ... | org . junit . Assert . assertEquals ( direction , direction . invert ( ) . invert ( ) ) |
testCase1 ( ) { com . cronutils . model . time . ExecutionTime et = com . cronutils . model . time . ExecutionTime . forCron ( parser . parse ( "0<sp>0<sp>12<sp>31<sp>12<sp>?<sp>*" ) ) ; java . util . Optional < java . time . ZonedDateTime > olast = et . lastExecution ( currentDateTime ) ; java . time . ZonedDateTime l... | org . junit . Assert . assertEquals ( expected , last ) |
giveBusinessAny_whenFireRule_thenCorrectDiscount ( ) { com . baeldung . drools . model . Customer customer = new com . baeldung . drools . model . Customer ( com . baeldung . drools . model . Customer . CustomerType . BUSINESS , 0 ) ; kSession . insert ( customer ) ; kSession . fireAllRules ( ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertEquals ( customer . getDiscount ( ) , 20 ) |
testV8ArrayHandlerExceptionDuringCreation ( ) { com . eclipsesource . v8 . ReferenceHandler referenceHandler = mock ( com . eclipsesource . v8 . ReferenceHandler . class ) ; doThrow ( new java . lang . RuntimeException ( ) ) . when ( referenceHandler ) . v8HandleCreated ( any ( com . eclipsesource . v8 . V8Object . cla... | org . junit . Assert . assertEquals ( 0 , v8 . getObjectReferenceCount ( ) ) |
isEmailLabelRendered_EmailEmpty ( ) { user . setEmail ( "<sp>" ) ; "<AssertPlaceHolder>" ; } isEmailLabelRendered ( ) { return ! ( isEmailInputRendered ( ) ) ; } | org . junit . Assert . assertFalse ( user . isEmailLabelRendered ( ) ) |
testOr ( ) { "<AssertPlaceHolder>" ; } or ( org . dayatang . domain . QueryCriterion [ ] ) { return org . dayatang . domain . Criteria . BUILDER . or ( criteria ) ; } | org . junit . Assert . assertEquals ( other , instance . or ( other ) ) |
normalizeToNfc_differentPrecomposedCharacterAndCombiningMark ( ) { final char [ ] sequence_ab = new char [ ] { 7691 , 803 } ; final char [ ] sequence_cd = new char [ ] { 7693 , 775 } ; final char [ ] normalized_ab = textNormalizer . normalizeToNfc ( sequence_ab ) ; final char [ ] normalized_cd = textNormalizer . normal... | org . junit . Assert . assertThat ( normalized_ab , org . hamcrest . CoreMatchers . equalTo ( normalized_cd ) ) |
namedIdFieldShouldExtractValueFromUnderscoreIdField ( ) { org . bson . Document document = new org . bson . Document ( ) . append ( "_id" , "A" ) . append ( "id" , "B" ) ; org . springframework . data . mongodb . core . convert . MappingMongoConverterUnitTests . ClassWithNamedIdField withNamedIdField = converter . read... | org . junit . Assert . assertThat ( withNamedIdField . id , is ( "A" ) ) |
testDomainMarkerIndices ( ) { org . jfree . data . xy . XYDataset dataset = new org . jfree . data . xy . XYSeriesCollection ( ) ; org . jfree . chart . axis . NumberAxis xAxis = new org . jfree . chart . axis . NumberAxis ( "X" ) ; org . jfree . chart . axis . NumberAxis yAxis = new org . jfree . chart . axis . Number... | org . junit . Assert . assertTrue ( plot . getDomainMarkers ( 99 , Layer . FOREGROUND ) . contains ( xMarker1 ) ) |
testCompGraphInputReuse ( ) { org . nd4j . linalg . factory . Nd4j . setDefaultDataTypes ( DataType . DOUBLE , DataType . DOUBLE ) ; int inputSize = 5 ; int outputSize = 6 ; int layerSize = 3 ; org . deeplearning4j . nn . graph . ComputationGraphConfiguration conf = new org . deeplearning4j . nn . graph . NeuralNetConf... | org . junit . Assert . assertTrue ( gradOK ) |
shouldSortPluginsWithNoDependency ( ) { given ( pluginAccessor . getPlugin ( "testPlugin1" ) ) . willReturn ( plugin1 ) ; given ( pluginAccessor . getPlugin ( "testPlugin2" ) ) . willReturn ( plugin2 ) ; given ( pluginAccessor . getPlugin ( "testPlugin3" ) ) . willReturn ( plugin3 ) ; given ( pluginAccessor . getPlugin... | org . junit . Assert . assertEquals ( 4 , sortedPlugins . size ( ) ) |
testPermMap ( ) { com . gentics . mesh . core . rest . user . UserResponse group = new com . gentics . mesh . core . rest . user . UserResponse ( ) ; group . getPermissions ( ) . setOthers ( false ) ; group . getPermissions ( ) . set ( com . gentics . mesh . util . READ , true ) ; group . getPermissions ( ) . setCreate... | org . junit . Assert . assertNotNull ( group . toJson ( ) ) |
testDatatypeValue111 ( ) { java . lang . String init = "insert<sp>data<sp>{" + ( ( "graph<sp>us:g1<sp>{<sp><Jack><sp>rdf:value<sp>1,<sp>1.0,<sp>01,<sp>'1'^^xsd:long,<sp>'01'^^xsd:byte,<sp>1e0,<sp>2<sp>}" + "graph<sp>us:g2<sp>{<sp><Jack><sp>rdf:value<sp>1,<sp>1.0,<sp>01,<sp>'1'^^xsd:long,<sp>'01'^^xsd:byte,<sp>1e0,<sp>2... | org . junit . Assert . assertEquals ( 12 , g . size ( ) ) |
deleteByLabel ( ) { org . candlepin . model . ConsumerContentOverride cco1 = new org . candlepin . model . ConsumerContentOverride ( consumer , "test-content" , "name1" , "value" ) ; consumerContentOverrideCurator . create ( cco1 ) ; org . candlepin . model . ConsumerContentOverride cco2 = new org . candlepin . model .... | org . junit . Assert . assertEquals ( ccoList . size ( ) , 0 ) |
retrieveAndValidateUserTestUserIsFound ( ) { org . mockito . Mockito . doReturn ( userVoMock ) . when ( userDaoMock ) . getUser ( org . mockito . Mockito . anyLong ( ) ) ; com . cloud . user . UserVO receivedUser = accountManagerImpl . retrieveAndValidateUser ( UpdateUserCmdMock ) ; "<AssertPlaceHolder>" ; } retrieveAn... | org . junit . Assert . assertEquals ( userVoMock , receivedUser ) |
testAddTransformation ( ) { org . walkmod . commands . AddTransformationCommand command = new org . walkmod . commands . AddTransformationCommand ( "imports-cleaner" , null , false , null , null , null , null , false ) ; java . io . File file = new java . io . File ( "src/test/resources/yaml/addtransformation.yml" ) ; ... | org . junit . Assert . assertEquals ( desiredOutput , output ) |
testThreadSafetyDuringParallelConsumption ( ) { int numThreads = 10 ; int maxVariation = 100 ; int numElements = 10000 ; java . util . function . Supplier < org . jooq . lambda . Seq < java . lang . Integer > > s = ( ) -> org . jooq . lambda . Seq . range ( 0 , numElements ) ; org . jooq . lambda . SeqBuffer < java . l... | org . junit . Assert . assertEquals ( expectedList , testThread . actualList ) |
terminal_operation_findany ( ) { java . util . Optional < java . lang . String > val = java . util . stream . Stream . of ( "one" , "two" ) . findAny ( ) ; "<AssertPlaceHolder>" ; } get ( ) { com . levelup . java . util . OptionalExample . Framework framework = new com . levelup . java . util . OptionalExample . Framew... | org . junit . Assert . assertEquals ( "one" , val . get ( ) ) |
shouldCreateNonEmptyModelWhenSomeGroupsAreAbstract ( ) { final ro . isdc . wro . model . WroModel model = loadModelFromLocation ( "shouldCreateNonEmptyModelWhenSomeGroupsAreAbstract.xml" ) ; "<AssertPlaceHolder>" ; } getGroups ( ) { return java . util . Collections . unmodifiableSet ( groups ) ; } | org . junit . Assert . assertEquals ( 2 , model . getGroups ( ) . size ( ) ) |
equal_shouldReturnFalseIfObjectIsNull ( ) { org . openmrs . CohortMembership cohortMembership = new org . openmrs . CohortMembership ( 12 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org . openmrs . ConceptSearchResult ) ) { return fals... | org . junit . Assert . assertFalse ( cohortMembership . equals ( null ) ) |
testNegateCounts ( ) { org . apache . crunch . PCollection < java . lang . String > data = org . apache . crunch . impl . mem . MemPipeline . typedCollectionOf ( strings ( ) , "a" , "a" , "a" , "b" , "b" ) ; java . util . Map < java . lang . String , java . lang . Long > actual = com . spotify . crunch . lib . SPTables... | org . junit . Assert . assertEquals ( expected , actual ) |
handleInactiveNode_nodeIsNotHandled ( ) { com . vaadin . flow . component . UI ui = new com . vaadin . flow . component . UI ( ) ; createRpcInvocationData ( ui , ( elem ) -> { elem . setVisible ( false ) ; elem . getNode ( ) . updateActiveState ( ) ; } ) ; "<AssertPlaceHolder>" ; } updateActiveState ( ) { setInactive (... | org . junit . Assert . assertNull ( handler . node ) |
shouldEchoTextFrameWithPayloadLength125 ( ) { org . kaazing . netx . URLConnectionHelper helper = org . kaazing . netx . URLConnectionHelper . newInstance ( ) ; java . net . URI location = java . net . URI . create ( "ws://localhost:8080/path" ) ; org . kaazing . netx . ws . WsURLConnection connection = ( ( org . kaazi... | org . junit . Assert . assertEquals ( writeString , readString ) |
kapuaNotifyPayloadConstructor ( ) { org . eclipse . kapua . message . device . lifecycle . KapuaUnmatchedPayload kapuaUnmatchedPayload = new org . eclipse . kapua . message . internal . device . lifecycle . KapuaUnmatchedPayloadImpl ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( kapuaUnmatchedPayload ) |
getIotHubStatusCodeMapsInternalServerErrorCorrectly ( ) { final int httpsStatus = 500 ; com . microsoft . azure . sdk . iot . device . IotHubStatusCode testStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . getIotHubStatusCode ( httpsStatus ) ; final com . microsoft . azure . sdk . iot . device ... | org . junit . Assert . assertThat ( testStatus , org . hamcrest . CoreMatchers . is ( expectedStatus ) ) |
getContentType_A$ ( ) { java . lang . String url = "https://github.com/m3dev" ; com . m3 . curly . Request request = new com . m3 . curly . Request ( url ) ; byte [ ] body = "abc" . getBytes ( ) ; java . lang . String contentType = "text/plain" ; request . setBody ( body , contentType ) ; "<AssertPlaceHolder>" ; } getC... | org . junit . Assert . assertThat ( request . getContentType ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( contentType ) ) ) |
testBuildNewURI_1 ( ) { java . lang . String suffix = "http://absolute-url.fr" ; "<AssertPlaceHolder>" ; } buildNewURI ( java . net . URI , java . lang . String ) { if ( uriSuffix == null ) throw new java . lang . IllegalArgumentException ( "The<sp>URI<sp>suffix<sp>cannot<sp>be<sp>null." ) ; uriSuffix = uriSuffix . rep... | org . junit . Assert . assertEquals ( new java . net . URI ( suffix ) , net . roboconf . core . utils . UriUtils . buildNewURI ( null , suffix ) ) |
redirectInAndRedirectOutOperator ( ) { org . aesh . tty . TestConnection connection = new org . aesh . tty . TestConnection ( ) ; org . aesh . command . registry . CommandRegistry registry = org . aesh . command . impl . registry . AeshCommandRegistryBuilder . builder ( ) . command ( org . aesh . command . operator . C... | org . junit . Assert . assertEquals ( "FOO<sp>BAR" , output . get ( 0 ) ) |
testReset ( ) { httpResponseProviderIgnoreAdditionalHeaders = new com . github . kristofa . test . http . DefaultHttpResponseProvider ( false ) ; httpResponseProviderIgnoreAdditionalHeaders . set ( httpRequest , httpResponse ) ; httpResponseProviderIgnoreAdditionalHeaders . reset ( ) ; final com . github . kristofa . t... | org . junit . Assert . assertSame ( httpResponse , httpResponseProviderIgnoreAdditionalHeaders . getResponse ( requestWithAdditionalParam ) ) |
shouldEstablishConnectionWithRequestHeaderSecWebSocketExtensions ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . kaazing . gateway . transport . test . Expectations ( ) { { oneOf ( handler... | org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) ) |
testFloatToStringToBigNumberWithFloatLimitValues ( ) { org . pentaho . di . core . row . ValueMetaInterface numValueMeta = new org . pentaho . di . core . row . ValueMeta ( "i" , ValueMetaInterface . TYPE_BIGNUMBER ) ; numValueMeta . setDecimalSymbol ( "." ) ; numValueMeta . setGroupingSymbol ( "," ) ; ( ( org . pentah... | org . junit . Assert . assertEquals ( values [ i ] , stringToBigNumber ) |
testGetAccessUrl_DIRECT_ContainsBaseUrl ( ) { org . oscm . internal . subscriptions . POSubscription subscription = new org . oscm . internal . subscriptions . POSubscription ( new org . oscm . internal . vo . VOSubscription ( ) ) ; subscription . setServiceAccessType ( ServiceAccessType . DIRECT ) ; subscription . set... | org . junit . Assert . assertEquals ( "base_url" , accessUrl ) |
testHasDifferenceInParameters_DifferenceInFont ( ) { final com . igormaznitsa . mindmap . swing . panel . MindMapPanelConfig one = new com . igormaznitsa . mindmap . swing . panel . MindMapPanelConfig ( ) ; final com . igormaznitsa . mindmap . swing . panel . MindMapPanelConfig two = new com . igormaznitsa . mindmap . ... | org . junit . Assert . assertTrue ( one . hasDifferenceInParameters ( two ) ) |
testAnotherPatterns2 ( ) { org . apache . storm . utils . Utils prevUtils = null ; try { org . apache . storm . utils . Utils mockedUtil = mock ( org . apache . storm . utils . Utils . class ) ; prevUtils = org . apache . storm . utils . Utils . setInstance ( mockedUtil ) ; when ( mockedUtil . hostname ( ) ) . thenRetu... | org . junit . Assert . assertEquals ( expected , searchResult ) |
shouldIdentifyEnumsFromSuperClass ( ) { final org . pitest . mutationtest . engine . gregor . ClassInfo testee = new org . pitest . mutationtest . engine . gregor . ClassInfo ( 0 , 0 , "foo" , "" , "java/lang/Enum" , null ) ; "<AssertPlaceHolder>" ; } isEnum ( ) { return this . superName . equals ( "java/lang/Enum" ) ;... | org . junit . Assert . assertTrue ( testee . isEnum ( ) ) |
testGetObject ( ) { final java . lang . String key = "object" ; java . lang . Object result1 = cache . get ( key , new java . util . concurrent . Callable < java . lang . Object > ( ) { @ com . baidu . unbiz . fluentvalidator . support . Override public java . lang . Object call ( ) throws com . baidu . unbiz . fluentv... | org . junit . Assert . assertEquals ( result1 , result2 ) |
testChar ( ) { wrapper . writeChar ( 'a' ) ; "<AssertPlaceHolder>" ; } readChar ( ) { if ( ActiveMQRALogger . LOGGER . isTraceEnabled ( ) ) { ActiveMQRALogger . LOGGER . trace ( "readChar()" ) ; } return ( ( javax . jms . StreamMessage ) ( message ) ) . readChar ( ) ; } | org . junit . Assert . assertEquals ( 'a' , wrapper . readChar ( ) ) |
checkLoggedInDeniedForAnonymous ( ) { try { securedClass . checkLoggedIn ( ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . deltaspike . security . api . authorization . AccessDeniedException e ) { "<AssertPlaceHolder>" ; } } checkLoggedIn ( ) { if ( ! ( isLoggedIn ( ) ) ) { throw new org . zanata . excep... | org . junit . Assert . assertTrue ( true ) |
areControlActProcessFieldsNullWhenQueryIdNull ( ) { boolean result ; org . hl7 . v3 . PRPAIN201305UV02 oRequest = new org . hl7 . v3 . PRPAIN201305UV02 ( ) ; org . hl7 . v3 . PRPAIN201305UV02QUQIMT021001UV01ControlActProcess controlActProcess = new org . hl7 . v3 . PRPAIN201305UV02QUQIMT021001UV01ControlActProcess ( ) ... | org . junit . Assert . assertTrue ( result ) |
systemDiagnosticAll ( ) { populateSystemDiagnostics ( ) ; java . lang . String statusRequest = "systemDiagnostics:garbagecollection,<sp>heap,<sp>processorstats,<sp>contentrepositoryusage,<sp>flowfilerepositoryusage" ; org . apache . nifi . minifi . commons . status . FlowStatusReport actual = org . apache . nifi . mini... | org . junit . Assert . assertEquals ( expected , actual ) |
testCreateDBOperation ( ) { de . akquinet . jbosscc . needle . db . DatabaseTestcaseConfiguration configuration = new de . akquinet . jbosscc . needle . db . DatabaseTestcaseConfiguration ( de . akquinet . jbosscc . needle . configuration . PropertyBasedConfigurationFactory . get ( ) ) ; de . akquinet . jbosscc . needl... | org . junit . Assert . assertTrue ( ( operation instanceof de . akquinet . jbosscc . needle . db . operation . ExecuteScriptOperation ) ) |
testAskConstraintOnInvalidDataset ( ) { won . protocol . validation . WonSparqlValidator validator = new won . protocol . validation . WonSparqlValidator ( askConstraint ) ; boolean valid = validator . validate ( createMessageDatasetInvalid ) . isValid ( ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return valid ; } | org . junit . Assert . assertTrue ( ( ! valid ) ) |
testDontAlterEmbedding ( ) { org . gradoop . flink . model . impl . operators . matching . common . query . predicates . CNF predicates = predicateFromQuery ( "MATCH<sp>(a),(b)<sp>WHERE<sp>a.age<sp>><sp>b.age" ) ; org . gradoop . common . model . impl . properties . PropertyValue [ ] propertiesA = new org . gradoop . c... | org . junit . Assert . assertEquals ( embedding , filter . evaluate ( ) . collect ( ) . get ( 0 ) ) |
testGetLayerSync ( ) { try { java . lang . String jsonString = com . simplegeo . client . SimpleGeoStorageClientTest . client . getLayer ( "casey.testing.layer" ) ; com . simplegeo . client . types . Layer layer = com . simplegeo . client . types . Layer . fromJSONString ( jsonString ) ; "<AssertPlaceHolder>" ; } catch... | org . junit . Assert . assertEquals ( "casey.testing.layer" , layer . getName ( ) ) |
testDeleteDocument ( ) { qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestDocumentResourceFacadeImp . entityManager . getTransaction ( ) . begin ( ) ; qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestDocumentResourceFacadeImp . documentDTO = qa . qcri . aidr . dbmanager . ejb . remote . ... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , deleteDocCount ) |
testCreateConnectionAsSystemAdmin ( ) { org . apache . qpid . jms . JmsConnectionFactory factory = new org . apache . qpid . jms . JmsConnectionFactory ( getBrokerAmqpConnectionURI ( ) ) ; factory . setUsername ( "system" ) ; factory . setPassword ( "manager" ) ; connection = factory . createConnection ( ) ; "<AssertPl... | org . junit . Assert . assertNotNull ( connection ) |
getDefaultSSLCertificateCreator ( ) { "<AssertPlaceHolder>" ; } getDefaultSSLCertificateCreator ( ) { org . junit . Assert . assertTrue ( "Was<sp>not<sp>the<sp>expected<sp>KeytoolSSLCertificateCreator<sp>instance" , ( ( com . ibm . ws . crypto . certificateutil . DefaultSSLCertificateFactory . getDefaultSSLCertificateC... | org . junit . Assert . assertTrue ( "Was<sp>not<sp>the<sp>expected<sp>KeytoolSSLCertificateCreator<sp>instance" , ( ( com . ibm . ws . crypto . certificateutil . DefaultSSLCertificateFactory . getDefaultSSLCertificateCreator ( ) ) instanceof com . ibm . ws . crypto . certificateutil . keytool . KeytoolSSLCertificateCre... |
givenRestRuntime_whenCreateCalled_thenRestRuntimeOptionsReturned ( ) { givenRuntime ( ) ; rest . RestRuntimeOptions runtimeOptions = runtimeOptionsFactory . create ( ) ; "<AssertPlaceHolder>" ; } create ( ) { return new rest . RestRuntimeOptions ( runtimeOptionsFactory . create ( ) ) ; } | org . junit . Assert . assertNotNull ( runtimeOptions ) |
testExchangeAdapterInitialisesSuccessfully ( ) { org . powermock . api . easymock . PowerMock . replayAll ( ) ; final com . gazbert . bxbot . exchanges . GeminiExchangeAdapter exchangeAdapter = new com . gazbert . bxbot . exchanges . GeminiExchangeAdapter ( ) ; exchangeAdapter . init ( exchangeConfig ) ; "<AssertPlaceH... | org . junit . Assert . assertNotNull ( exchangeAdapter ) |
testObjectEnum ( ) { final cz . habarta . typescript . generator . Settings settings = cz . habarta . typescript . generator . TestUtils . settings ( ) ; final java . lang . String output = new cz . habarta . typescript . generator . TypeScriptGenerator ( settings ) . generateTypeScript ( cz . habarta . typescript . ge... | org . junit . Assert . assertEquals ( expected . trim ( ) , output . trim ( ) ) |
testNieuwKindHeeftDezelfdeSamengesteldeNaamAlsKind3EnDezelfdeDatumGeboorteAlsKind1 ( ) { final nl . bzk . brp . model . bericht . kern . PersoonSamengesteldeNaamGroepBericht samengesteldeNaamGeborene = new nl . bzk . brp . model . bericht . kern . PersoonSamengesteldeNaamGroepBericht ( ) ; samengesteldeNaamGeborene . s... | org . junit . Assert . assertTrue ( berichtEntiteits . isEmpty ( ) ) |
testBadKeyAlias ( ) { java . util . Map < java . lang . String , java . lang . String > overrides = getOverridesForEncryption ( ) ; overrides . put ( ( ( ( EncryptionConfiguration . ENCRYPTION_PREFIX ) + "." ) + ( EncryptionConfiguration . ACTIVE_KEY ) ) , "invalid" ) ; channel = org . apache . flume . channel . file .... | org . junit . Assert . assertFalse ( channel . isOpen ( ) ) |
complex1 ( ) { com . querydsl . sql . QSurvey survey = new com . querydsl . sql . QSurvey ( "survey" ) ; com . querydsl . sql . QEmployee emp1 = new com . querydsl . sql . QEmployee ( "emp1" ) ; com . querydsl . sql . QEmployee emp2 = new com . querydsl . sql . QEmployee ( "emp2" ) ; com . querydsl . sql . dml . SQLIns... | org . junit . Assert . assertEquals ( 0 , insert . execute ( ) ) |
injectAutowiredAnnotation ( ) { context = new org . springframework . context . support . ClassPathXmlApplicationContext ( "applicationContext.xml" ) ; org . cdisource . springintegration . springsupport . ApplicationContextLocatorImpl . putContext ( context ) ; org . cdisource . springintegration . SpringBeanUsingAuto... | org . junit . Assert . assertNotNull ( bean ) |
testNoServiceImport ( ) { env . put ( ToolConstants . CFG_WSDLURL , getLocation ( "/wsdl2java_wsdl/helloworld_noservice_import.wsdl" ) ) ; processor . setContext ( env ) ; processor . execute ( ) ; java . lang . Class < ? > cls = classLoader . loadClass ( "org.apache.cxf.w2j.hello_world1.Greeter" ) ; "<AssertPlaceHolde... | org . junit . Assert . assertNotNull ( cls ) |
testSetNotExistingSelection1 ( ) { org . eclipse . gef . cloudio . internal . ui . TagCloud cloud = new org . eclipse . gef . cloudio . internal . ui . TagCloud ( composite , org . eclipse . swt . SWT . NONE ) ; java . util . List < org . eclipse . gef . cloudio . internal . ui . Word > words = new java . util . ArrayL... | org . junit . Assert . assertTrue ( selection . isEmpty ( ) ) |
testDelete ( ) { prefsvc . removeRecipientDelivererConfigs ( "user1" ) ; "<AssertPlaceHolder>" ; } getDeliverersForRecipient ( java . lang . String ) { org . kuali . rice . core . api . criteria . QueryByCriteria . Builder criteria = QueryByCriteria . Builder . create ( ) ; criteria . setPredicates ( equal ( RecipientD... | org . junit . Assert . assertEquals ( 0 , prefsvc . getDeliverersForRecipient ( "user1" ) . size ( ) ) |
testBigDecimal ( ) { int objectNumber = 3000 ; org . eclipse . birt . data . engine . olap . data . util . BufferedRandomAccessFile file = new org . eclipse . birt . data . engine . olap . data . util . BufferedRandomAccessFile ( new java . io . File ( ( ( ( org . eclipse . birt . data . engine . olap . data . util . B... | org . junit . Assert . assertEquals ( file . readBigDecimal ( ) , new java . math . BigDecimal ( ( "1010101010101010101010" + i ) ) ) |
testArrayGetArrayChangeValue ( ) { com . eclipsesource . v8 . V8Array array = v8 . executeArrayScript ( "foo<sp>=<sp>[];<sp>foo" ) ; v8 . executeVoidScript ( "foo[0]<sp>=<sp>[1,2,3]" ) ; com . eclipsesource . v8 . V8Array array1 = array . getArray ( 0 ) ; "<AssertPlaceHolder>" ; array . close ( ) ; array1 . close ( ) ;... | org . junit . Assert . assertEquals ( 3 , array1 . length ( ) ) |
testDifference ( ) { org . opengis . filter . FilterFactory ff = org . geotools . factory . CommonFactoryFinder . getFilterFactory ( null ) ; java . util . Date d1 = new java . util . Date ( ) ; java . util . Date d2 = new java . util . Date ( ( ( d1 . getTime ( ) ) + 10 ) ) ; org . opengis . filter . expression . Func... | org . junit . Assert . assertEquals ( 10 , function . evaluate ( null , org . geotools . filter . function . Integer . class ) , 0.0 ) |
testGetObjectMessageReturnsOnlyObjectMessage ( ) { final java . lang . String destinationId = "Destination.Queue" ; final java . lang . Long serializableObject = new java . lang . Long ( 21L ) ; javax . jms . TextMessage textMessage = org . easymock . EasyMock . createMock ( javax . jms . TextMessage . class ) ; javax ... | org . junit . Assert . assertEquals ( serializableObject , messageObject ) |
crmClassFoundInCache ( ) { final java . lang . String aClassThatIsInCache = cut . crm2AliadaClasses . keySet ( ) . iterator ( ) . next ( ) ; final java . lang . String expectedResult = cut . crm2AliadaClasses . get ( aClassThatIsInCache ) ; "<AssertPlaceHolder>" ; verifyZeroInteractions ( dao ) ; } getAliadaClassFrom (... | org . junit . Assert . assertEquals ( expectedResult , cut . getAliadaClassFrom ( aClassThatIsInCache ) ) |
testGetGranulationValue ( ) { System . out . println ( "getGranulationValue" ) ; kg . apc . charting . AbstractGraphRow instance = new kg . apc . charting . AbstractGraphRowTest . AbstractGraphRowImpl ( ) ; int expResult = 0 ; int result = instance . getGranulationValue ( ) ; "<AssertPlaceHolder>" ; } println ( java . ... | org . junit . Assert . assertEquals ( expResult , result ) |
testGenerateDefaultConfigurationForSchemaWithFixedType ( ) { java . nio . file . Path schemaPath = java . nio . file . Paths . get ( java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( "generation/schemaWithFixedType.json" ) . toURI ( ) ) ; org . kaaproject . kaa . server . common . cor... | org . junit . Assert . assertTrue ( generatedConfigurationGenericRecord . equals ( expectedGeneratedConfigurationGenericRecord ) ) |
testFindByUsername ( ) { com . hantsylab . example . ee7 . blog . domain . model . User userByUsername = users . findByUsername ( com . hantsylab . example . ee7 . blog . arqtest . UserRepositoryTest . USERNAME ) ; "<AssertPlaceHolder>" ; } findByUsername ( java . lang . String ) { java . util . List < com . hantsylab ... | org . junit . Assert . assertNotNull ( userByUsername ) |
testBundleNoMatch ( ) { addRule ( ElementType . BUNDLE ) . setExcludes ( "*" ) ; final org . jacoco . report . check . BundleChecker checker = new org . jacoco . report . check . BundleChecker ( rules , names , this ) ; checker . checkBundle ( createBundle ( ) ) ; "<AssertPlaceHolder>" ; } createBundle ( ) { final org ... | org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , messages ) |
testGetContents1 ( ) { nl . siegmann . epublib . domain . Book book = new nl . siegmann . epublib . domain . Book ( ) ; nl . siegmann . epublib . domain . Resource resource1 = new nl . siegmann . epublib . domain . Resource ( "id1" , "Hello,<sp>world<sp>!" . getBytes ( ) , "chapter1.html" , nl . siegmann . epublib . se... | org . junit . Assert . assertEquals ( 1 , book . getContents ( ) . size ( ) ) |
isValid_ReturnsFalse_WhenOutputTokenList_ContainsAListMember ( ) { software . amazon . awssdk . codegen . model . service . PaginatorDefinition paginatorDefinition = new software . amazon . awssdk . codegen . model . service . PaginatorDefinition ( ) ; paginatorDefinition . setOutputToken ( java . util . Arrays . asLis... | org . junit . Assert . assertFalse ( paginatorDefinition . isValid ( ) ) |
testHasPendingChanges ( ) { "<AssertPlaceHolder>" ; } hasPendingChanges ( ) { return false ; } | org . junit . Assert . assertFalse ( root . hasPendingChanges ( ) ) |
testEnum ( ) { java . lang . String input = "/**<sp>@enum<sp>{string}<sp>*/<sp>var<sp>foo<sp>=<sp>{BAR:<sp>'baz'};" ; com . google . javascript . rhino . Node root = com . google . javascript . refactoring . MatchersTest . compileToScriptRoot ( com . google . javascript . refactoring . MatchersTest . getCompiler ( inpu... | org . junit . Assert . assertTrue ( com . google . javascript . refactoring . Matchers . enumDefinition ( ) . matches ( enumNode , null ) ) |
end2endTest ( ) { java . util . UUID generatedUUID = com . openpojo . random . RandomFactory . getRandomValue ( java . util . UUID . class ) ; "<AssertPlaceHolder>" ; } getRandomValue ( java . lang . Class ) { if ( com . openpojo . random . thread . GeneratedRandomValues . contains ( type ) ) { com . openpojo . random ... | org . junit . Assert . assertNotNull ( generatedUUID ) |
testSecondDomainLevelCookieMatch ( ) { org . apache . ogt . http . impl . cookie . BasicClientCookie cookie = new org . apache . ogt . http . impl . cookie . BasicClientCookie ( "name" , null ) ; cookie . setDomain ( ".sourceforge.net" ) ; cookie . setAttribute ( ClientCookie . DOMAIN_ATTR , cookie . getDomain ( ) ) ; ... | org . junit . Assert . assertFalse ( cookiespec . match ( cookie , origin ) ) |
testFindCoffee ( ) { final org . springframework . context . ApplicationContext context = new org . springframework . context . support . ClassPathXmlApplicationContext ( "/META-INF/spring/integration/spring-integration-context.xml" , org . springframework . integration . CoffeeServiceFindAllTest . class ) ; final org ... | org . junit . Assert . assertTrue ( ( ( coffeeBeverages . size ( ) ) == 4 ) ) |
getCohort_shouldGetCohortGivenAName ( ) { executeDataSet ( org . openmrs . api . CohortServiceTest . COHORT_XML ) ; org . openmrs . Cohort cohortToGet = org . openmrs . api . CohortServiceTest . service . getCohortByName ( "Example<sp>Cohort" ) ; "<AssertPlaceHolder>" ; } getCohortId ( ) { return cohortId ; } | org . junit . Assert . assertTrue ( ( ( cohortToGet . getCohortId ( ) ) == 2 ) ) |
testGetIterations ( ) { org . hipparchus . optim . nonlinear . vector . leastsquares . LeastSquaresProblem lsp = base ( ) . target ( new double [ ] { 1 } ) . weight ( new org . hipparchus . linear . DiagonalMatrix ( new double [ ] { 1 } ) ) . start ( new double [ ] { 3 } ) . model ( new org . hipparchus . optim . nonli... | org . junit . Assert . assertTrue ( ( ( optimum . getIterations ( ) ) > 0 ) ) |
read_file_array_list_guava ( ) { java . util . List < java . lang . String > teams = com . google . common . io . Files . readLines ( worldSeriesWinners . toFile ( ) , Charsets . UTF_8 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 10 , teams . size ( ) ) |
testServerSchemaInvalidLocale ( ) { final java . lang . String localeValue = "localeXYZ" ; java . lang . Object [ ] params = new java . lang . String [ ] { null , null , null , localeValue } ; try { java . util . Map < java . lang . String , java . lang . Object > returnedMap = invokeGenerateServerSchema ( params ) ; }... | org . junit . Assert . assertTrue ( true ) |
readNullEnumAsOrdinal ( ) { es . ieci . tecdoc . fwktd . server . dao . ibatis . sqlmap . client . extensions . ValuedEnumTypeHandlerCallback < es . ieci . fwktd . server . dao . ibatis . sqlmap . client . extensions . MockValuedEnum > callback = new es . ieci . tecdoc . fwktd . server . dao . ibatis . sqlmap . client ... | org . junit . Assert . assertNull ( result ) |
testBuildExpressionParser ( ) { java . lang . String source = "200" 4 ; expect ( point . apply ( "2" , "200" 0 ) ) . andReturn ( "200" 3 ) ; expect ( plus . apply ( "200" 2 , "200" 3 ) ) . andReturn ( "3.3" ) ; expect ( percent . apply ( "30" ) ) . andReturn ( "200" 7 ) ; expect ( subtract . apply ( "3.3" , "200" 7 ) )... | org . junit . Assert . assertEquals ( "-58.0" , parser ( ) . parse ( source ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.