input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testStatusCode ( ) { org . apache . edgent . providers . direct . DirectProvider ep = new org . apache . edgent . providers . direct . DirectProvider ( ) ; org . apache . edgent . topology . Topology topology = ep . newTopology ( ) ; java . lang . String url = "http://httpbin.org/status/" ; org . apache . edgent . topo... | org . junit . Assert . assertTrue ( endCondition . valid ( ) ) |
returnNullWithClusterAuthorizationFailure ( ) { final org . apache . kafka . clients . admin . NewTopic newTopic = org . apache . kafka . connect . util . TopicAdmin . defineTopic ( "myTopic" ) . partitions ( 1 ) . compacted ( ) . build ( ) ; org . apache . kafka . common . Cluster cluster = createCluster ( 1 ) ; try (... | org . junit . Assert . assertFalse ( created ) |
testEvaluateCompletionStatus ( ) { final java . lang . String completionStatus = uk . ac . ed . ph . jqtiplus . QtiConstants . COMPLETION_STATUS_COMPLETED ; itemSessionState . setCompletionStatus ( completionStatus ) ; final uk . ac . ed . ph . jqtiplus . value . Value lookup = itemProcessingController . evaluateVariab... | org . junit . Assert . assertEquals ( itemSessionState . getCompletionStatusValue ( ) , lookup ) |
testShouldSendEmailToAdminWithProperSubjectAndBody ( ) { org . hisp . dhis . dxf2 . metadata . feedback . ImportReport importReport = mock ( org . hisp . dhis . dxf2 . metadata . feedback . ImportReport . class ) ; metadataSyncSummary . setImportReport ( importReport ) ; metadataSyncSummary . getImportReport ( ) . setS... | org . junit . Assert . assertFalse ( status ) |
testEmptyTestSet ( ) { final org . tap4j . model . TestSet testSet = new org . tap4j . model . TestSet ( ) ; "<AssertPlaceHolder>" ; } getTestResult ( java . lang . Integer ) { org . tap4j . model . TestResult foundTestResult = null ; for ( org . tap4j . model . TestResult testResult : this . testResults ) { if ( testR... | org . junit . Assert . assertNull ( testSet . getTestResult ( 1 ) ) |
getSubscriptionForManagers_BrokerManger_Authorized ( ) { java . lang . reflect . Method method = beanClass . getMethod ( "getSubscriptionsForManagers" ) ; boolean isBrokerManagerRoleAllowed = isRoleAllowed ( method , UserRoleType . BROKER_MANAGER ) ; "<AssertPlaceHolder>" ; } isRoleAllowed ( java . lang . reflect . Met... | org . junit . Assert . assertTrue ( isBrokerManagerRoleAllowed ) |
testSkipCurrentAndParentDir ( ) { ch . cyberduck . core . Path directory = new ch . cyberduck . core . Path ( "/" , java . util . EnumSet . of ( Path . Type . directory ) ) ; java . lang . String [ ] replies = new java . lang . String [ ] { "type=dir;size=512;modify=20150115041252;create=20150115041212;perm=cdeflmp;<sp... | org . junit . Assert . assertEquals ( 2 , children . size ( ) ) |
testH10 ( ) { double [ ] input = new double [ ] { 1.1 , 2.2 , 3.3 } ; java . lang . String result = org . terasoluna . gfw . web . el . Functions . h ( input ) ; "<AssertPlaceHolder>" ; } h ( java . lang . Object ) { return org . terasoluna . gfw . web . util . HtmlEscapeUtils . htmlEscape ( input ) ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( java . util . Arrays . toString ( ( ( double [ ] ) ( input ) ) ) ) ) |
testMultiRuntimeException ( ) { java . util . List < java . lang . Throwable > list = new java . util . ArrayList < java . lang . Throwable > ( ) ; list . add ( new java . lang . RuntimeException ( "This<sp>is<sp>test<sp>exception<sp>1" ) ) ; list . add ( new java . lang . RuntimeException ( "This<sp>is<sp>test<sp>exce... | org . junit . Assert . assertNotNull ( mre . getMessage ( ) ) |
testToCharacterArrayNull ( ) { java . lang . String input = null ; java . lang . Character [ ] ch = org . apache . olingo . odata2 . jpa . processor . core . access . data . JPAEntityParser . toCharacterArray ( input ) ; "<AssertPlaceHolder>" ; } toCharacterArray ( java . lang . String ) { if ( input == null ) { return... | org . junit . Assert . assertNull ( ch ) |
shouldGetMultipleResultSetsWithOneStatement ( ) { org . apache . ibatis . session . SqlSession sqlSession = org . apache . ibatis . submitted . multiple_resultsets . MultipleResultTest . sqlSessionFactory . openSession ( ) ; try { org . apache . ibatis . submitted . multiple_resultsets . Mapper mapper = sqlSession . ge... | org . junit . Assert . assertEquals ( 2 , usersAndGroups . size ( ) ) |
testSerialization ( ) { java . lang . String [ ] tickLabels = new java . lang . String [ ] { "One" , "Two" , "Three" } ; org . jfree . chart . axis . SymbolAxis a1 = new org . jfree . chart . axis . SymbolAxis ( "Test<sp>Axis" , tickLabels ) ; org . jfree . chart . axis . SymbolAxis a2 = ( ( org . jfree . chart . axis ... | org . junit . Assert . assertEquals ( a1 , a2 ) |
trueNumberGreaterEqualsFilterTest ( ) { final boolean parser = parser ( "notification/data-changed-notification/data-change-event/data/toasterStatus>=0" , "data_change_notification_toaster_status_NUMBER.xml" ) ; "<AssertPlaceHolder>" ; } parser ( java . lang . String , java . lang . String ) { java . io . File xml = nu... | org . junit . Assert . assertTrue ( parser ) |
createMethodAlwaysUseUserChoosenMethod ( ) { org . apache . camel . http . common . HttpMethods method = org . apache . camel . http . common . HttpHelper . createMethod ( createExchangeWithOptionalHttpQueryAndHttpMethodHeader ( "q=camel" , HttpMethods . POST ) , createHttpEndpoint ( true , "http://www.google.com/searc... | org . junit . Assert . assertEquals ( HttpMethods . POST , method ) |
testEntityNameThrowingException ( ) { com . sap . core . odata . api . uri . info . GetEntitySetUriInfo resultsView = org . easymock . EasyMock . createMock ( com . sap . core . odata . api . uri . info . GetEntitySetUriInfo . class ) ; com . sap . core . odata . api . edm . EdmEntitySet entitySet = org . easymock . Ea... | org . junit . Assert . assertTrue ( true ) |
peek_Hit ( ) { cache . put ( org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . KEY , org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . VALUE ) ; statistics ( ) . putCount . expect ( 1 ) . expectAllZero ( ) ; "<AssertPlaceHolder>" ; statistics ( ) . getCount . expe... | org . junit . Assert . assertNotNull ( cache . peek ( org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . KEY ) ) |
textSummaryTest ( ) { java . lang . String text = org . oscarehr . e2e . model . export . body . LabsModelTest . labsModel . getTextSummary ( ) ; "<AssertPlaceHolder>" ; } getTextSummary ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ( familyHistory . getFamilyHistory ( ) . getObserva... | org . junit . Assert . assertNotNull ( text ) |
testToDeployConfiguration_projectId ( ) { when ( preferences . get ( eq ( DeployPreferences . PREF_PROJECT_ID ) , anyString ( ) ) ) . thenReturn ( "projectid" ) ; com . google . cloud . tools . appengine . configuration . DeployConfiguration configuration = com . google . cloud . tools . eclipse . appengine . deploy . ... | org . junit . Assert . assertThat ( configuration . getProjectId ( ) , org . hamcrest . CoreMatchers . is ( "projectid" ) ) |
testGetCloneEmpty ( ) { createWorkspace ( SimpleMetaStore . DEFAULT_WORKSPACE_NAME ) ; java . lang . String workspaceId = getWorkspaceId ( workspaceLocation ) ; org . json . JSONArray clonesArray = listClones ( workspaceId , null ) ; "<AssertPlaceHolder>" ; } listClones ( java . lang . String , org . eclipse . core . r... | org . junit . Assert . assertEquals ( 0 , clonesArray . length ( ) ) |
testLabelProvider_1 ( ) { net . certware . argument . eur . navigator . LabelProvider result = new net . certware . argument . eur . navigator . LabelProvider ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( result ) |
ShouldGetBaseType ( ) { org . atomhopper . jdbc . query . PostgreSQLTextArray array = new org . atomhopper . jdbc . query . PostgreSQLTextArray ( multiEntry ) ; "<AssertPlaceHolder>" ; } getBaseType ( ) { return java . sql . Types . VARCHAR ; } | org . junit . Assert . assertEquals ( array . getBaseType ( ) , java . sql . Types . VARCHAR ) |
testSymbolOnlySentence ( ) { org . chasen . mecab . Node node = mockNodeListFactory ( new java . lang . String [ ] { "!@#$%^&*()\tSY,*,*,*,*,*,*,*" } ) ; com . github . bibreen . mecab_ko_lucene_analyzer . TokenGenerator generator = new com . github . bibreen . mecab_ko_lucene_analyzer . TokenGenerator ( new com . gith... | org . junit . Assert . assertEquals ( null , tokens ) |
enableWhenWithAnswer ( ) { org . hl7 . fhir . r4 . model . Questionnaire resource = new org . hl7 . fhir . r4 . model . Questionnaire ( ) ; resource . setStatus ( Enumerations . PublicationStatus . ACTIVE ) ; org . hl7 . fhir . r4 . model . Questionnaire . QuestionnaireItemComponent child1 = createItem ( QuestionnaireI... | org . junit . Assert . assertTrue ( result . isSuccessful ( ) ) |
testIsCompatible5c ( ) { com . milaboratory . mixcr . basictypes . ClonalSequence c1 = create ( "AA" , "AA" ) ; com . milaboratory . mixcr . basictypes . ClonalSequence c2 = create ( "AAAAA" , "AAAAA" ) ; com . milaboratory . core . mutations . Mutations < com . milaboratory . core . sequence . NucleotideSequence > mut... | org . junit . Assert . assertTrue ( c1 . isCompatible ( c2 , mutations ) ) |
validationOfDifferentNamespacesPrefixSuccess ( ) { java . lang . String roomWithValidNamespaces = "<?xml<sp>version='1.0'<sp>encoding='UTF-8'?>" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<sp><meta:properties>" 1 http : org . apache . olingo . odata2 . api . edm . EdmEntitySet entitySet = org . apache . olingo . odata2 . tes... | org . junit . Assert . assertNotNull ( result ) |
invalidParametersGroupByEmpty ( ) { org . talend . dataprep . transformation . aggregation . api . AggregationParameters parameters = new org . talend . dataprep . transformation . aggregation . api . AggregationParameters ( ) ; parameters . setDatasetId ( "dataset#7568" ) ; parameters . addGroupBy ( "0002" ) ; java . ... | org . junit . Assert . assertEquals ( 1 , constraintViolations . size ( ) ) |
testGetDataRepeated ( ) { int numFields = 8 ; int numValues = 3 ; int numPartitions = 120 ; int size = 0 ; org . cubedb . core . Cube cube = new org . cubedb . core . CubeImpl ( "ts" ) ; for ( int i = 0 ; i < numPartitions ; i ++ ) { java . util . List < org . cubedb . core . beans . DataRow > data = org . cubedb . uti... | org . junit . Assert . assertEquals ( ( ( numValues * numFields ) + numPartitions ) , result . size ( ) ) |
testCreateSystemUser ( ) { autosaveMgr . createSystemUser ( "u" , null ) ; "<AssertPlaceHolder>" ; verify ( mgrDlg , times ( 1 ) ) . createSystemUser ( "u" , null ) ; verify ( autosaveMgr , times ( 1 ) ) . autosave ( ) ; } hasPendingChanges ( ) { return base . hasPendingChanges ( ) ; } | org . junit . Assert . assertFalse ( root . hasPendingChanges ( ) ) |
testEqualsObjectNotOFPFlowActionCopyTtlIn ( ) { boolean result = target . equals ( "String" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . o3project . odenos . remoteobject . event . EventSubscription ) ) { return false ; } org . o3... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
getMatchingLinesOfTextShouldFindCorrectLineWhenAllOnOneLineWithExtraTextBeforeAndAfter ( ) { final java . util . List < net . usikkert . kouchat . android . util . Line > lines = net . usikkert . kouchat . android . util . RobotiumTestUtils . getMatchingLinesOfText ( "[17:02:41]<sp>***<sp>Tina<sp>aborted<sp>reception<s... | org . junit . Assert . assertEquals ( 1 , lines . size ( ) ) |
testApplyTransforms_ou_kar ( ) { java . util . List < java . lang . Integer > glyphsAfterGsub = java . util . Arrays . asList ( 108 , 91 , 114 , 94 ) ; java . util . List < java . lang . Integer > result = gsubWorkerForBengali . applyTransforms ( getGlyphIds ( "" ) ) ; "<AssertPlaceHolder>" ; } getGlyphIds ( java . lan... | org . junit . Assert . assertEquals ( glyphsAfterGsub , result ) |
removeAttribute ( ) { java . lang . String name = "name" ; this . validate ( ( session ) -> session . removeAttribute ( name ) ) ; org . wildfly . clustering . web . session . SessionManager < org . wildfly . clustering . web . undertow . session . LocalSessionContext , org . wildfly . clustering . ee . Batch > manager... | org . junit . Assert . assertSame ( expected , result ) |
testConvertRawValueInvalidType ( ) { java . lang . Object expectedValue = java . lang . Double . valueOf ( "1000.05" ) ; java . lang . Object rawValue = java . lang . Double . valueOf ( "1000.05" ) ; com . thinkbiganalytics . policy . standardization . SimpleRegexReplacer regexReplacer = new com . thinkbiganalytics . p... | org . junit . Assert . assertEquals ( expectedValue , regexReplacer . convertRawValue ( rawValue ) ) |
testDiscriminateP1 ( ) { org . drugis . addis . plot . Line unexpected = new org . drugis . addis . plot . Line ( 15 , 20 , 30 , 40 ) ; java . awt . geom . Line2D actual = new java . awt . geom . Line2D . Double ( 10 , 20 , 30 , 40 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj instanceof com ... | org . junit . Assert . assertTrue ( ( ! ( unexpected . equals ( actual ) ) ) ) |
properyNamesV6 ( ) { org . everit . json . schema . loader . ObjectSchema actual = ( ( org . everit . json . schema . loader . ObjectSchema ) ( org . everit . json . schema . loader . TestSupport . loadAsV6 ( org . everit . json . schema . loader . ObjectSchemaLoaderTest . get ( "propertyNames" ) ) ) ) ; "<AssertPlaceH... | org . junit . Assert . assertNotNull ( actual . getPropertyNameSchema ( ) ) |
calculate_leap_year_in_java_with_joda ( ) { org . joda . time . DateTime dateTime = new org . joda . time . DateTime ( ) ; boolean isLeapYear = dateTime . withYear ( 2007 ) . year ( ) . isLeap ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( isLeapYear ) |
parses_file_correctly ( ) { try { changelogs = parser . parse ( this . getClass ( ) . getResourceAsStream ( "changelog" ) ) ; "<AssertPlaceHolder>" ; } catch ( org . redline_rpm . changelog . ChangelogParseException e ) { org . junit . Assert . fail ( "parses<sp>file<sp>correctly" ) ; } catch ( java . io . IOException ... | org . junit . Assert . assertEquals ( "parses<sp>file<sp>correctly" , 10 , changelogs . size ( ) ) |
testLocaleAndLibraryWithVersionAndResourceWithSubfolderAndVersion ( ) { org . ops4j . pax . web . resources . jsf . JsfResourceQuery query = new org . ops4j . pax . web . resources . jsf . JsfResourceQuery ( "iceland" , "library" , "img/resource.png" , null ) ; java . util . Optional < org . ops4j . pax . web . resourc... | org . junit . Assert . assertTrue ( result . isPresent ( ) ) |
indicatorsPatternDoesntMatch ( ) { final org . marc4j . marc . Record record = newRecord ( eu . aliada . rdfizer . pipeline . format . marc . selector . binary . A_VARIABLE_FIELD_NAME , '1' , '2' , 'a' , "A<sp>value" ) ; final java . lang . String [ ] unmatchingPatterns = new java . lang . String [ ] { "?3" , "#?" , "#... | org . junit . Assert . assertNull ( expression . evaluate ( record ) ) |
testGetLongBEPlainJava ( ) { for ( int i = 0 ; i < ( ( bytes . length ) - 7 ) ; i ++ ) { long expected = byteBufferBE . getLong ( i ) ; long value = primitiveArrayUtilsSafe . getLongBE ( bytes , i ) ; "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertEquals ( expected , value ) |
serialization ( ) { final java . lang . String key = "key" ; org . mule . runtime . api . store . ObjectStore < org . mule . runtime . core . internal . el . datetime . DateTime > os = muleContext . getObjectStoreManager ( ) . createObjectStore ( "DateTimeTestCase" , unmanagedPersistent ( ) ) ; try { os . store ( key ,... | org . junit . Assert . assertEquals ( now , recovered ) |
testReturnTypeNativeAccessAfterParameterTypeEnhancementFromEnhancedClass ( ) { org . jboss . forge . furnace . addons . AddonRegistry registry = org . jboss . forge . arquillian . services . LocalServices . getFurnace ( getClass ( ) . getClassLoader ( ) ) . getAddonRegistry ( ) ; java . lang . ClassLoader thisLoader = ... | org . junit . Assert . assertNotNull ( value ) |
shouldRegisterAndRetrieveComplexTypeHandler ( ) { org . apache . ibatis . type . TypeHandler < java . util . List < java . net . URI > > fakeHandler = new org . apache . ibatis . type . TypeHandler < java . util . List < java . net . URI > > ( ) { public void setParameter ( java . sql . PreparedStatement ps , int i , j... | org . junit . Assert . assertSame ( fakeHandler , typeHandlerRegistry . getTypeHandler ( type ) ) |
shouldNotHaveNextIfInitialStateIsNotAcceptedAndHasNoTransitions ( ) { dk . brics . automaton . State initialStateWithoutTranstions = new dk . brics . automaton . State ( ) ; com . mifmif . common . regex . GenerexIterator iterator = new com . mifmif . common . regex . GenerexIterator ( initialStateWithoutTranstions ) ;... | org . junit . Assert . assertThat ( hasNext , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( false ) ) ) |
testBug48616b ( ) { getTomcatInstanceTestWebapp ( false , true ) ; java . lang . Exception e = null ; try { getUrl ( ( ( "http://localhost:" + ( getPort ( ) ) ) + "/test/bug48nnn/bug48616b.jsp" ) ) ; } catch ( java . io . IOException ioe ) { e = ioe ; } "<AssertPlaceHolder>" ; } getPort ( ) { return tomcat . getConnect... | org . junit . Assert . assertNull ( e ) |
canSkipOverImmutable1 ( ) { byte [ ] input = "{\"x\":1,\"a\":2}" . getBytes ( "UTF-8" ) ; com . dslplatform . json . SkippingTest . SingleImmutable s = dslJson . deserialize ( com . dslplatform . json . SkippingTest . SingleImmutable . class , input , input . length ) ; "<AssertPlaceHolder>" ; } deserialize ( java . la... | org . junit . Assert . assertEquals ( 1 , s . x ) |
givenValidImage_getInputFormatNameBeforeRead ( ) { java . awt . image . BufferedImage sourceImage = javax . imageio . ImageIO . read ( new java . io . File ( "test-resources/Thumbnailator/grid.png" ) ) ; net . coobird . thumbnailator . tasks . io . BufferedImageSource source = new net . coobird . thumbnailator . tasks ... | org . junit . Assert . assertEquals ( "Input<sp>has<sp>not<sp>been<sp>read<sp>yet." , e . getMessage ( ) ) |
matchesCanBeSaved ( ) { org . mockito . Mockito . doNothing ( ) . when ( mockObject ) . validateForUpdate ( ) ; boolean result = matcher . matchesSafely ( mockObject ) ; "<AssertPlaceHolder>" ; } matchesSafely ( T extends com . webobjects . eocontrol . EOEnterpriseObject ) { com . webobjects . eocontrol . EOEditingCont... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) ) |
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 ( friendlyURLEntries . isEmpty ( ) ) |
testUpdate ( ) { com . mongodb . DBCollection coll = createMockCollection ( ) ; com . mongodb . DBCursor cursor = createMockCursor ( ) ; com . mongodb . DBObject query = new com . mongodb . BasicDBObject ( "_id" , new org . bson . types . ObjectId ( "aaaaaaaaaaaaaaaaaaaaaaa2" ) ) ; com . mongodb . DBObject dbObj = new ... | org . junit . Assert . assertEquals ( newTd , store . update ( "aaaaaaaaaaaaaaaaaaaaaaa2" , newTd ) ) |
shouldSkipLoginUrl ( ) { filter . setSkipSecurityFilter ( "/fakelogin" ) ; request . setRequestURI ( "/fakelogin" ) ; filter . doFilter ( request , response , chain ) ; "<AssertPlaceHolder>" ; } getRequest ( ) { return request ; } | org . junit . Assert . assertSame ( request , chain . getRequest ( ) ) |
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 ( uadPartialEntries . isEmpty ( ) ) |
testTeVeelHaakjes ( ) { final java . lang . String voorwaardeRegel = "01.03.10<sp>KD1<sp>(19.89.30<sp>-<sp>0063)" ; final java . lang . String expressieVerwacht = "JAAR(geboorte.datum)<sp><<sp>JAAR(VANDAAG()<sp>-<sp>^63/0/0)" ; final java . lang . String expressie = converteerNaarExpressieService . converteerVoorwaarde... | org . junit . Assert . assertEquals ( expressieVerwacht , expressie ) |
testNoMergedRegionsIsEmptyList ( ) { org . apache . poi . ss . usermodel . Workbook wb = _testDataProvider . createWorkbook ( ) ; org . apache . poi . ss . usermodel . Sheet sheet = wb . createSheet ( ) ; "<AssertPlaceHolder>" ; wb . close ( ) ; } getMergedRegions ( ) { java . util . List < org . apache . poi . ss . ut... | org . junit . Assert . assertTrue ( sheet . getMergedRegions ( ) . isEmpty ( ) ) |
testSplitDeletedRegion ( ) { org . apache . hadoop . hbase . regionserver . wal . TestHLogSplit . regions . removeAll ( org . apache . hadoop . hbase . regionserver . wal . TestHLogSplit . regions ) ; java . lang . String region = "region_that_splits" ; org . apache . hadoop . hbase . regionserver . wal . TestHLogSplit... | org . junit . Assert . assertFalse ( fs . exists ( regiondir ) ) |
testDecodeOtherType ( ) { java . lang . String str = "Meep!" ; ch . writeInbound ( str ) ; "<AssertPlaceHolder>" ; } readInbound ( ) { io . netty . channel . RecvByteBufAllocator . Handle handle = unsafe ( ) . recvBufAllocHandle ( ) ; handle . reset ( config ( ) ) ; io . netty . channel . ChannelPipeline pipeline = pip... | org . junit . Assert . assertThat ( ch . readInbound ( ) , org . hamcrest . core . Is . is ( ( ( java . lang . Object ) ( str ) ) ) ) |
shouldParseExpressionMatcher ( ) { java . lang . String scriptFragment = "${<sp>byteArray<sp>}" ; org . kaazing . k3po . lang . internal . parser . ScriptParserImpl parser = new org . kaazing . k3po . lang . internal . parser . ScriptParserImpl ( ) ; org . kaazing . k3po . lang . internal . ast . matcher . AstExpressio... | org . junit . Assert . assertEquals ( expected , actual ) |
testColumnPruning ( ) { generateInputData ( ) ; org . apache . crunch . Pipeline pipeline = new org . apache . crunch . impl . mr . MRPipeline ( org . apache . crunch . io . orc . OrcFileSourceTargetIT . class , conf ) ; int [ ] readColumns = new int [ ] { 0 , 1 } ; org . apache . crunch . io . orc . OrcFileSource < or... | org . junit . Assert . assertEquals ( com . google . common . collect . Lists . newArrayList ( expected ) , result ) |
testNan ( ) { org . apache . commons . math4 . geometry . euclidean . twod . Cartesian2D c = org . apache . commons . math4 . geometry . euclidean . twod . Cartesian2D . NaN ; java . lang . String expected = "{(NaN);<sp>(NaN)}" ; java . lang . String actual = vector2DFormat . format ( c ) ; "<AssertPlaceHolder>" ; } fo... | org . junit . Assert . assertEquals ( expected , actual ) |
test ( ) { final delight . nashornsandbox . NashornSandbox sandbox = delight . nashornsandbox . NashornSandboxes . create ( ) ; final java . lang . Object res = sandbox . eval ( "var<sp>x<sp>=<sp>1<sp>+<sp>1;<sp>x;" ) ; "<AssertPlaceHolder>" ; } eval ( java . lang . String ) { return eval ( js , null , null ) ; } | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 2 ) , res ) |
createDynamicModule ( ) { com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . reflections . ReflectionsScanner . class , de . devsurf . injection . guice . scanner ... | org . junit . Assert . assertNotNull ( injector ) |
testTanhDefinition ( ) { double [ ] epsilon = new double [ ] { 3.0E-16 , 5.0E-16 , 7.0E-16 , 3.0E-15 , 2.0E-14 } ; for ( int maxOrder = 0 ; maxOrder < 5 ; ++ maxOrder ) { for ( double x = 0.1 ; x < 1.2 ; x += 0.001 ) { org . apache . commons . math4 . analysis . differentiation . DerivativeStructure dsX = new org . apa... | org . junit . Assert . assertEquals ( 0 , zero . getPartialDerivative ( n ) , epsilon [ n ] ) |
findAllTest ( ) { java . util . List < sample . springboot . mybatis . groovymapper . service . Member > members = memberMapper . findAll ( ) ; sample . springboot . mybatis . groovymapper . SpringDemoApplicationTests . log . debug ( "members<sp>:<sp>{}" , members ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( members . size ( ) , is ( 2 ) ) |
testEmptyBufferWithoutBOM ( ) { final byte [ ] data = new byte [ ] { } ; try ( final java . io . InputStream in = new org . apache . commons . io . input . BOMInputStream ( createUtf8DataStream ( data , false ) ) ) { final byte [ ] buf = new byte [ 1024 ] ; "<AssertPlaceHolder>" ; } } read ( char [ ] ) { return chars =... | org . junit . Assert . assertEquals ( ( - 1 ) , in . read ( buf ) ) |
extractMessageAttachments ( ) { javax . mail . Message message = org . apache . hupa . server . utils . TestUtils . createMockMimeMessage ( session , 2 ) ; java . util . List < javax . mail . BodyPart > parts = org . apache . hupa . server . utils . MessageUtils . extractMessageAttachments ( logger , message . getConte... | org . junit . Assert . assertEquals ( 2 , parts . size ( ) ) |
testGetMissingChdsFilesWithEmptyRomPath ( ) { org . tibennetwork . iarcade . mame . FakeMameRuntime mame = new org . tibennetwork . iarcade . mame . FakeMameRuntime ( ) ; java . util . List < java . io . InputStream > inputStreams = new java . util . ArrayList ( ) ; inputStreams . add ( new java . io . FileInputStream ... | org . junit . Assert . assertThat ( missingFiles , org . hamcrest . CoreMatchers . equalTo ( expectedMissingFiles ) ) |
provenanceReportingTaskStatusBulletins ( ) { populateReportingTask ( true , false ) ; java . lang . String statusRequest = "provenanceReporting:bulletins" ; org . apache . nifi . minifi . commons . status . FlowStatusReport actual = org . apache . nifi . minifi . status . StatusConfigReporter . getStatus ( mockFlowCont... | org . junit . Assert . assertEquals ( expected , actual ) |
metricNullNameCounter ( ) { org . apache . edgent . test . metrics . MetricsCommonTest . Context < java . lang . Object , java . lang . Object > ctx = new org . apache . edgent . test . metrics . MetricsCommonTest . Context < > ( ) ; org . apache . edgent . metrics . oplets . CounterOp < java . lang . Object > op = new... | org . junit . Assert . assertNull ( op . getMetricName ( ) ) |
testDoNotRefineUnknownScopes ( ) { java . lang . String expected = "project" ; org . eclipse . aether . graph . DependencyNode node = parseLiteral ( "gid:aid:ver<sp>unknownScope" ) ; node . setRequestContext ( "project" ) ; org . eclipse . aether . graph . DependencyNode refinedNode = transform ( node ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( expected , refinedNode . getRequestContext ( ) ) |
testParseActionNull ( ) { target = new org . o3project . odenos . core . component . network . flow . query . FlowActionOutputQuery ( null ) ; "<AssertPlaceHolder>" ; } parse ( ) { if ( ! ( super . parse ( ) ) ) { return false ; } if ( ! ( org . o3project . odenos . core . component . network . BasicQuery . checkMapExa... | org . junit . Assert . assertThat ( target . parse ( ) , org . hamcrest . CoreMatchers . is ( false ) ) |
addLastLenTest5 ( ) { org . krakenapps . pcap . util . Buffer buffer = initBuffer4 ( ) ; org . krakenapps . pcap . util . Buffer buffer4 = new org . krakenapps . pcap . util . ChainBuffer ( ) ; byte [ ] testArray13 = new byte [ ] { 71 , 72 , 73 , 74 , 75 , 76 } ; byte [ ] testArray14 = new byte [ ] { 77 , 78 , 79 } ; b... | org . junit . Assert . assertEquals ( expected , buffer . get ( ) ) |
testDisjointPolygons ( ) { org . hipparchus . geometry . euclidean . twod . Vector2D [ ] [ ] vertices = new org . hipparchus . geometry . euclidean . twod . Vector2D [ ] [ ] { new org . hipparchus . geometry . euclidean . twod . Vector2D [ ] { new org . hipparchus . geometry . euclidean . twod . Vector2D ( 0.0 , 1.0 ) ... | org . junit . Assert . assertEquals ( Region . Location . INSIDE , set . checkPoint ( new org . hipparchus . geometry . euclidean . twod . Vector2D ( 1.0 , 1.5 ) ) ) |
getHeader ( ) { headers . set ( HttpHeaders . CONTENT_TYPE , "json" ) ; "<AssertPlaceHolder>" ; } getHeader ( java . lang . String ) { if ( ( headerMap ) == null ) { return null ; } return headerMap . get ( name ) ; } | org . junit . Assert . assertEquals ( "json" , response . getHeader ( HttpHeaders . CONTENT_TYPE ) ) |
serializeReplyWithJoynrRuntimeExceptionWithCause ( ) { io . joynr . exceptions . JoynrRuntimeException error = new io . joynr . exceptions . JoynrRuntimeException ( "detail<sp>message:<sp>JoynrRuntimeExceptionWithCause" , new java . io . IOException ( "cause<sp>message" ) ) ; System . out . println ( ( "error:<sp>" + e... | org . junit . Assert . assertEquals ( reply , receivedReply ) |
testDescendantsCreatedUntil ( ) { long start = java . lang . System . currentTimeMillis ( ) ; activity = createActivity ( ( "ActivityDescendantsCreatedUntil-" + start ) ) ; java . util . List < com . ibm . sbt . services . client . connections . activities . ActivityNode > nodes = createActivityDescendants ( activity )... | org . junit . Assert . assertEquals ( 2 , activityNodes . size ( ) ) |
nativeTypesDate ( ) { java . util . Date now = new java . util . Date ( ) ; java . lang . Object result = getJsonManager ( ) . convertToNativeType ( now ) ; "<AssertPlaceHolder>" ; } convertToNativeType ( java . lang . Object ) { if ( originalObject == null ) { return null ; } if ( ( ( ( ( ( ( ( ( ( ( ( originalObject ... | org . junit . Assert . assertEquals ( now , result ) |
stableOrderOfAttributes_2 ( ) { org . eclipse . xtext . util . MergeableManifest2 manifest = newManifest ( ( ( ( ( ( ( ( ( ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) + "Name:<sp>a" ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "a2:<sp>2" ) + ( org . eclipse . xtext . util . ... | org . junit . Assert . assertEquals ( ( ( ( ( ( ( ( ( ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) + "Name:<sp>a" ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "a2:<sp>2" ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "a1:<sp>1" ) + ( org . eclipse . xt... |
testModifyTicketAddHostNullHost ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyAddAccess ( ticketId , TicketModifyAddOrRemoveTypeEnum . TICKET_MODIFY_HOST , null ) ; "<AssertPlaceHolder>" ; } instanceForModifyAddAccess ... | org . junit . Assert . assertNotNull ( pi ) |
testExecute_cdh ( ) { org . talend . core . model . properties . Property propertyCDH = PropertiesFactory . eINSTANCE . createProperty ( ) ; org . talend . core . model . process . IProcess2 processCDH = new org . talend . designer . core . ui . editor . process . Process ( propertyCDH ) ; org . talend . core . model .... | org . junit . Assert . assertEquals ( newElemCDH . getElementParameter ( "USE_KRB" ) . getValue ( ) , true ) |
testConstructorObjectId ( ) { org . apache . cayenne . ObjectId oid = org . apache . cayenne . ObjectId . of ( "MockDataObject" , "a" , "b" ) ; org . apache . cayenne . query . ObjectIdQuery query = new org . apache . cayenne . query . ObjectIdQuery ( oid ) ; "<AssertPlaceHolder>" ; } getObjectId ( ) { return objectId ... | org . junit . Assert . assertSame ( oid , query . getObjectId ( ) ) |
shouldReportProgressOnSingleExecution ( ) { org . neo4j . unsafe . impl . batchimport . Configuration config = config ( ) ; org . neo4j . unsafe . impl . batchimport . staging . CoarseBoundedProgressExecutionMonitorTest . ProgressExecutionMonitor progressExecutionMonitor = new org . neo4j . unsafe . impl . batchimport ... | org . junit . Assert . assertEquals ( total , progressExecutionMonitor . getProgress ( ) ) |
testGetAclId ( ) { for ( org . sagebionetworks . repo . model . AccessControlList acl : aclList ) { java . lang . String id = acl . getId ( ) ; java . lang . Long aclId = aclDAO . getAclId ( id , ObjectType . ENTITY ) ; org . sagebionetworks . repo . model . AccessControlList acl2 = aclDAO . get ( aclId ) ; "<AssertPla... | org . junit . Assert . assertEquals ( acl , acl2 ) |
testGetPropertyStatus ( ) { org . apache . jackrabbit . oak . api . Tree a = root . getTree ( "/a" ) ; for ( java . lang . String propName : hiddenProps ) { "<AssertPlaceHolder>" ; } } getPropertyStatus ( java . lang . String ) { beforeRead ( ) ; return super . getPropertyStatus ( name ) ; } | org . junit . Assert . assertNull ( a . getPropertyStatus ( propName ) ) |
testLoadClassWithPackage ( ) { org . osgi . service . component . ComponentContext cc = mockery . mock ( org . osgi . service . component . ComponentContext . class ) ; com . ibm . ws . serialization . internal . SerializationServiceImpl service = new com . ibm . ws . serialization . internal . SerializationServiceImpl... | org . junit . Assert . assertSame ( java . util . List . class , service . loadClass ( java . util . List . class . getName ( ) ) ) |
disabledRepository ( ) { try { disabledRepository . findAll ( ) ; org . junit . Assert . fail ( "Should<sp>have<sp>been<sp>failed<sp>because<sp>DisabledRepository<sp>was<sp>disabled" ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } } findAll ( ) { return context . applyRestrictions ( entityM... | org . junit . Assert . assertNotNull ( e ) |
testGetProjectId_onlyProject ( ) { testMojo . project = "someProject" ; java . lang . String projectId = testMojo . getProjectId ( ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( mockLog ) . warn ( "Configuring<sp><project><sp>is<sp>deprecated,<sp>use<sp><projectId><sp>to<sp>set<sp>your<sp>Google<sp>Clou... | org . junit . Assert . assertEquals ( "someProject" , projectId ) |
testHandleEventForShellClosedEventWithModifyingListener ( ) { org . eclipse . swt . events . ShellListener shellListener = new org . eclipse . swt . events . ShellAdapter ( ) { @ org . eclipse . swt . widgets . Override public void shellClosed ( org . eclipse . swt . events . ShellEvent e ) { e . doit = false ; } } ; o... | org . junit . Assert . assertFalse ( event . doit ) |
testGetGroup1 ( ) { org . netbeans . modules . gradle . api . GradleTask instance = new org . netbeans . modules . gradle . api . GradleTask ( ":run" , "application" , "run" , "" ) ; java . lang . String expResult = "application" ; java . lang . String result = instance . getGroup ( ) ; "<AssertPlaceHolder>" ; } getGro... | org . junit . Assert . assertEquals ( expResult , result ) |
logsExceptionOfSameType ( ) { exceptionLogger . log ( validException , failingCommand ) ; "<AssertPlaceHolder>" ; } getLoggedExceptions ( ) { return loggedExceptions ; } | org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableList . of ( validException ) , exceptionLogger . getLoggedExceptions ( ) ) |
createWriter_NonNullForSeenType ( ) { org . locationtech . geowave . core . store . index . NullIndex index = new org . locationtech . geowave . core . store . index . NullIndex ( "myIndex" ) ; org . locationtech . geowave . core . store . adapter . MockComponents . MockAbstractDataAdapter adapter = new org . locationt... | org . junit . Assert . assertNotNull ( writer ) |
testNoMatch ( ) { java . util . List < java . lang . String > candidates = fetchCandidates ( ":operation-properties-one-two-three(twoo" ) ; "<AssertPlaceHolder>" ; } asList ( ) { final java . util . List < java . lang . String > result = new java . util . ArrayList ( ) ; for ( java . util . Collection < org . wildfly .... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( ) , candidates ) |
testSwapEmptyBooleanArray ( ) { final boolean [ ] array = new boolean [ 0 ] ; org . apache . commons . lang3 . ArrayUtils . swap ( array , 0 , 2 ) ; "<AssertPlaceHolder>" ; } swap ( java . lang . Object [ ] , int , int ) { if ( ( array == null ) || ( ( array . length ) == 0 ) ) { return ; } org . apache . commons . lan... | org . junit . Assert . assertEquals ( 0 , array . length ) |
testCase28 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase28 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; } | org . junit . Assert . assertEquals ( 5 , branch_conditions . size ( ) ) |
shouldRejectEmailNotInWhitelist ( ) { given ( settings . getProperty ( EmailSettings . DOMAIN_WHITELIST ) ) . willReturn ( asList ( "domain.tld" , "example.com" ) ) ; given ( settings . getProperty ( EmailSettings . DOMAIN_BLACKLIST ) ) . willReturn ( java . util . Collections . emptyList ( ) ) ; boolean result = valid... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( false ) ) |
writesBody ( ) { org . everrest . core . servlet . TstServletOutputStream output = new org . everrest . core . servlet . TstServletOutputStream ( ) ; when ( httpServletResponse . getOutputStream ( ) ) . thenReturn ( output ) ; when ( containerResponse . getEntity ( ) ) . thenReturn ( "hello<sp>world" ) ; when ( contain... | org . junit . Assert . assertArrayEquals ( "hello<sp>world" . getBytes ( ) , output . getData ( ) ) |
testConvertSameVariant ( ) { org . biojava . nbio . genome . io . fastq . Fastq fastq = builder . build ( ) ; "<AssertPlaceHolder>" ; } convert ( org . biojava . nbio . genome . io . fastq . Fastq , org . biojava . nbio . genome . io . fastq . FastqVariant ) { if ( fastq == null ) { throw new java . lang . IllegalArgum... | org . junit . Assert . assertEquals ( fastq , org . biojava . nbio . genome . io . fastq . FastqTools . convert ( fastq , fastq . getVariant ( ) ) ) |
testAddInputPath ( ) { org . apache . hadoop . security . UserGroupInformation . setLoginUser ( org . apache . hadoop . security . UserGroupInformation . createUserForTesting ( "/test" 5 , new java . lang . String [ ] { "testGroup" } ) ) ; org . apache . druid . indexer . HadoopIngestionSpec spec = new org . apache . d... | org . junit . Assert . assertEquals ( "/test" 3 , expected , actual ) |
testEquals ( ) { org . jfree . data . time . Quarter q1 = new org . jfree . data . time . Quarter ( 2 , 2002 ) ; org . jfree . data . time . Quarter q2 = new org . jfree . data . time . Quarter ( 2 , 2002 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( o... | org . junit . Assert . assertTrue ( q1 . equals ( q2 ) ) |
mergeExactAndFuzzy_fuzzyFilled_exactEmpty ( ) { com . gisgraphy . geocoding . GeocodingService service = new com . gisgraphy . geocoding . GeocodingService ( ) ; java . util . List < com . gisgraphy . addressparser . Address > addresses = new java . util . ArrayList < com . gisgraphy . addressparser . Address > ( ) ; c... | org . junit . Assert . assertEquals ( 1 , result . getResult ( ) . size ( ) ) |
testRequestWithSpace ( ) { org . kaazing . gateway . transport . http . bridge . HttpRequestMessage request = new org . kaazing . gateway . transport . http . bridge . HttpRequestMessage ( ) ; request . setRequestURI ( java . net . URI . create ( "/Hello%20World.html" ) ) ; org . apache . mina . core . session . IoSess... | org . junit . Assert . assertNotNull ( requestURI ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.