### Question:
RoleInputSource extends LogicalSource { public String getRole() { if (!isRoleDefined()) { return null; } return role; } RoleInputSource(String role);  RoleInputSource(RoleInput roleInput); boolean isRoleDefined(); String getRole(); ActionSource getActionSource(LogicalSourceContext context); @Override String toString(); @Override boolean equals(Object o);  }### Answer:
@Test public void testRoleInputHasDefaultRoleWithNoGivenRole() { final RoleInputSource source = (RoleInputSource) SourceUtil.getSources(DefaultRoleConsumer.class, RoleInputSource.class).findFirst().get(); assertEquals("DefaultRoleConsumer", source.getRole()); }
@Test public void testRoleInputHasGivenRole() { final RoleInputSource source = (RoleInputSource) SourceUtil.getSources(TestRoleConsumer.class, RoleInputSource.class).findFirst().get(); assertEquals("test-role", source.getRole()); }